[mapserver-users] Shapezip 3D

Even Rouault even.rouault at mines-paris.org
Sat Mar 1 03:53:12 PST 2014


Le vendredi 28 février 2014 17:29:15, Guillaume Sueur a écrit :
> Hi list,
> 
> I'm trying to generate a 3D shapefile with OGR SHAPEZIP format. I'm
> using MapServer 6.5 compiled with USE_POINT_Z_M options.
> mapserv -v gives :
> MapServer version 6.5-dev OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ
> SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=ICONV
> SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER
> SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER
> SUPPORTS=GEOS SUPPORTS=POINT_Z_M INPUT=JPEG INPUT=POSTGIS INPUT=OGR
> INPUT=GDAL INPUT=SHAPEFILE
> 
> My data are stored in Postgis 2.1. They are 3D. I've added the
> "ows_geomtype"  "MultiPolygon25D" metadata to my layer.
> 
> What I get is a 3D shapefile, but all the Z values are set to 0.
> 
> Lookking at the request made by MapServer to Postgis, I see the geom is
> requested with Force2D function :
> encode(ST_AsBinary(ST_Force2D("the_geom"),'NDR'),'hex') as geom
> 
> Is this a bug or is there some more settings I didn't set properly ?

Guillaume,

there's no support yet for parsing 3D geometries in mappostgis.c (mentionned 
in comments of https://github.com/mapserver/mapserver/pull/4803 ). I wouldn't 
expect adding support for it to be that difficult.

As a workaround, I would have suggested that you could use the OGR PostgreSQL 
driver, but looking at mapogr.cpp, I also see that the Z support of OGR isn't 
used. Grrrr....

Even

-- 
Geospatial professional services
http://even.rouault.free.fr/services.html


More information about the mapserver-users mailing list