[mapserver-users] how remove the geometry from wfs response

Even Rouault even.rouault at spatialys.com
Fri Jun 16 08:03:50 PDT 2017


On vendredi 16 juin 2017 14:51:35 CEST Lime, Steve D (MNIT) wrote:
> This behavior is documented http://mapserver.org/ogc/wfs_server.html and
> http://mapserver.org/output/ogr_output.html. The latter seems to contradict
> the documentation on the former that states that OGR output doesn't honor
> that metadata setting.
> 

Steve,

Are you pointing to

"""
*ows/wfs_geomtype*
(Optional, metadata shared with OGR output[1]). Set the geometry type of OGR layers 
created from this MapServer LAYER. One of “Point”, “LineString”, “Polygon”, “MultiPoint”, 
“MultiLineString”, “MultiPolygon”, “GeometryCollection”, “Geometry”, or “None”
"""
???
I don't see any contradiction between the 2 pages, so not sure you are pointing to this.

What I pointed to was "gml_geometries" "none"

Actually when looking in the code, my feeling is that "ows_geomtype" "None" works 
mostly for OGR output. "ows_geomtype" is only taken into account by GML output to 
determine if the geometry is 2.5D or not. What a mess !


> Steve
> 
> From: mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org] On
> Behalf Of Even Rouault Sent: Friday, June 16, 2017 5:26 AM
> To: mapserver-users at lists.osgeo.org
> Subject: Re: [mapserver-users] how remove the geometry from wfs response
> 
> On jeudi 15 juin 2017 20:22:04 CEST Andrea Peri wrote:
> > Hi,
> > 
> > I need to force the remove from the wfs response of the geometry . I need
> > 
> > to avoid that the users could take the geometry and allow only the
> > 
> > alphanumeric attributes.
> > 
> > Is this allowed from mapserver ?
> 
> Andrea,
> 
> 
> 
> Digging into the code, I found that setting in the LAYER.METADATA
> 
> 
> 
> "gml_geometries" "none"
> 
> 
> 
> will do the job.
> 
> 
> 
> This trick is used internally in particular to implement GetPropertyValue.
> But digging into history, I actually see it was done on purpose for
> GetFeature as well per
> 
> https://github.com/mapserver/mapserver/issues/1718
> 
> 
> 
> It is just that the documentation for it in is missing in
> 
> http://mapserver.org/ogc/wfs_server.html . Doesn't seem to be tested in the
> regression suite as far as I can see, so lucky it still works.
> 
> 
> 
> Note: this trick will only work for MapServer integrated GML output. OGR
> outputformat doesn't honour this setting.
> 
> 
> 
> 
> 
> Even
> 
> 
> 
> --
> 
> Spatialys - Geospatial professional services
> 
> http://www.spatialys.com


-- 
Spatialys - Geospatial professional services
http://www.spatialys.com

--------
[1] http://mapserver.org/output/ogr_output.html#ogr-output
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20170616/cd2711ef/attachment.htm>


More information about the MapServer-users mailing list