incubator-baremaps icon indicating copy to clipboard operation
incubator-baremaps copied to clipboard

GeoJSON Import does not support the CRS property

Open fgravin opened this issue 3 years ago • 0 comments

If the GeoJSON has a crs property in the featureCollection, baremaps triggers an error

eg :

"crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG::4326"}}

The error is

app_1  | java.lang.RuntimeException: java.io.IOException: Error parsing urn:ogc:def:crs:EPSG::4326 as crs id
app_1  | 	at org.geotools.geojson.feature.FeatureJSON$FeatureCollectionIterator.readNext(FeatureJSON.java:718) ~[gt-geojson-25.2.jar:?]
app_1  | 	at org.geotools.geojson.feature.FeatureJSON$FeatureCollectionIterator.hasNext(FeatureJSON.java:703) ~[gt-geojson-25.2.jar:?]
app_1  | 	at org.geotools.geojson.feature.FeatureJSON.readFeatureCollection(FeatureJSON.java:357) ~[gt-geojson-25.2.jar:?]
app_1  | 	at org.geotools.geojson.feature.FeatureJSON.readFeatureCollection(FeatureJSON.java:389) ~[gt-geojson-25.2.jar:?]
app_1  | Caused by: java.io.IOException: Error parsing urn:ogc:def:crs:EPSG::4326 as crs id
app_1  | 	at org.geotools.geojson.feature.CRSHandler.primitive(CRSHandler.java:58) ~[gt-geojson-25.2.jar:?]
app_1  | 	at org.geotools.geojson.DelegatingHandler.primitive(DelegatingHandler.java:106) ~[gt-geojson-25.2.jar:?]
app_1  | 	at org.json.simple.parser.JSONParser.parse(JSONParser.java:428) ~[json-simple-1.1.1.jar:?]
app_1  | 	at org.geotools.geojson.feature.FeatureJSON$FeatureCollectionIterator.readNext(FeatureJSON.java:715) ~[gt-geojson-25.2.jar:?]
app_1  | 	... 61 more
app_1  | Caused by: org.opengis.referencing.NoSuchAuthorityCodeException: No code "EPSG:4326" from authority "EPSG" found for object of type "EngineeringCRS".
app_1  | 	at org.geotools.referencing.factory.epsg.CartesianAuthorityFactory.noSuchAuthorityException(CartesianAuthorityFactory.java:136) ~[gt-referencing-25.2.jar:?]
app_1  | 	at org.geotools.referencing.factory.epsg.CartesianAuthorityFactory.createEngineeringCRS(CartesianAuthorityFactory.java:128) ~[gt-referencing-25.2.jar:?]
app_1  | 	at org.geotools.referencing.factory.epsg.CartesianAuthorityFactory.createCoordinateReferenceSystem(CartesianAuthorityFactory.java:119) ~[gt-referencing-25.2.jar:?]
app_1  | 	at org.geotools.referencing.factory.AuthorityFactoryAdapter.createCoordinateReferenceSystem(AuthorityFactoryAdapter.java:809) ~[gt-referencing-25.2.jar:?]

fgravin avatar Jan 12 '22 11:01 fgravin