[GIS] Geoserver GetFeatureInfo WMS attributes: how to hide geometry

geoservergetfeatureinfowms

I know this has been discused before, but before somebody tell me about data base views or HTML templates, this is my concern:

Geoserver returns the geometry field from WMS getfeature info, enabling anyone to create scripts to download the data from the server as if it was WFS.

Is there a way to prevent this behaviour?

Best Answer

You can use the HTTP parameter "propertyName" to specify the properties that you want to be returned (comma-separated list), e.g. &propertyName=name,category. So, if you want all attributes, except for the geometry to be returned, you must include all property names in this list.

See: http://docs.geoserver.org/stable/en/user/services/wms/reference.html#getfeatureinfo for all details.