Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#4164 closed defect (fixed)

ST_GeomFromGeoJSON gives unexpected result

Reported by: dbaston Owned by: pramsey
Priority: medium Milestone: PostGIS 2.5.0
Component: postgis Version: master
Keywords: Cc:

Description

As reported [on Stack Exchange](https://gis.stackexchange.com/q/294250/18189):

Calling ST_GeomFromGeoJSON on a GeoJSON polygon that's missing one level of brackets:

SELECT ST_AsText(ST_GeomFromGeoJSON('{"type": "Polygon", "coordinates": [[0,0], [0,5], [5, 5], [5,0], [0,0]]}'));

Returns an empty 3D polygon:

 POLYGON Z EMPTY

Change History (5)

comment:1 by pramsey, 6 years ago

In 16724:

Parse error on incorrectly nested GeoJSON input
References #4164

comment:2 by pramsey, 6 years ago

Resolution: fixed
Status: newclosed

In 16725:

Parse error on incorrectly nested GeoJSON input
Closes #4164

comment:3 by pramsey, 6 years ago

In 16726:

NL warning and add regression test
References #4164

comment:4 by pramsey, 6 years ago

In 16727:

NL warning and add regression test
References #4164

comment:5 by komzpa, 6 years ago

In 16772:

Add NEWS entry.

References #4164

Note: See TracTickets for help on using tickets.