[postgis-devel] [PostGIS] #1996: ST_AsGeoJSON('POINT EMPTY') produces invalid JSON
PostGIS
trac at osgeo.org
Thu Sep 13 15:36:14 PDT 2012
#1996: ST_AsGeoJSON('POINT EMPTY') produces invalid JSON
------------------------+---------------------------------------------------
Reporter: cdestigter | Owner: pramsey
Type: defect | Status: new
Priority: medium | Milestone: PostGIS 2.1.0
Component: postgis | Version: trunk
Keywords: |
------------------------+---------------------------------------------------
This one's valid:
{{{
# select st_asgeojson('GEOMETRYCOLLECTION EMPTY'::geometry);
st_asgeojson
-----------------------------------------------
{"type":"GeometryCollection","geometries":[]}
(1 row)
}}}
This one's not:
{{{
# select st_asgeojson('POINT EMPTY'::geometry);
st_asgeojson
---------------------------------
{"type":"Point","coordinates":}
(1 row)
}}}
I understand that POINT EMPTY isn't valid as WKB, but that shouldn't
affect its ability to produce valid JSON. Even it means it comes out as
MULTIPOINT EMPTY instead.
The other empty geometry types seem to be fine, only POINT is affected.
POSTGIS="2.1.0SVN r10262" GEOS="3.3.3-CAPI-1.7.4" PROJ="Rel. 4.7.1, 23
September 2009" LIBXML="2.7.6"
PostgreSQL 9.0.6 on x86_64-pc-linux-gnu, compiled by GCC gcc-4.4.real
(Ubuntu 4.4.3-4ubuntu5) 4.4.3, 64-bit
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/1996>
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-devel
mailing list