Publishing maps to OGC API - Maps

OGC API - Maps provides geospatial data as web maps.

To add data to pygeoapi, you can use the dataset example in Configuration as a baseline and modify accordingly.

Providers

pygeoapi core feature providers are listed below, along with a matrix of supported query parameters.

Provider

bbox

width/height

MapScript

WMSFacade

Below are specific connection examples based on supported providers.

Connection examples

MapScript

MapScript is MapServer’s scripting interface to map rendering.

To publish a map via MapScript, the path to data is required, as well as the layer type (options.type). To style the data, set options.style. If no style is specified, the layer will be rendered with defaults.

MapServer layer types (options.type):

  • MS_LAYER_POINT

  • MS_LAYER_LINE

  • MS_LAYER_POLYGON

  • MS_LAYER_RASTER

Currently supported style files (options.style):

  • OGC Styled Layer Descriptor (SLD)

  • MapServer CLASS includes (i.e. file snippets with CLASS definitions)

providers:
    - type: map
      name: MapScript
      data: /path/to/data.shp
      options:
          type: MS_LAYER_POINT
          layer: foo_name
          style: ./foo.sld
      format:
         name: png
         mimetype: image/png

WMSFacade

To publish a WMS via pygeoapi, the WMS base URL (data) and layer name (options.layer) is required. An optional style name can be defined via options.style.

providers:
    - type: map
      name: WMSFacade
      data: https://demo.mapserver.org/cgi-bin/msautotest
      options:
          layer: world_latlong
          style: default
      format:
            name: png
            mimetype: image/png

Data visualization examples