From: Jody G. <jod...@gm...> - 2011-09-30 00:51:11
|
The test cases are here - you could review LineGraphGeneratorTest if you have questions about that class: - http://svn.osgeo.org/geotools/trunk/modules/extension/graph/src/test/java/org/geotools/graph/ You can also review the uDig graph module (which provides an interactive example you could use). Try them out with a debugger; other than that there are the docs on the website. I would love to make a tutorial for this stuff but have not found the time / funding. I see you are a consultant so I am sure you can understand - there are additional support options listed here http://docs.geotools.org/latest/userguide/welcome/support.html if you need more direct support in order to meet a deadline. -- Jody Garnett On Thursday, 29 September 2011 at 10:14 PM, Harshad S wrote: > Hi, > > I think I didn't get your suggestion fully. Please suggest how should I go about it . > > Thank You. > Harshad Shrikhande > Researcher R&D > TCS Innovations Infra Lab, Chennai > Tata Consultancy Services > Cell:- 7200605821 > Mailto: har...@tc... (mailto:har...@tc...) > Website: http://www.tcs.com > ____________________________________________ > Experience certainty. IT Services > Business Solutions > Outsourcing > ____________________________________________ > > -----Jody Garnett wrote: --...@gm...> > > To: Harshad S <har...@tc... (mailto:har...@tc...)> > > From: Jody Garnett <jod...@gm... (mailto:jod...@gm...)> > > Date: 09/29/2011 05:41PM > > cc: geo...@li... (mailto:geo...@li...) > > Subject: Re: [Geotools-gt2-users] Reg Graph Issues in Geotools > > > > 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: har...@tc... (mailto:har...@tc...) > > > 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 > > > Geo...@li... (mailto:Geo...@li...) > > > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users > > |