Merge "Issue #2664 Fix NullPointerException when no .prj file present" into development
Former-commit-id:3806a1fd05
[formerly6b226db27c
] [formerly66929690c7
[formerly de57933506ad588c8da38a49de6a2cd5530e2091]] Former-commit-id:66929690c7
Former-commit-id:cacff76564
This commit is contained in:
commit
55f31328af
1 changed files with 8 additions and 0 deletions
|
@ -119,6 +119,7 @@ import com.vividsolutions.jts.geom.Point;
|
||||||
* Feb 18, 2014 #2819 randerso Removed unnecessary clones of geometries
|
* Feb 18, 2014 #2819 randerso Removed unnecessary clones of geometries
|
||||||
* Mar 11, 2014 #2718 randerso Changes for GeoTools 10.5
|
* Mar 11, 2014 #2718 randerso Changes for GeoTools 10.5
|
||||||
* Mar 25, 2014 #2664 randerso Added support for non-WGS84 shape files
|
* Mar 25, 2014 #2664 randerso Added support for non-WGS84 shape files
|
||||||
|
* Apr 14, 2014 #2664 randerso Fix NullPointerException when no .prj file present
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -611,6 +612,13 @@ public class DataStoreResource extends
|
||||||
schema = dataStore.getSchema(typeName);
|
schema = dataStore.getSchema(typeName);
|
||||||
CoordinateReferenceSystem incomingCrs = schema
|
CoordinateReferenceSystem incomingCrs = schema
|
||||||
.getGeometryDescriptor().getCoordinateReferenceSystem();
|
.getGeometryDescriptor().getCoordinateReferenceSystem();
|
||||||
|
if (incomingCrs == null) {
|
||||||
|
statusHandler.warn("No projection information found for "
|
||||||
|
+ dataStore.getFeatureSource(typeName).getName()
|
||||||
|
.getURI()
|
||||||
|
+ ", assuming WGS84 unprojected lat/lon.");
|
||||||
|
incomingCrs = MapUtil.getLatLonProjection();
|
||||||
|
}
|
||||||
incomingToLatLon = MapUtil.getTransformToLatLon(incomingCrs);
|
incomingToLatLon = MapUtil.getTransformToLatLon(incomingCrs);
|
||||||
latLonToIncoming = MapUtil.getTransformFromLatLon(incomingCrs);
|
latLonToIncoming = MapUtil.getTransformFromLatLon(incomingCrs);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue