#1142: GeoJSON reader cannot read null coordinates -----------------------+-------------------------- Reporter: caspervdw | Owner: geos-devel@… Type: defect | Status: new Priority: minor | Milestone: 3.11.0 Component: Default | Version: main Severity: Annoyance | Keywords: -----------------------+-------------------------- The GeoJSON writer writes NaN coordinates to null.
{{{ >>> pygeos.to_geojson(pygeos.Geometry("LINESTRING (1 nan, 2 2)")) '{"type":"LineString","coordinates":[[1.0,null],[2.0,2.0]]}' }}} The inverse operation however does not work: {{{ >>> pygeos.from_geojson('{"type":"LineString","coordinates":[[1.0,null],[2.0,2.0]]}') GEOSException: ParseException: Error parsing JSON: '[json.exception.type_error.302] type must be number, but is null' }}} There is a lot to say about allowing nan coordinates at all, but as they are allowed now and the writer handles them properly, I would expect the reader handles them as well. -- Ticket URL: <https://trac.osgeo.org/geos/ticket/1142> GEOS <http://trac.osgeo.org/geos> GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS).
_______________________________________________ geos-devel mailing list geos-devel@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/geos-devel