相关文章推荐
深沉的蘑菇  ·  AND python处理数据 ...·  2 年前    · 
酒量小的柳树  ·  USTC-Verilog-OJ-Solved ...·  3 年前    · 
粗眉毛的枇杷  ·  alpine linux mount ...·  3 年前    · 
酷酷的芹菜  ·  GenerationType四中类型 - ...·  3 年前    · 

GeoJSON Import does not support the CRS property #399

@fgravin

Description

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

"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:?]