From: Jody G. <jod...@gm...> - 2011-09-30 12:51:07
|
You got it sorted; however some of this information is in the tutorials? Have you had a go through the tutorials ... <p> I *would* like to make a tutorial for the graph module; but in general I need a friend on the user list here in order to try out the result and tell me if it makes sense. It sounds like you are working through the graph api at reasonable clip; let me know if you would be able to volunteer in this capacity. -- Jody Garnett On Friday, 30 September 2011 at 5:11 PM, Harshad S wrote: > > Hi, > > I actually found a way of doing that by using the 'getAttribute(int)' function of SimpleFeature. > > > 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 > ____________________________________________ > > -----Harshad S wrote: --...@tc...> > > To: jod...@gm... (mailto:jod...@gm...) > > From: Harshad S <har...@tc... (mailto:har...@tc...)> > > Date: 09/30/2011 12:01PM > > cc: geo...@li... (mailto:geo...@li...) > > Subject: Re: [Geotools-gt2-users] Reg Graph Issues in Geotools > > > > Hi all, > > > > Just a quick doubt. I am uploading a road network shapefile to application. I want to see each feature, its type(point, polygon or point ) and its descriptors like the (x,y) coordinates of the features. How can I get this info. Please help. > > > > > > 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: ----- > > > To: Harshad S <har...@tc... (mailto:har...@tc...)> > > > From: Jody Garnett <jod...@gm... (mailto:jod...@gm...)> > > > Date: 09/30/2011 06:21AM > > > cc: geo...@li... (mailto:geo...@li...) > > > Subject: Re: [Geotools-gt2-users] Reg Graph Issues in Geotools > > > > > > 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: ----- > > > > > 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 > > > > > > > > > > ------------------------------------------------------------------------------ > > All of the data generated in your IT infrastructure is seriously valuable. > > Why? It contains a definitive record of application performance, security > > threats, fraudulent activity, and more. Splunk takes this data and makes > > sense of it. IT sense. And common sense. > > http://p.sf.net/sfu/splunk-d2dcopy2 > > _______________________________________________ > > Geotools-gt2-users mailing list > > Geo...@li... (mailto:Geo...@li...) > > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users |