| The gt-geojson module does not correctly parse a GeometryCollection when a geometry in "geometries" is structured such that the "type" field occurs after that geometry's "coordinates." When presented with this scenario, a call stack similar to the following is reported: *{{java.lang.IllegalArgumentException: geometries must not contain null elements at com.vividsolutions.jts.geom.GeometryCollection.<init>(GeometryCollection.java:76) at com.vividsolutions.jts.geom.GeometryFactory.createGeometryCollection(GeometryFactory.java:303) at org.geotools.geojson.geom.GeometryCollectionHandler.endObject(GeometryCollectionHandler.java:64) at org.json.simple.parser.JSONParser.parse(Unknown Source) at org.json.simple.parser.JSONParser.parse(Unknown Source) at org.geotools.geojson.GeoJSONUtil.parse(GeoJSONUtil.java:236) at org.geotools.geojson.geom.GeometryJSON.parse(GeometryJSON.java:655) at org.geotools.geojson.geom.GeometryJSON.readGeometryCollection(GeometryJSON.java:610)}}* The problem can be reproduced by using GeometryJSON to parse the following valid GeoJSON string: *{{ { "type": "GeometryCollection", "geometries": [ { "coordinates": [[[100.0, 1.0],[101.0, 1.0],[100.5, 1.5],[100.0, 1.0]]], "type": "Polygon" } ] }} }* |