[gdal-dev] Handling PostGIS's geojson output with a Z dimensions

Even Rouault even.rouault at spatialys.com
Tue May 9 03:42:07 PDT 2017


On mardi 9 mai 2017 01:46:00 CEST Rutger wrote:
> Dear all,
> 
> I have a Python script rasterizing polygons which are imported with OGR from
> GeoJSON. The GeoJSON is created by PostGIS and send over the network
> (direct connection to the db is not possible).
> 
> This has worked very well until it started to crash the Python interpreter,
> a hard crash with no traceback/error whatsoever. Which made it hard to
> debug, but after isolating the specific case i noticed it crashed on an
> empty polygon with a Z dimension. Rasterizing an empty polygon with GDAL is
> useless, but normally works fine.

This sounds pretty much like
https://trac.osgeo.org/gdal/ticket/6844
Fixed in 2.2.0 and in 2.1 branch (post 2.1.3)

Your workaround of exporting to WKT and re-importing from it is a good one.

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20170509/a67691b4/attachment.html>


More information about the gdal-dev mailing list