[mapserver-dev] Disabling GML output for one layer

Angelos Tzotsos gcpp.kalxas at gmail.com
Sun Oct 19 10:28:50 PDT 2014


 From IRC discussion:

It seems that GML output cannot be disabled: part of the WMS spec.

Also, setting
TOLERANCE 0.0
to the layer definition, reduces the number of empty elements.

Thanks,
Angelos

On 10/19/2014 06:33 PM, Angelos Tzotsos wrote:
> Update: I managed to remove all gml features with:
>
>    "gml_exclude_items" "all"
>    "gml_geometries" "none"
>
> but I still want to get rid of the noise caused by the layer:
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
>
> <msGMLOutput
>      xmlns:gml="http://www.opengis.net/gml"
>      xmlns:xlink="http://www.w3.org/1999/xlink"
>      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>     <MODIS_GPP_Latest_layer>
>     <gml:name>Gross Primary Production</gml:name>
>         <MODIS_GPP_Latest_feature>
>         </MODIS_GPP_Latest_feature>
>         <MODIS_GPP_Latest_feature>
>         </MODIS_GPP_Latest_feature>
>         <MODIS_GPP_Latest_feature>
>         </MODIS_GPP_Latest_feature>
>         <MODIS_GPP_Latest_feature>
>         </MODIS_GPP_Latest_feature>
>         <MODIS_GPP_Latest_feature>
>         </MODIS_GPP_Latest_feature>
>         <MODIS_GPP_Latest_feature>
>         </MODIS_GPP_Latest_feature>
>         <MODIS_GPP_Latest_feature>
>         </MODIS_GPP_Latest_feature>
>         <MODIS_GPP_Latest_feature>
>         </MODIS_GPP_Latest_feature>
>         <MODIS_GPP_Latest_feature>
>         </MODIS_GPP_Latest_feature>
>         <MODIS_GPP_Latest_feature>
>         </MODIS_GPP_Latest_feature>
>     </MODIS_GPP_Latest_layer>
>     <CLASSIFICATION_layer>
>     <gml:name>Classification</gml:name>
>         <CLASSIFICATION_feature>
>             <gml:boundedBy>
>                 <gml:Box srsName="EPSG:900913">
> <gml:coordinates>2303460.117760,4833416.360730 
> 2373331.753604,4888216.511498</gml:coordinates>
>                 </gml:Box>
>             </gml:boundedBy>
>             <HABITAT>9530</HABITAT>
>             <TYPOI_OIKO>(Ypo-)Mesogeiaka Peukodasi me endimika 
> mauropeuka</TYPOI_OIKO>
>             <CLASSIFY>MAVROPEYKO</CLASSIFY>
>             <AREA>554669629.609</AREA>
>             <AT_ACRES>137061.850</AT_ACRES>
>             <PERIMETER>1440445.923</PERIMETER>
>             <CLASSID>2</CLASSID>
>         </CLASSIFICATION_feature>
>     </CLASSIFICATION_layer>
> </msGMLOutput>
>
> On 10/19/2014 06:24 PM, Angelos Tzotsos wrote:
>> Sorry, I forgot: MapServer version 6.4.1 from UbuntuGIS Unstable :)
>>
>> On 10/19/2014 05:44 PM, Angelos Tzotsos wrote:
>>> Hi all,
>>>
>>> I am having trouble to disable GML output (for WMS GetFeatureInfo 
>>> request) for one of my layers.
>>>
>>> 83.212.100.7/cgi-bin/mapserv?map=/home/data/WMS/wms.map&LAYERS=MODIS_GPP_Latest,CLASSIFICATION&QUERY_LAYERS=MODIS_GPP_Latest,CLASSIFICATION&STYLES=,&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&BBOX=2316381.337124%2C4845849.841337%2C2351083.747961%2C4879902.537433&FEATURE_COUNT=10&HEIGHT=891&WIDTH=908&FORMAT=image%2Fpng&INFO_FORMAT=application%2Fvnd.ogc.gml&SRS=EPSG%3A900913&X=391&Y=309 
>>>
>>>
>>> From the documentation it seems that DUMP OFF used to do that.
>>> How do I replicate this feature on latest versions?
>>>
>>> My layer definition:
>>>
>>>  LAYER
>>>   NAME MODIS_GPP_Latest
>>>  PROJECTION
>>>    "init=epsg:32634"
>>>   END
>>>   TYPE RASTER
>>>   DUMP FALSE
>>>   STATUS ON
>>>   DATA ./latest_GPP.tif
>>>   TEMPLATE ./template.html
>>>   PROCESSING "SCALE=AUTO"
>>>   OFFSITE 0 0 0
>>>   METADATA
>>>    "ows_title"    "Gross Primary Production"
>>>    "ows_abstract"    "Latest Gross Primary Production"
>>>    "ows_keywordlist"    "NASA,MODIS"
>>>    "wms_opaque"    "0"
>>>    "wms_metadataurl_format" "text/html"
>>>    "wms_dataurl_format" "image/png"
>>>    "ows_metadataurl_type" "FGDC"
>>>    "ows_metadataurl_href" "http://modis.gsfc.nasa.gov/"
>>>    "wms_dataurl_href" "ftp://e4ftl01.cr.usgs.gov"
>>>   END
>>>  END
>>>
>>> My MAP metadata:
>>>
>>>   METADATA
>>>    "ows_schemas_location" "http://schemas.opengis.net"
>>>    "ows_title" "MapServer for PindosGIS Project"
>>>    "ows_abstract" "Latest MODIS imagery through OGC Web Services"
>>>    "ows_keywordlist" "MapServer,MODIS,NASA"
>>>    "ows_enable_request" "*"
>>>    "ows_onlineresource" 
>>> "http://83.212.100.7/cgi-bin/mapserv?map=/home/data/WMS/wms.map"
>>>    "ows_fees" "none"
>>>    "ows_accessconstraints" "none"
>>>    "ows_srs" "EPSG:32634 EPSG:4326 EPSG:900913 EPSG:3857 EPSG:102113 
>>> EPSG:2100"
>>>    "wms_feature_info_mime_type"  "text/html"
>>>    "wms_getmap_formatlist" "image/png,image/gif"
>>>    END
>>>
>>> I have one vector layer and one raster layer and I want to disable 
>>> the raster layer result.
>>> Unfortunately the layer cannot be removed from the request (I drill 
>>> down WMS GetFeatureInfo on my GeoExt application)
>>>
>>> Thanks,
>>> Angelos
>>>
>>
>>
>
>


-- 
Angelos Tzotsos
Remote Sensing Laboratory
National Technical University of Athens
http://users.ntua.gr/tzotsos



More information about the mapserver-dev mailing list