Ticket #1952 (closed defect: fixed)

Opened 7 years ago

Last modified 2 years ago

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) (diff)

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

mapwms.patch Download (1.8 KB) - added by dnadeau 5 years ago.
Hide Tileindex from WMS GetCapabilities?
mapwms.c.patch Download (2.3 KB) - added by mko 4 years ago.
updated patch handling grouped layers
ms540b1-hidden-layers.patch Download (4.0 KB) - added by mko 4 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.

Change History

Changed 5 years ago by dnadeau

Hide Tileindex from WMS GetCapabilities?

  Changed 5 years ago by dnadeau

Patch to hide TILEINDEX from GetCapabilities? for WMS layers.

follow-up: ↓ 3   Changed 5 years ago by jmckenna

  • 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 ; follow-up: ↓ 4   Changed 5 years ago by dnadeau

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=

Changed 4 years ago by mko

updated patch handling grouped layers

  Changed 4 years ago by mko

  • cc mko added

Changed 4 years ago by mko

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.

  Changed 4 years ago by dmorissette

  • description modified (diff)
  • milestone set to 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.

  Changed 4 years ago by dmorissette

  • description modified (diff)

  Changed 2 years ago by bj

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

  Changed 2 years ago by assefa

  Changed 2 years ago by dmorissette

  • status changed from new to closed
  • resolution set to fixed

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.