Issue #2664 Fix NullPointerException when no .prj file present
Change-Id: I2716eca6b71d79657f19feadb931a23ee3e44f4d Former-commit-id:f27f84e50f
[formerlyddf45d649c
] [formerlyf4823976f3
] [formerlyf27f84e50f
[formerlyddf45d649c
] [formerlyf4823976f3
] [formerlyf30c29bfbd
[formerlyf4823976f3
[formerly 66db062f94a5136902bac5cd5df8cbf30305a30a]]]] Former-commit-id:f30c29bfbd
Former-commit-id:8de698fb5b
[formerly5a8d4be559
] [formerly 7eef58459f9ae3bb450f759c1b276249d81df227 [formerlyba88a0836d
]] Former-commit-id: 59b9ac899c65d2b660c099ad7812637131917c66 [formerlyab1f3acde9
] Former-commit-id:a2ec4af060
This commit is contained in:
parent
6e3f331e4d
commit
5531e3b97c
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
|
||||
* Mar 11, 2014 #2718 randerso Changes for GeoTools 10.5
|
||||
* 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>
|
||||
*
|
||||
|
@ -611,6 +612,13 @@ public class DataStoreResource extends
|
|||
schema = dataStore.getSchema(typeName);
|
||||
CoordinateReferenceSystem incomingCrs = schema
|
||||
.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);
|
||||
latLonToIncoming = MapUtil.getTransformFromLatLon(incomingCrs);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue