[mapserver-dev] Disabling GML output for one layer

Even Rouault even.rouault at spatialys.com
Sun Oct 19 08:51:00 PDT 2014


Angelos,

DUMP has no effect at all on anything since 6.0 as mentionned in 
http://mapserver.org/mapfile/layer.html (although the phrasing is perhaps a bit 
confusing as it reflects the previous behaviour)

According to http://mapserver.org/ogc/wms_server.html, you might want to set 
the following metadata on the LAYER on which you want do disable 
GetFeatureInfo :

"wms_enable_request" "* !GetFeatureInfo"

This will override the global WEB.METADATA "ows_enable_request" "*" that 
allows everything.

Even


> 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_La
> test,CLASSIFICATION&QUERY_LAYERS=MODIS_GPP_Latest,CLASSIFICATION&STYLES=,&S
> ERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&BBOX=2316381.337124%2C48458
> 49.841337%2C2351083.747961%2C4879902.537433&FEATURE_COUNT=10&HEIGHT=891&WID
> TH=908&FORMAT=image%2Fpng&INFO_FORMAT=application%2Fvnd.ogc.gml&SRS=EPSG%3A
> 900913&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

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


More information about the mapserver-dev mailing list