On Tue, Mar 15, 2011 at 5:44 AM, Alessandro Ferrucci <[email protected]> wrote: > Hello, > I'm reading Geometries from features in a shapefile. > Shapefile is defined as CRS NAD83 (4269), but when I extract a > defaultGeometry from any of its features, and do > > geom.getSRID(); > > it always returns 0.
As far as I know none of the stores today will return the SRID inside the geometry. The reasoning is simple, many coordiante reference systems do not have an equivalent EPSG code or are defined in an authority other than the EPSG one (ESRI for example). If you're looking for the CRS you should get it from the FeatureType and/or from the default geometry descriptor (as a CoordinateReferenceSystem, if a strictly equivalent EPSG code exists you'll be able to get it using CRS.lookupEpsgCode(crs, true)) Cheers Andrea -- ------------------------------------------------------- Ing. Andrea Aime GeoSolutions S.A.S. Tech lead Via Poggio alle Viti 1187 55054 Massarosa (LU) Italy phone: +39 0584 962313 fax: +39 0584 962313 mob: +39 333 8128928 http://www.geo-solutions.it http://geo-solutions.blogspot.com/ http://www.youtube.com/user/GeoSolutionsIT http://www.linkedin.com/in/andreaaime http://twitter.com/geowolf ------------------------------------------------------- ------------------------------------------------------------------------------ Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d _______________________________________________ Geotools-gt2-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
