Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Duplicate
-
Affects Version/s: 2.5.0, 2.5.1
-
Component/s: jdbc-postgis plugin
-
Labels:None
-
Testcase included:yes
Description
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
GEOT-2190