[mapserver-dev] Disabling GML output for one layer

Rahkonen Jukka (Tike) jukka.rahkonen at mmmtike.fi
Sun Oct 19 10:40:05 PDT 2014


Hi,

I had not noticed that DUMP TRUE has no effect any more.

I made some tests with our WMS services. As documented, adding TEMPLATE to LAYER makes a vector layer queryable (weird for my mind) and adds the two default info formats, text/plain and GML. It is possible to add more info formats with wms_feature_info_mime_type but it does not seem possible to remove text/plain or GML formats. However, with wms_inlude_items and gml_include_items it is possible to control the attributes which are sent with the response. 

I had never before noticed that all RASTER layers are queryable by default and a LAYER lever "wms_enable_request" "* !GetFeatureInfo" must be used for disabling GetFeatureInfo.

When it comes to the actual question, the list of supported info formats is a service level element in WMS GetCapabilities. Therefore I believe that if GML output is supported for one layer, then it must be supported for all layers. Empty response with info_format=GML is probably the best that you can get.

I almost feel that it is a bug that raster layers must explicitly set to not-queryable when it is the opposite with vector layers.

-Jukka Rahkonen-

 

> -----Alkuperäinen viesti-----
> Lähettäjä: mapserver-dev-bounces at lists.osgeo.org [mailto:mapserver-dev-
> bounces at lists.osgeo.org] Puolesta Even Rouault
> Lähetetty: 19. lokakuuta 2014 18:51
> Vastaanottaja: mapserver-dev at lists.osgeo.org
> Aihe: Re: [mapserver-dev] Disabling GML output for one layer
> 
> 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_G
> > PP_La
> >
> test,CLASSIFICATION&QUERY_LAYERS=MODIS_GPP_Latest,CLASSIFICATION&ST
> YLE
> > S=,&S
> >
> ERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&BBOX=2316381.337
> 124%2C
> > 48458
> >
> 49.841337%2C2351083.747961%2C4879902.537433&FEATURE_COUNT=10&HE
> IGHT=89
> > 1&WID
> >
> TH=908&FORMAT=image%2Fpng&INFO_FORMAT=application%2Fvnd.ogc.gml&
> SRS=EP
> > SG%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
> _______________________________________________
> mapserver-dev mailing list
> mapserver-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-dev


More information about the mapserver-dev mailing list