Opened 17 years ago

Closed 13 years ago

#1952 closed defect (fixed)

Tileindex Layer and WMS Get Capabilities.

Reported by: dnadeau@… Owned by: mapserverbugs
Priority: high Milestone: 6.0 release
Component: WMS Server Version: unspecified
Severity: normal Keywords:
Cc: jmckenna, mko

Description (last modified by dmorissette)

When a client perform a Get Capabilities, all "tileindex" layers should not be displayed. WMS clients may try to get data from this layer and the request will fail.

Can we add a STATUS flag to hide some layers from a Get Capability request?

Here is an example where the first layer should not be displayed in a Get Capability request.

#
#  TRMM_3B42_V6_10-DAY Tileindex Layer
#
LAYER
    STATUS ON
    NAME        'TRMM_3B42_V6_10_DAY_IDX'
    TYPE POLYGON
    CONNECTIONTYPE POSTGIS
    CONNECTION  "dbname=mapserver password=**** user=**** port=5432"
    DATA        "the_geom from trmm_3b42_v6_10_day"
    METADATA
                "wms_title"    "3b42_V6_10-day Index"
        END
END


#
#  TRMM_3B42_V6_10_DAY Tileindex Layer
#

LAYER
    NAME 'TRMM_3B42_V6_10_DAY'
    TYPE RASTER
    STATUS ON
    DEBUG ON

    # Column in postgis table with varchar of the
        # filepath to each image
    TILEITEM             "location"

    TILEINDEX            "TRMM_3B42_V6_10_DAY_IDX"
    PROJECTION
        "init=epsg:4326"
    END

    METADATA
                wms_title       "TRMM_3B42_V6_10_DAY"
                wms_srs         "EPSG:4326"
                wms_extent      "-180 -50.0 180 50.0"
                wms_timeextent  "1998-01-10/2011-12-31"
                wms_timeitem    "time"
                wms_timedefault "2006-03-10"
        END

        OFFSITE 0 0 0
        PROCESSING "SCALE=0,300"
        CLASS
                NAME "TRMM 3B42 R3 10 DAY"
                KEYIMAGE "/precipitation_colorbar.png"
                DEBUG ON
        END
END

Attachments (3)

mapwms.patch (1.8 KB ) - added by dnadeau 16 years ago.
Hide Tileindex from WMS GetCapabilities
mapwms.c.patch (2.3 KB ) - added by mko 15 years ago.
updated patch handling grouped layers
ms540b1-hidden-layers.patch (4.0 KB ) - added by mko 15 years ago.
Contrary to the original enhancement request, this patch introduces the 'ows_hidden_layer' metadata which hides a layer (e.g. tileindex) from (wms/wfs/wcs/sos) getcapabilities requests. Also solves ticket #2582 (but not #337 hence it does only hide the layer). The html printer doesn't show the complete patch for some reason, please view the raw format.

Download all attachments as: .zip

Change History (13)

by dnadeau, 16 years ago

Attachment: mapwms.patch added

Hide Tileindex from WMS GetCapabilities

comment:1 by dnadeau, 16 years ago

Patch to hide TILEINDEX from GetCapabilities for WMS layers.

comment:2 by jmckenna, 16 years ago

Cc: jmckenna added

my comments on the dev list:

"...For many clients who have an application mapfile AND a serve-through-wms requirement for their data I have to make a copy of the mapfile and remove certain layers that shouldn't be served through WMS...I wish there was a magical "wms_exclude_layers" metadata item that we could set."

in reply to:  2 ; comment:3 by dnadeau, 16 years ago

Jeff,

I did not set "wms_exclude_layers" metadata but

ows_service

if you set this METADATA in the LAYER or WEB section to "none" no layer will be displayed in the GetCapabilities request. This is working only for WMS at this point.

i.e.

#
# AIRX3STD Total H2O Vapor Ascending TILEINDEX Layer''
#
LAYER
        STATUS ON
        NAME        "AIRX3STDTOTH2OVAPAIDX"
        TYPE POLYGON
        CONNECTIONTYPE POSTGIS
        CONNECTION  "dbname=mapserver password=anonymous user=anonymous port=5432"
        DATA        "the_geom from airx3std_005_toth2ovap_a"
        METADATA
                "wms_title"    "AIRS STD Total H2O Vapor Ascending INDEX"
                "ows_service"  "none"  #hide this layer to getcapabilities request
        END
END

I found the discussion thread about this on MPASERVER-DEV mailing list.

http://lists.umn.edu/cgi-bin/wa?S2=MAPSERVER-DEV&X=5005A33B9EDB477B12-&Y=denis.nadeau%40gmail.com&q=tileindex+hide&s=&f=&a=&b=

by mko, 15 years ago

Attachment: mapwms.c.patch added

updated patch handling grouped layers

comment:5 by mko, 15 years ago

Cc: mko added

by mko, 15 years ago

Attachment: ms540b1-hidden-layers.patch added

Contrary to the original enhancement request, this patch introduces the 'ows_hidden_layer' metadata which hides a layer (e.g. tileindex) from (wms/wfs/wcs/sos) getcapabilities requests. Also solves ticket #2582 (but not #337 hence it does only hide the layer). The html printer doesn't show the complete patch for some reason, please view the raw format.

comment:6 by dmorissette, 15 years ago

Description: modified (diff)
Milestone: 6.0 release

The page wiki:HidingLayersInOGCWebServices has been created to collect use cases and try to come up with a solution for this ticket and a few related ones.

comment:7 by dmorissette, 15 years ago

Description: modified (diff)

comment:8 by bj, 13 years ago

Hey, just discovered. I guess it's to late to get this feature it in MapServer 6.0, right?

Any comment from a dev would be helpful gain momentum here.

bj

comment:10 by dmorissette, 13 years ago

Resolution: fixed
Status: newclosed

Yes, RFC 67 provides a mechanism to address this need. The following metadata entry in a tileindex layer should hide it in MapServer 6.0:

METADATA
  "wms_enable_request" "!*"
  ...
END
Note: See TracTickets for help on using tickets.