José Mendes ha scritto: > Hi all, > > I am new to geotools, and to begin I am trying to load a simple > shapefile and display its geometry and points (in a coordinate system of > my liking). However, I cannot find any method to get the CRS associated > with the ShapefileDataStore in any of the related classes. Do I have to > read the .prj file myself and set the CoordinateReferenceSystem > manually? I ask this because it does not seem natural to me that this > has to be done manually as it removes some automation from the > implementation, and generality with regard to accessing other data > sources. Please correct me if I am wrong somewhere :)
myDataStore.getSchema().getDefaultGeometry().getCoordinateReferenceSystem() should give you what you're looking for. The .prj file is parsed automatically. Hope this helps Cheers Andrea ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Geotools-gt2-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
