[MapServer-users] Creating UTF grids with MapServer and MapCache
karsten
karsten at terragis.net
Wed Sep 7 15:20:15 PDT 2022
Yes that worked now to restart Apache !
Here is the final config snippets in case it helps someone
and remember the format tags aka 'MVT' are case sensitive ;)
mapfile
OUTPUTFORMAT
NAME "MVT"
DRIVER MVT
FORMATOPTION "EDGE_BUFFER=10"
END
LAYER
....
# added:
UTFITEM "gml_id"
UTFDATA
"{\"gml_id\":\"[gml_id]\",\"fkz\":\"[flurstueckskennzeichen]\",\"gemeindenam
e\":\"[gemeindename]\",\"Gemarkungsname\":\"[Gemarkungsname]\",\"zaehler\":\
"[zaehler]\",\"nenner\":\"[nenner]\"}"
END
mapcache.xml
<format name="MVT" type="RAW">
<extension>mvt</extension>
<mime_type>application/vnd.mapbox-vector-tile</mime_type>
</format>
<source name="flurst_utf" type="wms">
<getmap>
<params>
<FORMAT>MVT</FORMAT>
<LAYERS>flurst_gff</LAYERS>
<MAP>/xyz/utfgrid.map</MAP>
</params>
</getmap>
<http>
<url>http://theurl/cgi-bin/mapserv</url>
</http>
</source>
<tileset name="flurst_utf_tiles">
<metadata>
<title>Flurst UTF</title>
<abstract>Flurst UTF</abstract>
</metadata>
<source>flurst_utf</source>
<cache>disk</cache>
<grid restricted_extent="727077.513504722 6536256.08499261
754566.10585149 6562363.18993406">GoogleMapsCompatible</grid>
<format>MVT</format>
</tileset>
_____
From: karsten [mailto:karsten at terragis.net]
Sent: Wednesday, September 07, 2022 14:49
To: 'mapserver-users at lists.osgeo.org'
Subject: RE: Creating UTF grids with MapServer and MapCache
Oh yes that could be the problem, so far I have
OUTPUTFORMAT
NAME "utfgrid"
DRIVER UTFGRID
MIMETYPE "application/json"
EXTENSION "json"
FORMATOPTION "UTFRESOLUTION=4"
FORMATOPTION "DUPLICATES=false"
END
will try with mvt now (goal is to create utfgrid json though)
_____
From: karsten [mailto:karsten at terragis.net]
Sent: Wednesday, September 07, 2022 12:38
To: 'mapserver-users at lists.osgeo.org'
Subject: RE: Creating UTF grids with MapServer and MapCache
Thanks Scott,
I do have a tileset like this below
<tileset name="flurst_utf_tiles">
<metadata>
<title>Flurst UTF</title>
<abstract>Flurst UTF</abstract>
</metadata>
<source>flurst_utf</source>
<cache>disk</cache>
<grid restricted_extent="727077.513504722 6536256.08499261
754566.10585149 6562363.18993406">GoogleMapsCompatible</grid>
<format>mvt</format>
<metatile>5 5</metatile>
<metabuffer>10</metabuffer>
<expires>3600</expires>
</tileset>
but also with this get the error
tileset "flurst_utf_tiles" references format "mvt", but it is not configured
_____
From: karsten [mailto:karsten at terragis.net]
Sent: Wednesday, September 07, 2022 12:08
To: 'mapserver-users at lists.osgeo.org'
Subject: Creating UTF grids with MapServer and MapCache
Hi All,
I am working on a correct configuration to cerate UTFGrid json tiles via
MapCache and MapServer to seed a json tile set
MapCache is up and running on my ubuntu 20 server and WMS requests (PNG,
Jpeg ) are working as is the seeding utility.
Now I am trying to add a UTFGrid tile layer and added the mvt format into
the (working for the other layers correctly) mapcache.xml:
<format name="MVT" type="RAW">
<extension>mvt</extension>
<mime_type>application/vnd.mapbox-vector-tile</mime_type>
</format>
the layer is
<source name="flurst_utf" type="wms">
<getmap>
<params>
<FORMAT>mvt</FORMAT>
<LAYERS>flurst</LAYERS>
<MAP>/var/mapdata/utfgrid.map</MAP>
</params>
</getmap>
<http>
<url>http://myserver/cgi-bin/mapserv</url>
</http>
</source>
When tryign to restrart apache however I get this error message
systemctl status apache2.service
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor
preset: enabled)
Active: failed (Result: exit-code) since Wed 2022-09-07 20:31:58 CEST;
28s ago
Docs: https://httpd.apache.org/docs/2.4/
Process: 1265907 ExecStart=/usr/sbin/apachectl start (code=exited,
status=1/FAILURE)
Sep 07 20:31:58 terraz systemd[1]: Starting The Apache HTTP Server...
Sep 07 20:31:58 terraz apachectl[1265919]: AH00526: Syntax error on line 43
of /etc/apache2/sites-enabled/000-default.conf:
Sep 07 20:31:58 terraz apachectl[1265919]: tileset "flurst_utf_tiles"
references format "mvt", but it is not configured
Sep 07 20:31:58 terraz apachectl[1265907]: Action 'start' failed.
What am I missing here ?
Thanks
Karsten Vennemann
<http://www.terragis.net> www.terragis.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20220907/b7fb2c90/attachment.htm>
More information about the MapServer-users
mailing list