This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This GIST is for a question to the MapServer mailing list: | |
# https://lists.osgeo.org/pipermail/mapserver-users/2018-January/080433.html | |
# | |
# Request a GeoJSON FeatureCollection via this: | |
# curl "http://localhost/mapserv?MAP=/usr/src/mapfiles/multi_should_be_multi.map&service=WFS&VERSION=1.1.0&REQUEST=getfeature&typename=should_be_multi&OUTPUTFORMAT=geojson&layer_id=23" | |
# I expect to receive one feature with | |
# "geometry": { "type": "MultiPolygon", "coordinates": ... } | |
# However, I get one feature with | |
# "geometry": { "type": "Polygon", "coordinates": ... } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import tiletanic | |
from shapely import geometry, wkb, ops | |
from osgeo import ogr, osr | |
import pyproj | |
from functools import partial | |
# Cover a geometry with WebMercator tiles at zoom level 9. | |
# Should make a pull request to add something like this to the Tiletanic CLI |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SimpleVSIMemFileError(Exception): | |
"""Unknown SimpleVSIMemFile error with VSI subsystem.""" | |
class SimpleVSIMEMFile(object): | |
def __init__(self, path): | |
"""Simple file-like object for reading out of a VSIMEM dataset. | |
Params: | |
path: /vsimem path to use | |
""" | |
self._path = path |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!-- docs: http://mapserver.org/mapcache/config.html --> | |
<!-- see the accompanying mapcache.xml.sample for a fully commented configuration file --> | |
<!-- sample config: https://github.com/mapserver/mapcache/blob/master/mapcache.xml.sample --> | |
<!-- Mapcache docker image that can work with this: https://github.com/yjacolin/docker-mapcache/blob/master/Dockerfile --> | |
<mapcache> | |
<cache name="disk" type="disk"> | |
<base>/tmp/tilecache</base> | |
<symlink_blank/> | |
</cache> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
010600000071120000010300000001000000ba6b0000a4703d0ad74862408cf678211d8043c0f10d85cfd648624000000000008043c0e7c8ca2f034862405000c5c8927f43c0e77118cc5f4862403d80457efd7e43c0ff5e0a0f9a486240d7a3703d0a7f43c05c21acc69248624087191a4f047d43c0b3d2a4147447624035eb8cef8b7543c0ebe3a1efee4562408fc2f5285c6f43c0992b836a0346624035eb8cef8b6d43c053ebfd46bb4562402b8a5759db6c43c0b0e8d66b7a456240b5dc9909866b43c0b3d2a41474456240ebc726f9116943c0c3633f8b254562408d800a47906643c02d6002b7ee4462407b14ae47e16643c0eb8cef8b4b446240e17a14ae476543c07e18213cda436240821fd5b0df6543c0b7973446eb43624009a9dbd9576643c0be6c3b6d0d446240d461855b3e6643c0dd5f3dee5b446240ab7b6473d56643c070cff3a70d446240ed7f80b56a6743c067d47c95fc436240c03dcf9f366843c0484f91434444624064ae0caa0d6843c0016e162f9644624087191a4f046943c01d3d7e6fd344624087191a4f046943c03e78edd206456240d461855b3e6a43c0c7d5c8aeb4446240bbd6dea7aa6a43c0b7973446eb446240f59eca694f6b43c0c47c7901f6446240c03dcf9f366c43c0ecbfce4d1b45624028486c770f6c43c03333333333456240bd715298f76c43c0865968e7b4456240a2b8 |