From: Harshad S <har...@tc...> - 2011-09-30 07:11:58
|
<font face="Default Sans Serif,Verdana,Arial,Helvetica,sans-serif" size="2"> <br>Hi,<br> <br> I actually found a way of doing that by using the 'getAttribute(int)' function of SimpleFeature. <br><br><br>Thank You.<br>Harshad Shrikhande<br>Researcher R&D<br>TCS Innovations Infra Lab, Chennai<br>Tata Consultancy Services<br>Cell:- 7200605821<br>Mailto: har...@tc...<br>Website: http://www.tcs.com<br>____________________________________________<br>Experience certainty. IT Services<br> Business Solutions<br> Outsourcing<br>____________________________________________<br><br><font color="#990099">-----Harshad S <har...@tc...> wrote: -----</har...@tc...></font><div><blockquote style="padding-right: 0px; padding-left: 5px; margin-left: 5px; border-left: 2px solid black; margin-right: 0px;">To: jod...@gm...<br>From: Harshad S <har...@tc...><br>Date: 09/30/2011 12:01PM<br>cc: geo...@li...<br>Subject: Re: [Geotools-gt2-users] Reg Graph Issues in Geotools<br><br><font face="Default Sans Serif,Verdana,Arial,Helvetica,sans-serif" size="2"> Hi all,<br><br> 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.<br><br><br>Thank You.<br>Harshad Shrikhande<br>Researcher R&D<br>TCS Innovations Infra Lab, Chennai<br>Tata Consultancy Services<br>Cell:- 7200605821<br>Mailto: har...@tc...<br>Website: http://www.tcs.com<br>____________________________________________<br>Experience certainty. IT Services<br> Business Solutions<br> Outsourcing<br>____________________________________________<br><br><font color="#990099">-----Jody Garnett <!--Notes ACF <jod...@gm...>--> wrote: -----<!--Notes ACF </jod...@gm...>--></font><div><blockquote style="padding-right: 0px; padding-left: 5px; margin-left: 5px; border-left: 2px solid black; margin-right: 0px;">To: Harshad S <har...@tc...><br>From: Jody Garnett <jod...@gm...><br>Date: 09/30/2011 06:21AM<br>cc: geo...@li...<br>Subject: Re: [Geotools-gt2-users] Reg Graph Issues in Geotools<br><br> <div> <div>The test cases are here - you could review LineGraphGeneratorTest if you have questions about that class:</div><div>- http://svn.osgeo.org/geotools/trunk/modules/extension/graph/src/test/java/org/geotools/graph/</div><div><br></div><div>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.</div><div><br></div><div>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.</div><div><br>-- <br>Jody Garnett<br></div> </div> <div><br></div> <p style="color: rgb(160, 160, 168);">On Thursday, 29 September 2011 at 10:14 PM, Harshad S wrote:</p> <blockquote type="cite" style="border-left-style: solid; border-width: 1px; margin-left: 0px; padding-left: 10px;"> <span><div><div><font face="Default Sans Serif,Verdana,Arial,Helvetica,sans-serif" size="2"> Hi,<br><br> I think I didn't get your suggestion fully. Please suggest how should I go about it .<br><br>Thank You.<br>Harshad Shrikhande<br>Researcher R&D<br>TCS Innovations Infra Lab, Chennai<br>Tata Consultancy Services<br>Cell:- 7200605821<br>Mailto: <a href="mailto:har...@tc...">har...@tc...</a><br>Website: <a href="http://www.tcs.com">http://www.tcs.com</a><br>____________________________________________<br>Experience certainty. IT Services<br> Business Solutions<br> Outsourcing<br>____________________________________________<br><br><font color="#990099">-----Jody Garnett <!--Notes ACF <jod...@gm...>--> wrote: -----<!--Notes ACF </jod...@gm...>--></font><div><blockquote type="cite"><div>To: Harshad S <<a href="mailto:har...@tc...">har...@tc...</a>><br>From: Jody Garnett <<a href="mailto:jod...@gm...">jod...@gm...</a>><br>Date: 09/29/2011 05:41PM<br>cc: <a href="mailto:geo...@li...">geo...@li...</a><br>Subject: Re: [Geotools-gt2-users] Reg Graph Issues in Geotools<br><br> <div> 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). </div><div><br></div><div>Please review the test cases for the plugin in order to see examples.</div> <div><br>-- <br>Jody Garnett<br><br></div> <p style="color: rgb(160, 160, 168);">On Thursday, 29 September 2011 at 7:08 PM, Harshad S wrote:</p><blockquote type="cite"><div> <span><div><div><font face="Default Sans Serif,Verdana,Arial,Helvetica,sans-serif" size="2"> Hi,<br> 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.<br><br><br> 1) File file = JFileDataStoreChooser.showOpenFile("shp", null)<br> 2) FileDataStore store = null;<br> 3) store = FileDataStoreFinder.getDataStore(file);<br> 4) SimpleFeatureSource featureSource = store.getFeatureSource()<br> 5) LineGraphGenerator generator = new BasicLineGraphGenerator ()<br> 6) SimpleFeatureCollection fc = featureSource.getFeatures();<br> fc.accepts(new FeatureVisitor() {<br> <br> public void visit(Feature arg0) {<br> // TODO Auto-generated method stub<br> generator.add(arg0) ;<br> }<br> }, null);<br> <br> Now, the generator is not getting populated with the graph from the shapefile. Please correct me I am missing something here.<br> <br><br>Thank You.<br>Harshad Shrikhande<br>Researcher R&D<br>TCS Innovations Infra Lab, Chennai<br>Tata Consultancy Services<br>Cell:- 7200605821<br>Mailto: <a href="mailto:har...@tc...">har...@tc...</a><br>Website: <a href="http://www.tcs.com">http://www.tcs.com</a><br>____________________________________________<br>Experience certainty. IT Services<br> Business Solutions<br> Outsourcing<br>____________________________________________<br></font><pre style="white-space: normal;">=====-----=====-----=====<br>Notice: The information contained in this e-mail<br>message and/or attachments to it may contain <br>confidential or privileged information. If you are <br>not the intended recipient, any dissemination, use, <br>review, distribution, printing or copying of the <br>information contained in this e-mail message <br>and/or attachments to it are strictly prohibited. If <br>you have received this communication in error, <br>please notify us by reply e-mail or telephone and <br>immediately and permanently delete the message <br>and any attachments. Thank you<br><br><br></pre> </div><div>------------------------------------------------------------------------------<br>All the data continuously generated in your IT infrastructure contains a<br>definitive record of customers, application performance, security<br>threats, fraudulent activity and more. Splunk takes this data and makes<br>sense of it. Business sense. IT sense. Common sense.<br><a href="http://p.sf.net/sfu/splunk-d2dcopy1">http://p.sf.net/sfu/splunk-d2dcopy1</a><br></div><div>_______________________________________________<br>Geotools-gt2-users mailing list<br><a href="mailto:Geo...@li...">Geo...@li...</a><br><a href="https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users">https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users</a><br></div></div></span> </div></blockquote><div> <br> </div> </div></blockquote></div></font></div></div></span> </blockquote> <div> <br> </div> </blockquote></div><div></div></font> <pre>------------------------------------------------------------------------------<br>All of the data generated in your IT infrastructure is seriously valuable.<br>Why? It contains a definitive record of application performance, security<br>threats, fraudulent activity, and more. Splunk takes this data and makes<br>sense of it. IT sense. And common sense.<br><a href="http://p.sf.net/sfu/splunk-d2dcopy2">http://p.sf.net/sfu/splunk-d2dcopy2</a></pre><pre>_______________________________________________<br>Geotools-gt2-users mailing list<br>Geo...@li...<br><a href="https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users">https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users</a><br></pre></blockquote></div><div></div></font> |