Skip to content

Instantly share code, notes, and snippets.

@arbakker
Created June 16, 2023 11:39
Show Gist options
  • Save arbakker/107c96b65519447a25e2092419d1868a to your computer and use it in GitHub Desktop.
Save arbakker/107c96b65519447a25e2092419d1868a to your computer and use it in GitHub Desktop.
PDOK MapServer docker-compose voorbeeld

PDOK MapServer docker-compose voorbeeld

MapServer docker-compose voorbeeld met lighttpd reverse-proxy, voor het toevoegen van response headers.

  1. Start docker-compose met:
docker-compose up
  1. Service draait nu op: http://localhost/mapserver?service=WMS&request=getcapabilities
version: "3.9"
services:
reverse-proxy:
tty: true
ports:
- "80:80"
image: sebp/lighttpd
environment:
LIGHTTPD_CONFIG: |-
server.modules = (
"mod_proxy",
"mod_setenv"
)
server.username = "lighttpd"
server.groupname = "lighttpd"
server.pid-file = "/run/lighttpd.pid"
server.document-root = "/var/www"
server.errorlog = "/dev/pts/0"
$$HTTP["host"] =~ "localhost" {
$$HTTP["url"] =~ "^/.*" {
proxy.server = ( "" =>
((
"host" => "wms",
"port" => 80,
))
)
}
}
setenv.add-response-header = (
"Access-Control-Allow-Origin" => "*",
"Access-Control-Allow-Headers" => "accept, origin, x-requested-with, content-type, x-transmission-session-id",
"Access-Control-Expose-Headers" => "X-Transmission-Session-Id",
"Access-Control-Allow-Methods" => "GET, POST, OPTIONS"
)
depends_on:
- wms
command: >
/bin/ash -cx "echo $${LIGHTTPD_CONFIG} > /etc/lighttpd/lighttpd.conf && /usr/local/bin/start.sh"
wms:
tty: true
image: pdok/mapserver:7.6.4-patch-5-5 # issue DOES NOT occur with this image (does not contain rdnaptrans)
environment:
MS_MAPFILE: /srv/service.map
SERVICE_TYPE: WMS
command: >
/bin/bash -cx "lighttpd -D -f /srv/mapserver/config/lighttpd.conf"
volumes:
- ${PWD}/service.map:/srv/service.map
- ${PWD}/polygons.json:/srv/data/polygons.json
- ${PWD}/example.html:/srv/data/example.html
<!-- MapServer Template -->
<html>
<head>
<title>GetFeatureInfo output</title>
</head>
<style type="text/css">
table.featureInfo,
table.featureInfo td,
table.featureInfo th {
border: 1px solid #ddd;
border-collapse: collapse;
margin: 0;
padding: 0;
font-size: 90%;
padding: .2em .1em;
}
table.featureInfo th {
padding: .2em .2em;
font-weight: bold;
background: #eee;
}
table.featureInfo td {
background: #fff;
}
table.featureInfo tr.odd td {
background: #eee;
}
table.featureInfo caption {
text-align: left;
font-size: 100%;
font-weight: bold;
padding: .2em .2em;
}
</style>
<body>
<table class="featureInfo">
<caption class="featureInfo">polygons</caption>
<tr>
<th>fid</th>
<th>name</th>
</tr>
<tr>
<td>[fid]</td>
<td>[name]</td>
</tr>
</table>
<br />
</body>
</html>
server.modules += ( "mod_setenv" )
server.modules += ( "mod_fastcgi" )
server.modules += ( "mod_rewrite" )
server.modules += ( "mod_magnet" )
server.document-root = "/var/www/"
server.port = 80
server.tag = ""
server.http-parseopts = ( "url-ctrls-reject" => "disable")
server.username = "www"
server.groupname = "www"
server.errorlog = "/dev/stderr"
fastcgi.debug = env.DEBUG
magnet.attract-raw-url-to += ("/srv/mapserver/config/request.lua")
include "include.conf"
fastcgi.server = (
"/mapserver" => (
"mapserver" => (
"socket" => "/tmp/mapserver-fastcgi.socket",
"check-local" => "disable",
"bin-path" => "/usr/local/bin/mapserv",
"min-procs" => env.MIN_PROCS,
"max-procs" => env.MAX_PROCS,
"max-load-per-proc" => env.MAX_LOAD_PER_PROC,
"idle-timeout" => env.IDLE_TIMEOUT
)
)
)
Display the source blob
Display the rendered blob
Raw
{
"type": "FeatureCollection",
"name": "polygons",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
"features": [
{ "type": "Feature", "properties": { "id": "988fd9a0-665d-40ec-8c82-c188b023da3a","fid":"example.988fd9a0-665d-40ec-8c82-c188b023da3a", "name": "two" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 3.173263448097952, 51.118367977794016 ], [ 3.151386587714199, 51.567529616614536 ], [ 3.872320071111542, 51.579097338402633 ], [ 3.887149145114789, 51.129787743487398 ], [ 3.173263448097952, 51.118367977794016 ] ] ] } },
{ "type": "Feature", "properties": { "id": "7c8062d2-996c-4ec7-b3f5-1487afd6ba9a","fid":"example.7c8062d2-996c-4ec7-b3f5-1487afd6ba9a", "name": "three" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 3.151386587714199, 51.567529616614536 ], [ 3.129004215722919, 52.016668617336272 ], [ 3.857148113026823, 52.028387247223584 ], [ 3.872320071111542, 51.579097338402633 ], [ 3.151386587714199, 51.567529616614536 ] ] ] } },
{ "type": "Feature", "properties": { "id": "c0d694a8-9ae6-47ce-869c-b2389918f138","fid":"example.c0d694a8-9ae6-47ce-869c-b2389918f138", "name": "four" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 3.887149145114789, 51.129787743487398 ], [ 3.872320071111542, 51.579097338402633 ], [ 4.593596352097114, 51.586217914535396 ], [ 4.601366354589649, 51.136817201364337 ], [ 3.887149145114789, 51.129787743487398 ] ] ] } },
{ "type": "Feature", "properties": { "id": "dd96ce7d-c288-4272-9a39-e2eddef4269c","fid":"example.dd96ce7d-c288-4272-9a39-e2eddef4269c", "name": "five" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 3.872320071111542, 51.579097338402633 ], [ 3.857148113026823, 52.028387247223584 ], [ 4.585646612186182, 52.035600761272946 ], [ 4.593596352097114, 51.586217914535396 ], [ 3.872320071111542, 51.579097338402633 ] ] ] } },
{ "type": "Feature", "properties": { "id": "438dadba-d3f9-4068-9931-b490a147016a","fid":"example.438dadba-d3f9-4068-9931-b490a147016a", "name": "six" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 3.857148113026823, 52.028387247223584 ], [ 3.841621461562992, 52.477643726569497 ], [ 4.577510941070853, 52.484952060213253 ], [ 4.585646612186182, 52.035600761272946 ], [ 3.857148113026823, 52.028387247223584 ] ] ] } },
{ "type": "Feature", "properties": { "id": "b89791b3-e2a4-435b-868d-ace4e4f7f1dc","fid":"example.b89791b3-e2a4-435b-868d-ace4e4f7f1dc", "name": "seven" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 3.841621461562992, 52.477643726569497 ], [ 3.825727757746872, 52.92685304382406 ], [ 4.56918285646533, 52.93425814369067 ], [ 4.577510941070853, 52.484952060213253 ], [ 3.841621461562992, 52.477643726569497 ] ] ] } },
{ "type": "Feature", "properties": { "id": "1eeceb8c-9880-4dab-a972-09176683619d","fid":"example.1eeceb8c-9880-4dab-a972-09176683619d", "name": "eight" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 4.601366354589649, 51.136817201364337 ], [ 4.593596352097114, 51.586217914535396 ], [ 5.315052325102755, 51.588887965084737 ], [ 5.315757337399467, 51.139453073507674 ], [ 4.601366354589649, 51.136817201364337 ] ] ] } },
{ "type": "Feature", "properties": { "id": "9a3d58e0-a29b-47e5-b2fc-5d67e910317e","fid":"example.9a3d58e0-a29b-47e5-b2fc-5d67e910317e", "name": "nine" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 4.593596352097114, 51.586217914535396 ], [ 4.585646612186182, 52.035600761272946 ], [ 5.31433099450929, 52.038305673084714 ], [ 5.315052325102755, 51.588887965084737 ], [ 4.593596352097114, 51.586217914535396 ] ] ] } },
{ "type": "Feature", "properties": { "id": "e6fdc131-5b49-462a-9f5c-534fa714d7f3","fid":"example.e6fdc131-5b49-462a-9f5c-534fa714d7f3", "name": "ten" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 4.585646612186182, 52.035600761272946 ], [ 4.577510941070853, 52.484952060213253 ], [ 5.313592783199281, 52.487692539430761 ], [ 5.31433099450929, 52.038305673084714 ], [ 4.585646612186182, 52.035600761272946 ] ] ] } },
{ "type": "Feature", "properties": { "id": "3ba66609-f60d-4b9a-ab51-2042cda85e45","fid":"example.3ba66609-f60d-4b9a-ab51-2042cda85e45", "name": "eleven" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 4.577510941070853, 52.484952060213253 ], [ 4.56918285646533, 52.93425814369067 ], [ 5.312837102548919, 52.93703492084645 ], [ 5.313592783199281, 52.487692539430761 ], [ 4.577510941070853, 52.484952060213253 ] ] ] } },
{ "type": "Feature", "properties": { "id": "2526a820-61a2-4bf8-b051-c798c240a18d","fid":"example.2526a820-61a2-4bf8-b051-c798c240a18d", "name": "twelve" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 4.56918285646533, 52.93425814369067 ], [ 4.560655570593818, 53.383505360140951 ], [ 5.312063336186696, 53.386319191324283 ], [ 5.312837102548919, 52.93703492084645 ], [ 4.56918285646533, 52.93425814369067 ] ] ] } },
{ "type": "Feature", "properties": { "id": "c9f7810e-77b6-4ad7-9e66-3ab4b20326a6","fid":"example.c9f7810e-77b6-4ad7-9e66-3ab4b20326a6", "name": "thirteen" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 4.560655570593818, 53.383505360140951 ], [ 4.551921971985373, 53.832680076489389 ], [ 5.311270838339277, 53.835531744583207 ], [ 5.312063336186696, 53.386319191324283 ], [ 4.560655570593818, 53.383505360140951 ] ] ] } },
{ "type": "Feature", "properties": { "id": "40ef59b2-fc8a-42a4-b611-f22d933a3d74","fid":"example.40ef59b2-fc8a-42a4-b611-f22d933a3d74", "name": "fourteen" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 5.316446569056983, 50.690014668752752 ], [ 5.315757337399467, 51.139453073507674 ], [ 6.030164096941654, 51.137694130092136 ], [ 6.023945859994527, 50.688278084292726 ], [ 5.316446569056983, 50.690014668752752 ] ] ] } },
{ "type": "Feature", "properties": { "id": "e5b257f7-acb0-48bc-b40b-bd3ec37afbd6","fid":"example.e5b257f7-acb0-48bc-b40b-bd3ec37afbd6", "name": "fiveteen" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 5.315757337399467, 51.139453073507674 ], [ 5.315052325102755, 51.588887965084737 ], [ 6.036524612273974, 51.587106221934093 ], [ 6.030164096941654, 51.137694130092136 ], [ 5.315757337399467, 51.139453073507674 ] ] ] } },
{ "type": "Feature", "properties": { "id": "2e010665-ac2a-4622-86c9-7b8c1b3bad4c","fid":"example.2e010665-ac2a-4622-86c9-7b8c1b3bad4c", "name": "sixteen" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 5.315052325102755, 51.588887965084737 ], [ 5.31433099450929, 52.038305673084714 ], [ 6.043032253177762, 52.036500674575599 ], [ 6.036524612273974, 51.587106221934093 ], [ 5.315052325102755, 51.588887965084737 ] ] ] } },
{ "type": "Feature", "properties": { "id": "eee8da4e-a289-44fd-b14d-a41617d46262","fid":"example.eee8da4e-a289-44fd-b14d-a41617d46262", "name": "seventeen" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 5.31433099450929, 52.038305673084714 ], [ 5.313592783199281, 52.487692539430761 ], [ 6.049692090039895, 52.485863814400815 ], [ 6.043032253177762, 52.036500674575599 ], [ 5.31433099450929, 52.038305673084714 ] ] ] } },
{ "type": "Feature", "properties": { "id": "df897b16-9d90-4c40-84a2-1f046ef04681","fid":"example.df897b16-9d90-4c40-84a2-1f046ef04681", "name": "eighteen" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 5.313592783199281, 52.487692539430761 ], [ 5.312837102548919, 52.93703492084645 ], [ 6.056509429440837, 52.935181981858946 ], [ 6.049692090039895, 52.485863814400815 ], [ 5.313592783199281, 52.487692539430761 ] ] ] } },
{ "type": "Feature", "properties": { "id": "7a91c95f-2aca-4847-a2c6-84c527598cfd","fid":"example.7a91c95f-2aca-4847-a2c6-84c527598cfd", "name": "nineteen" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 5.312837102548919, 52.93703492084645 ], [ 5.312063336186696, 53.386319191324283 ], [ 6.06348982806594, 53.384441533888833 ], [ 6.056509429440837, 52.935181981858946 ], [ 5.312837102548919, 52.93703492084645 ] ] ] } },
{ "type": "Feature", "properties": { "id": "6ff27408-50ea-484a-94ef-c29e24d8b20b","fid":"example.6ff27408-50ea-484a-94ef-c29e24d8b20b", "name": "twenty" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 5.312063336186696, 53.386319191324283 ], [ 5.311270838339277, 53.835531744583207 ], [ 6.070639107611651, 53.833628846330541 ], [ 6.06348982806594, 53.384441533888833 ], [ 5.312063336186696, 53.386319191324283 ] ] ] } },
{ "type": "Feature", "properties": { "id": "8a2a2bdf-1547-4ffd-93f5-20132355a630","fid":"example.8a2a2bdf-1547-4ffd-93f5-20132355a630", "name": "twenty-one" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 6.023945859994527, 50.688278084292726 ], [ 6.030164096941654, 51.137694130092136 ], [ 6.744428613227958, 51.131541191584517 ], [ 6.731307541914743, 50.682203357001079 ], [ 6.023945859994527, 50.688278084292726 ] ] ] } },
{ "type": "Feature", "properties": { "id": "f54f184e-175a-466a-8819-4765b83e8113","fid":"example.f54f184e-175a-466a-8819-4765b83e8113", "name": "twenty-two" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 6.030164096941654, 51.137694130092136 ], [ 6.036524612273974, 51.587106221934093 ], [ 6.757849811025378, 51.580873531098305 ], [ 6.744428613227958, 51.131541191584517 ], [ 6.030164096941654, 51.137694130092136 ] ] ] } },
{ "type": "Feature", "properties": { "id": "b3770a8c-6f24-47d8-b311-5bb2c638ee34","fid":"example.b3770a8c-6f24-47d8-b311-5bb2c638ee34", "name": "twenty-three" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 6.036524612273974, 51.587106221934093 ], [ 6.043032253177762, 52.036500674575599 ], [ 6.771581355203106, 52.030186638426336 ], [ 6.757849811025378, 51.580873531098305 ], [ 6.036524612273974, 51.587106221934093 ] ] ] } },
{ "type": "Feature", "properties": { "id": "6028a6e3-b3d8-40ca-ad6a-0a7b19d529af","fid":"example.6028a6e3-b3d8-40ca-ad6a-0a7b19d529af", "name": "twenty-four" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 6.043032253177762, 52.036500674575599 ], [ 6.049692090039895, 52.485863814400815 ], [ 6.785633935973348, 52.479466785652107 ], [ 6.771581355203106, 52.030186638426336 ], [ 6.043032253177762, 52.036500674575599 ] ] ] } },
{ "type": "Feature", "properties": { "id": "92fc5689-a784-4da0-a0a4-547957ca13cd","fid":"example.92fc5689-a784-4da0-a0a4-547957ca13cd", "name": "twenty-five" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 6.049692090039895, 52.485863814400815 ], [ 6.056509429440837, 52.935181981858946 ], [ 6.800018741222294, 52.928700256354695 ], [ 6.785633935973348, 52.479466785652107 ], [ 6.049692090039895, 52.485863814400815 ] ] ] } },
{ "type": "Feature", "properties": { "id": "8a1865d9-def3-4b8f-aa72-c62a2ff50994","fid":"example.8a1865d9-def3-4b8f-aa72-c62a2ff50994", "name": "twenty-six" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 6.056509429440837, 52.935181981858946 ], [ 6.06348982806594, 53.384441533888833 ], [ 6.814747485799911, 53.377873347882542 ], [ 6.800018741222294, 52.928700256354695 ], [ 6.056509429440837, 52.935181981858946 ] ] ] } },
{ "type": "Feature", "properties": { "id": "bfee106c-161d-4733-bfd3-4e106b92330e","fid":"example.bfee106c-161d-4733-bfd3-4e106b92330e", "name": "twenty-seven" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 6.06348982806594, 53.384441533888833 ], [ 6.070639107611651, 53.833628846330541 ], [ 6.829832442902625, 53.826972373602402 ], [ 6.814747485799911, 53.377873347882542 ], [ 6.06348982806594, 53.384441533888833 ] ] ] } },
{ "type": "Feature", "properties": { "id": "adb93519-8393-45c9-b16f-1877bd6d040b","fid":"example.adb93519-8393-45c9-b16f-1877bd6d040b", "name": "twenty-eight" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 6.757849811025378, 51.580873531098305 ], [ 6.771581355203106, 52.030186638426336 ], [ 7.499809503484894, 52.019366616448728 ], [ 7.478864741689896, 51.570192851175676 ], [ 6.757849811025378, 51.580873531098305 ] ] ] } },
{ "type": "Feature", "properties": { "id": "93474ec8-496a-4f66-8adb-07488bbb2daf","fid":"example.93474ec8-496a-4f66-8adb-07488bbb2daf", "name": "twenty-nine" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 6.771581355203106, 52.030186638426336 ], [ 6.785633935973348, 52.479466785652107 ], [ 7.521243645154165, 52.468504602338676 ], [ 7.499809503484894, 52.019366616448728 ], [ 6.771581355203106, 52.030186638426336 ] ] ] } },
{ "type": "Feature", "properties": { "id": "189dfdb2-9935-4ca2-9f2f-70d5ddc5bbac","fid":"example.189dfdb2-9935-4ca2-9f2f-70d5ddc5bbac", "name": "thirty" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 6.785633935973348, 52.479466785652107 ], [ 6.800018741222294, 52.928700256354695 ], [ 7.543184206626649, 52.917592995197694 ], [ 7.521243645154165, 52.468504602338676 ], [ 6.785633935973348, 52.479466785652107 ] ] ] } },
{ "type": "Feature", "properties": { "id": "e40b825f-5bcb-4300-b084-ba2486c794f7","fid":"example.e40b825f-5bcb-4300-b084-ba2486c794f7", "name": "thirty-one" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 6.800018741222294, 52.928700256354695 ], [ 6.814747485799911, 53.377873347882542 ], [ 7.565649029563628, 53.366617990502064 ], [ 7.543184206626649, 52.917592995197694 ], [ 6.800018741222294, 52.928700256354695 ] ] ] } },
{ "type": "Feature", "properties": { "id": "0203b405-b4d0-44da-a65a-c3693dbfdd9e","fid":"example.0203b405-b4d0-44da-a65a-c3693dbfdd9e", "name": "thirty-two" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 6.814747485799911, 53.377873347882542 ], [ 6.829832442902625, 53.826972373602402 ], [ 7.588656805041603, 53.815565794825027 ], [ 7.565649029563628, 53.366617990502064 ], [ 6.814747485799911, 53.377873347882542 ] ] ] } }
]
}
MAP
NAME ""
CONFIG "MS_ERRORFILE" "stderr"
EXTENT 2 50 9 54
UNITS meters
STATUS ON
SIZE 5000 5000
## global debug settings for mapserver, remove comment in lines below to enable
# DEBUG 4 # https://mapserver.org/optimization/debugging.html
# CONFIG "CPL_DEBUG" "ON" # GDAL
RESOLUTION 91
DEFRESOLUTION 91
PROJECTION
"init=epsg:4326"
END
WEB
METADATA
"ows_enable_request" "*"
"ows_fees" "NONE"
"ows_contactorganization" "Unknown"
"ows_schemas_location" "http://schemas.opengis.net"
"ows_service_onlineresource" "http://localhost"
"ows_contactperson" "ContactCenter Unknown"
"ows_contactposition" "pointOfContact"
"ows_contactvoicetelephone" ""
"ows_contactfacsimiletelephone" ""
"ows_addresstype" ""
"ows_address" ""
"ows_city" "City"
"ows_stateorprovince" ""
"ows_postcode" ""
"ows_country" "Country"
"ows_contactelectronicmailaddress" "example@unknown.org"
"ows_hoursofservice" ""
"ows_contactinstructions" ""
"ows_role" ""
"ows_srs" "EPSG:4326 EPSG:3857 EPSG:4258 CRS:84"
"ows_accessconstraints" "otherRestrictions;http://creativecommons.org/publicdomain/mark/1.0"
END
END
# outputformat used by WMS GetFeatureInfo and the WFS GetFeature requests
OUTPUTFORMAT
NAME "GEOJSON" # format name (visible as format in the 1.0.0 capabilities)
DRIVER "OGR/GEOJSON"
MIMETYPE "application/json; subtype=geojson"
FORMATOPTION "STORAGE=stream"
FORMATOPTION "FORM=SIMPLE"
FORMATOPTION "USE_FEATUREID=true"
FORMATOPTION "LCO:ID_FIELD=fid"
FORMATOPTION "LCO:ID_TYPE=STRING"
END
# outputformat used by WMS GetFeatureInfo and the WFS GetFeature requests
OUTPUTFORMAT
NAME "JSON"
DRIVER "OGR/GEOJSON"
MIMETYPE "application/json"
FORMATOPTION "STORAGE=stream"
FORMATOPTION "FORM=SIMPLE"
FORMATOPTION "USE_FEATUREID=true"
FORMATOPTION "LCO:ID_FIELD=fid"
FORMATOPTION "LCO:ID_TYPE=STRING"
END
# outputformat used by WMS GetFeatureInfo request, not the WFS GetFeature requests
OUTPUTFORMAT
NAME "XML"
DRIVER "OGR/GML"
MIMETYPE "text/xml"
FORMATOPTION "STORAGE=stream"
FORMATOPTION "FORM=SIMPLE"
FORMATOPTION "USE_FEATUREID=true"
FORMATOPTION "DSCO:GML_ID=fid"
FORMATOPTION "DSCO:PREFIX=example"
FORMATOPTION "DSCO:XSISCHEMAURI=http://example.unknown.org"
END
# outputformat used by WMS GetFeatureInfo request, not the WFS GetFeature requests
OUTPUTFORMAT
NAME "OGRGML3"
DRIVER "OGR/GML"
MIMETYPE "text/xml; subtype=gml/3.1.1"
FORMATOPTION "STORAGE=stream"
FORMATOPTION "FORM=SIMPLE"
FORMATOPTION "USE_FEATUREID=true"
FORMATOPTION "DSCO:FORMAT=GML3Deegree"
FORMATOPTION "DSCO:GML_FEATURE_COLLECTION=YES"
FORMATOPTION "DSCO:PREFIX=example"
FORMATOPTION "DSCO:XSISCHEMA=EXTERNAL"
FORMATOPTION "DSCO:TARGET_NAMESPACE=http://example.unknown.org"
FORMATOPTION "DSCO:XSISCHEMAURI=http://example.unknown.org http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0/wfs.xsd http://www.opengis.net/gml http://schemas.opengis.net/gml/3.1.1/base/gml.xsd"
END
# outputformat used by WMS GetFeatureInfo requests, not the WFS GetFeature requests
OUTPUTFORMAT
NAME "OGRGML32"
DRIVER "OGR/GML"
MIMETYPE "text/xml; subtype=gml/3.2.1"
FORMATOPTION "STORAGE=stream"
FORMATOPTION "FORM=SIMPLE"
FORMATOPTION "USE_FEATUREID=true"
FORMATOPTION "DSCO:FORMAT=GML3.2"
FORMATOPTION "DSCO:GML_ID=wms.example.getfeatureinfo.collection"
FORMATOPTION "DSCO:GML_FEATURE_COLLECTION=YES"
FORMATOPTION "DSCO:PREFIX=example"
FORMATOPTION "DSCO:XSISCHEMA=EXTERNAL"
FORMATOPTION "DSCO:TARGET_NAMESPACE=http://example.unknown.org"
FORMATOPTION "DSCO:XSISCHEMAURI=http://example.unknown.org http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0/wfs.xsd http://www.opengis.net/gml/3.2 http://schemas.opengis.net/gml/3.2.1/gml.xsd"
END
# outputformat used by WMS GetMap requests
OUTPUTFORMAT
NAME "SVG"
DRIVER CAIRO/SVG
MIMETYPE "image/svg+xml"
IMAGEMODE RGB
EXTENSION "svg"
END
# outputformat used by tiled requests
OUTPUTFORMAT
NAME "mvt"
DRIVER MVT
FORMATOPTION "EDGE_BUFFER=20"
EXTENSION "pbf"
FORMATOPTION "EXTENT=4096"
END
WEB
METADATA
"ows_title" "Example"
"ows_abstract" "Service containing a example"
"ows_keywordlist" "example,unknown"
"ows_schemas_location" "http://schemas.opengis.net"
"wfs_extent" "2 50 9 54"
"wfs_namespace_prefix" "example"
"wfs_namespace_uri" "http://example.unknown.org"
"wfs_maxfeatures" "1000"
"wfs_onlineresource" "http://localhost"
"wms_getmap_formatlist" "image/png,image/jpeg,image/png; mode=8bit,image/vnd.jpeg-png,image/vnd.jpeg-png8,image/svg+xml"
"wms_enable_request" "* !GetStyles !DescribeLayer"
"wms_bbox_extended" "true"
"wms_namespace_prefix" "example"
"wms_namespace_uri" "http://example.unknown.org"
"wms_getfeatureinfo_formatlist" "text/html,text/xml; subtype=gml/3.2.1,text/xml; subtype=gml/3.1.1,application/json,application/json; subtype=geojson"
"ows_sld_enabled" "false"
END
END
LAYER
NAME "example"
STATUS ON
TYPE POLYGON
## layer debug settings for mapserver, remove comment in lines below to enable
# DEBUG 4
METADATA
"wfs_title" "example"
"wfs_abstract" "Layer containing the example data"
"wfs_srs" "EPSG:4326 EPSG:3857 EPSG:4258 CRS:84"
"wfs_extent" "2 50 9 54"
"wfs_bbox_extended" "true"
"wfs_enable_request" "*"
"wfs_include_items" "all"
"wfs_getfeature_formatlist" "OGRGML3,OGRGML32,GEOJSON,JSON"
"gml_include_items" "all"
"gml_exclude_items" "id"
"gml_featureid" "id"
"gml_geometries" "geom"
"gml_types" "auto"
"wms_title" "example"
"wms_extent" "2 50 9 54"
"wms_abstract" "Layer containing the example data"
"wms_srs" "EPSG:4326 EPSG:3857 EPSG:4258 CRS:84"
"wms_keywordlist" "example,unknown"
"wms_include_items" "all"
END
CLASSGROUP "example:style"
CLASS
NAME "example"
GROUP "example:style"
STYLE
COLOR 230 230 0
OUTLINECOLOR 255 0 0
WIDTH 1
END
END
PROJECTION
"init=epsg:4326"
END
CONNECTIONTYPE OGR
CONNECTION "/srv/data/polygons.json"
DATA "polygons"
TEMPLATE /srv/data/example.html
END # LAYER
END # MAP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment