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

Rahkonen Jukka (MML) jukka.rahkonen at maanmittauslaitos.fi
Fri Jun 16 02:52:34 PDT 2017


Hi,

I don't quite agree with you claim that geometry is somehow compulsory in WFS. See for example these capabilities:

http://demo.geo-solutions.it/geoserver/wfs?request=describefeaturetype&version=1.0.0&service=wfs&typename=topp:states

You can see that geometry is just one attribute among all the others and it has minOccurs=0 and nillable=true

<xsd:extension base="gml:AbstractFeatureType">
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="0" name="the_geom" nillable="true" type="gml:MultiPolygonPropertyType"/>

You can also make a GetFeature request that drops the geometry out. In this case the coordinates are revealed in the bounding box but that is another story.

http://demo.geo-solutions.it/geoserver/wfs?request=getfeature&version=1.0.0&service=wfs&typename=topp:states&propertyname=STATE_NAME,EMPLOYED&SORTBY=EMPLOYED&maxfeatures=1

What Andrea wants is a valid wish but it may be a bit difficult to configure WFS servers to drop the geometries by default and unexpected things may happen is user sends requests with spatial filters. One alternatively could be to create a WFS 2.0 stored query that does not return geometry and somehow allow users to make queries only through that stored query. Also application schemas are used for all kind of oddities but those are not supported by Mapserver.

-Jukka Rahkonen-


-----Alkuperäinen viesti-----
Lähettäjä: mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org] Puolesta Jörg Thomsen (WhereGroup)
Lähetetty: 16. kesäkuuta 2017 12:39
Vastaanottaja: mapserver-users at lists.osgeo.org
Aihe: Re: [mapserver-users] how remove the geometry from wfs response

Hi Andrea,

Am 16.06.2017 um 10:44 schrieb Andrea Peri:
> Hi Jorg,
> 
> I know the spec allow to reduce the attribute returned.
> 
> The WFS spec give the parameter "propertyname" is possible to give a 
> list of attribute returned.
> If in the propertyname is not list the "geometry" field it is not returned.
>
> So the wfs can have a response without the geometry as allowed from 
> the wfs spec.
> Also I know the mapserver allow to set and exclude some attribute to 
> avoid sensible information from the response using the parameter 
> "gml_exclude_items" and "ows_exclude_items".
> 
> Unfortunatelly the two parameter seem ignore the geometry field as field name.

you are right, but this concerns the request, not the service.
You are talking about attributes. The gemometry is not an attribute, but the feature itself and a WebFeatureService which does not provide the feautures/geometries wouldn't be a FeatureService.

Perhaps there is anybody else, who can explain it better ....

Jörg




> 
> A.
> 
> 
> 2017-06-16 8:56 GMT+02:00 Jörg Thomsen (WhereGroup)
> <joerg.thomsen at wheregroup.com>:
>> Hello Andrea,
>>
>> Am 15.06.2017 um 20:22 schrieb Andrea Peri:
>>> 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 ?
>>
>> This is not the purpose of a WFS. A WFS-Client would expect a 
>> gemoemtry und couldn't handle the answer.
>> You may use WMS-GetFeatureInfo with GML-Output.
>>
>> Regards, Jörg
>>
>>> Many thx,
>>> Andrea
>>>
>>>
>>>
>>> _______________________________________________
>>> mapserver-users mailing list
>>> mapserver-users at lists.osgeo.org
>>> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>>>
>>
>>
>> Viele Grüße,
>> Jörg Thomsen
>>
>> --
>>
>> **********************************
>> AGIT 2017
>> 5.-7. Juli 2017 in Salzburg
>> Besuchen Sie uns an Stand Nr. 31
>> www.agit.at
>> **********************************
>>
>> Jörg Thomsen
>> WhereGroup GmbH & Co. KG
>> Gillweg 3
>> 14193 Berlin
>> Germany
>>
>> Fon: +49 (0)30 / 5130 278 74
>> Fax: +49 (0)30 / 89 09 53 21
>>
>> joerg.thomsen at wheregroup.com
>> www.wheregroup.com
>> Amtsgericht Bonn, HRA 6788
>> -------------------------------
>> Komplementärin:
>> WhereGroup Verwaltungs GmbH
>> vertreten durch:
>> Olaf Knopp, Peter Stamm
>> -------------------------------
>> Folgen Sie der WhereGroup auf twitter: 
>> http://twitter.com/WhereGroup_com 
>> _______________________________________________
>> mapserver-users mailing list
>> mapserver-users at lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/mapserver-users
> 
> 
> 


Viele Grüße,
Jörg Thomsen

-- 

**********************************
AGIT 2017
5.-7. Juli 2017 in Salzburg
Besuchen Sie uns an Stand Nr. 31
www.agit.at
**********************************

Jörg Thomsen
WhereGroup GmbH & Co. KG
Gillweg 3
14193 Berlin
Germany

Fon: +49 (0)30 / 5130 278 74
Fax: +49 (0)30 / 89 09 53 21

joerg.thomsen at wheregroup.com
www.wheregroup.com
Amtsgericht Bonn, HRA 6788
-------------------------------
Komplementärin:
WhereGroup Verwaltungs GmbH
vertreten durch:
Olaf Knopp, Peter Stamm
-------------------------------
Folgen Sie der WhereGroup auf twitter: http://twitter.com/WhereGroup_com _______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


More information about the mapserver-users mailing list