[postgis-tickets] [PostGIS] #4895: Problem of GeoJSON support with empty geometries
PostGIS
trac at osgeo.org
Wed Apr 14 12:21:13 PDT 2021
#4895: Problem of GeoJSON support with empty geometries
----------------------+---------------------------
Reporter: ezimanyi | Owner: pramsey
Type: defect | Status: new
Priority: medium | Milestone: PostGIS 3.1.2
Component: postgis | Version: 2.5.x
Keywords: |
----------------------+---------------------------
I haven't tested all geometry types but I have found already the problems
below.
test=# select ST_AsGeoJSON(geometry 'Linestring empty'),
ST_asText(ST_GeomFromGeoJSON(ST_AsGeoJSON(geometry 'Linestring
empty')));
st_asgeojson | st_astext
----------------------------------------+--------------------
{"type":"LineString","coordinates":[]} | LINESTRING Z EMPTY
(1 row)
test=# select ST_AsGeoJSON(geometry 'Point empty'),
ST_asText(ST_GeomFromGeoJSON(ST_AsGeoJSON(geometry 'Point empty')));
ERROR: Too few ordinates in GeoJSON
test=# select postgis_full_version();
POSTGIS="2.5.5" [EXTENSION] PGSQL="130" GEOS="3.8.0-CAPI-1.13.1 "
PROJ="Rel. 6.3.1, February 10th, 2020" GDAL="GDAL 3.0
.4, released 2020/01/28" LIBXML="2.9.10" LIBJSON="0.13.1" RASTER
Esteban
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4895>
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