Interesting; their are a number of generators; some of them you need to 
configure so they can tell how to "connect" the graph; however I though 
BasicLineGraphGenerator was pretty straight forward (the end points of the line 
have to be exactly the same). 

Please review the test cases for the plugin in order to see examples. 

-- 
Jody Garnett


On Thursday, 29 September 2011 at 7:08 PM, Harshad S wrote:

>  Hi,
>  I am new to Geotools and its graph plugin. I am trying to find the shortest 
> path between 2 points on a map. Following is the code for it. But there's an 
> issue as the graph is not getting constructed from the shapefile and thus the 
> 'generator' variable shows NULL value.
> 
> 
>  1)  File file = JFileDataStoreChooser.showOpenFile("shp", null)
>  2)  FileDataStore store = null;
>  3)  store = FileDataStoreFinder.getDataStore(file);
>  4)  SimpleFeatureSource featureSource = store.getFeatureSource()
>  5)  LineGraphGenerator generator = new BasicLineGraphGenerator ()
>  6)  SimpleFeatureCollection fc = featureSource.getFeatures();
>  fc.accepts(new FeatureVisitor() {
> 
>  public void visit(Feature arg0) {
>  // TODO Auto-generated method stub
>  generator.add(arg0)  ;
>  }
>  }, null);
> 
> Now, the generator is not getting populated with the graph from the 
> shapefile. Please correct me I am missing something here.
> 
> 
> Thank You.
> Harshad Shrikhande
> Researcher R&D
> TCS Innovations Infra Lab, Chennai
> Tata Consultancy Services
> Cell:- 7200605821
> Mailto: [email protected] (mailto:[email protected])
> Website: http://www.tcs.com
> ____________________________________________
> Experience certainty. IT Services
>  Business Solutions
>  Outsourcing
> ____________________________________________
> =====-----=====-----=====
> Notice: The information contained in this e-mail
> message and/or attachments to it may contain 
> confidential or privileged information. If you are 
> not the intended recipient, any dissemination, use, 
> review, distribution, printing or copying of the 
> information contained in this e-mail message 
> and/or attachments to it are strictly prohibited. If 
> you have received this communication in error, 
> please notify us by reply e-mail or telephone and 
> immediately and permanently delete the message 
> and any attachments. Thank you
> 
> 
> ------------------------------------------------------------------------------
> All the data continuously generated in your IT infrastructure contains a
> definitive record of customers, application performance, security
> threats, fraudulent activity and more. Splunk takes this data and makes
> sense of it. Business sense. IT sense. Common sense.
> http://p.sf.net/sfu/splunk-d2dcopy1
> _______________________________________________
> Geotools-gt2-users mailing list
> [email protected] 
> (mailto:[email protected])
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to