[postgis-tickets] [PostGIS] #4164: ST_GeomFromGeoJSON gives unexpected result

PostGIS trac at osgeo.org
Tue Aug 28 10:50:14 PDT 2018


#4164: ST_GeomFromGeoJSON gives unexpected result
---------------------+---------------------------
 Reporter:  dbaston  |      Owner:  pramsey
     Type:  defect   |     Status:  new
 Priority:  medium   |  Milestone:  PostGIS 2.5.0
Component:  postgis  |    Version:  trunk
 Keywords:           |
---------------------+---------------------------
 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
 }}}

-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4164>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-tickets mailing list