Not retrieving appropriate SRID in PostgisDataStore.createSchema ----------------------------------------------------------------
Key: GEOT-2189 URL: http://jira.codehaus.org/browse/GEOT-2189 Project: GeoTools Issue Type: Bug Components: data postgis Affects Versions: 2.5.1, 2.5.0 Reporter: Milton Jonathan Assignee: Justin Deoliveira Priority: Minor Fix For: 2.5.1, 2.5.0 Attachments: geotools-tecgraf.2.5.x.postgis_getsrid.patch Whenever PostgisDataStore.createSchema(featureType) is called, it retrieves the CoordinateReferenceSystem from the provided FeatureType and must find a suitable corresponding SRID for creating the schema correctly in Postgis. However, this method was only working for CRS's that do not have identifiers, which is a problem when one is reading them from WKTs such as those coming from shapefile .prj files. The problem was corrected by calling CRS.lookupIdentifier() if needed. A test and patch is provided for that. Two things to notice are: - The code for retrieving the SRID was separated from the createSchema method, in order to allow it to be tested - The pom.xml file for the Postgis module was changed to include epsg-hsql, since that is required for CRS.lookupIdentifier to work properly. For details, see discussion at http://www.nabble.com/Correction-to-PostgisDataStore-td20256159.html -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel