0

Is it possible to make an output of the creations date in a map script file (WMS). I have a WMS service for example like this:

MAP
  NAME "Basel-01"
  STATUS ON
  #EXTENT -137 29 -53 88
  EXTENT -180 -90 180 90
  UNITS DD
  SHAPEPATH "data"
  #SIZE 800 600

  IMAGETYPE PNG24

  PROJECTION
    "init=epsg:2056"
  END

  WEB
    METADATA
      ows_title "Basel-01"
      ows_enable_request "*"
      ows_srs "EPSG:2056"
    END
  END


  SYMBOL
    NAME 'circle'
    TYPE ELLIPSE
    POINTS 1 1 END
    FILLED TRUE
  END



  LAYER
    NAME "Gebaeude_01"
    STATUS ON
    TYPE POLYGON
    DATA "Gebaeude_01"
    CLASS
      STYLE
        COLOR 129 129 137
        OUTLINECOLOR 0 0 0
      END
    END
  END
END

With this map scripts I will make some Pictures (Call URL) of the script:

http://localhost:81/cgi-bin/mapserv.exe?map=C:/MS4W/ms4w/apps/mapserver_wms/basel_01.map&REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.3.0

Is there any possibility to get an output with the creation date?

1

For the OneGeology project dataset/layer date is handled as a keyword:

<Keyword>DS_DATE@2011</Keyword>
1
  • Thanks a lot. I will try it
    – hpthaeler
    Nov 9 '21 at 14:21
0

There is not so many places in GetCapabilities document for such information. Giving that info through the metadata provided by the layer metadata link is perhaps what the writers of the standard would suggest. An example taken from GeoServer demo http://demo.geo-solutions.it/geoserver/ows?service=wms&version=1.3.0&request=GetCapabilities

<MetadataURL type="19139">
<Format>text/plain</Format>
<OnlineResource xlink:type="simple" xlink:href="http://demo.geo-solutions.it/geonetwork/srv/eng/xml_iso19139?uuid=40f06448-9bef-4e04-b800-af298dd4268d"/>
</MetadataURL>

A workaround could be to use the layer abstract and write the creation date there. Abstact is text and you can write anything there. It is also possible to use keywords but that does feel good for dates. See another example from the sama GeoServer demo:

<Layer queryable="1" opaque="0">
<Name>sde:NE2_HR_LC_SR_W_DR</Name>
<Title>NE2_HR_LC_SR_W_DR</Title>
<Abstract>Natural Earth II with Shaded Relief, Water, and Drainages</Abstract>
<KeywordList>
<Keyword>WCS</Keyword>
<Keyword>GeoTIFF</Keyword>
<Keyword>NE2_HR_LC_SR_W_DR</Keyword>

Abstract for the layer can be added with mapfile by adding METADATA block at layer level https://mapserver.org/ogc/wms_server.html.

 LAYER
    NAME "Gebaeude_01"
    STATUS ON
    TYPE POLYGON
    DATA "Gebaeude_01"
     METADATA
     "wms_abstract" "Date of this layer:2021-11-08"
     END #end metadata
    CLASS
      STYLE
        COLOR 129 129 137
        OUTLINECOLOR 0 0 0
      END
    END
  END
END
1
  • Thanks a lot. I will try it
    – hpthaeler
    Nov 9 '21 at 14:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.