Skip to content

Instantly share code, notes, and snippets.

@olt
olt / layer.map
Created Jul 27, 2015
magnacarto -mml roads.mml -builder mapserver -ms-no-map-block > layers.map
View layer.map
LAYER
NAME roads-outline
MAXSCALEDENOM 200000
STATUS ON
TYPE LINE
DATA "hamburg_germany/hamburg_germany_osm_roads"
PROJECTION
"init=epsg:4326"
END
CLASS
@olt
olt / README.md
Created Jul 23, 2015
Magnacarto example output
View README.md
@olt
olt / gist:6578538
Created Sep 16, 2013
Imposm3 diff-enabled import with generalized tables of germany-20130529.osm.pbf (1.7GB) on a Intel i7-2600, 32GB RAM, 7.2k SATA RAID1
View gist:6578538
$ imposm3 version
0.1dev-20130906-a48cd03
$ IMPOSM_READ_PROCS=6:2:2:2:2 time imposm3 import -connection=postgis://localhost/osm_germany -mapping mapping.json -overwritecache -write -read /opt/osm_data/pbf/germany-20130529.osm.pbf --diff
[Sep 16 11:04:18] removing existing cache /tmp/imposm3
[Sep 16 11:04:19] [reader] reading /opt/osm_data/pbf/germany-20130529.osm.pbf with data till 2013-05-28 20:59:04 +0200 CEST
[Sep 16 11:05:19] [ 1m0s] C: 3225000/s (135381109) N: 50100/s (2107184) W: 337400/s (6162891) R: 0/s (0)
[Sep 16 11:05:59] [ 1m39s] C: 3225000/s (135381109) N: 50100/s (2107184) W: 354900/s (20502138) R: 304590/s (112256)
[Sep 16 11:05:59] Reading OSM data took: 1m40.652336077s
[Sep 16 11:06:59] [ 1m0s] C: 0/s ( 0.0%) N: 0/s ( 0.0%) W: 20400/s ( 0.8%) R: 2550/s (100.0%)
[Sep 16 11:07:59] [ 2m0s] C: 0/s ( 0.0%) N: 0/s ( 0.0%) W: 21100/s ( 7.0%) R: 2550/s (100.0%)
@olt
olt / gist:5705180
Last active Dec 18, 2015
Imposm3 import with generalized tables of germany-20130529.osm.pbf on a Intel i7-2600, 32GB RAM, 7.2k SATA RAID1
View gist:5705180
$ imposm3 version
0.1dev-20130906-a48cd03
$ IMPOSM_READ_PROCS=6:2:2:2:2 imposm3 import -connection=postgis://localhost/osm_germany -mapping mapping.json -overwritecache -write -read germany-20130529.osm.pbf
[Sep 16 10:42:19] removing existing cache /tmp/imposm3
[Sep 16 10:42:20] [reader] reading /opt/osm_data/pbf/germany-20130529.osm.pbf with data till 2013-05-28 20:59:04 +0200 CEST
[Sep 16 10:43:20] [ 1m0s] C: 3305000/s (135381109) N: 51400/s (2107184) W: 339700/s (6458891) R: 0/s (0)
[Sep 16 10:43:59] [ 1m39s] C: 3305000/s (135381109) N: 51400/s (2107184) W: 353300/s (20502138) R: 211660/s (112256)
[Sep 16 10:43:59] Reading OSM data took: 1m39.870029303s
[Sep 16 10:44:59] [ 1m0s] C: 0/s ( 0.0%) N: 0/s ( 0.0%) W: 26200/s ( 1.7%) R: 2960/s (100.0%)
[Sep 16 10:45:59] [ 2m0s] C: 0/s ( 0.0%) N: 0/s ( 0.0%) W: 28600/s (10.4%) R: 2960/s (100.0%)
View WMTSCapabilities.xml
<?xml version="1.0" encoding="UTF-8"?>
<Capabilities xmlns="http://www.opengis.net/wmts/1.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:gml="http://www.opengis.net/gml" xsi:schemaLocation="http://www.opengis.net/wmts/1.0 ../wmtsGetCapabilities_response.xsd" version="1.0.0">
<ows:ServiceIdentification>
<ows:Title>MapProxy WMS Proxy</ows:Title>
<ows:Abstract>This is the fantastic MapProxy.</ows:Abstract>
<ows:ServiceType>OGC WMTS</ows:ServiceType>
<ows:ServiceTypeVersion>1.0.0</ows:ServiceTypeVersion>
<ows:Fees>None</ows:Fees>
<ows:AccessConstraints>This service is intended for private and evaluation use only. The data is licensed as Creative Commons Attribution-Share Alike 2.0 (http://creativecommons.org/licenses/by-sa/2.0/)</ows:AccessConstraints>
</ows:ServiceIdentification>
@olt
olt / gist:3121169
Created Jul 16, 2012
mapproxy config for usgs quads, mbtiles attempt
View gist:3121169
services:
demo:
kml:
tms:
# needs no arguments
wmts:
wms:
# srs: ['EPSG:4326', 'EPSG:900913']
# image_formats: ['image/jpeg', 'image/png']
md:
@olt
olt / mapproxy.yaml
Created Apr 12, 2012 — forked from bbinet/mapproxy.yaml
mapproxy config that would support internal layer as source
View mapproxy.yaml
services:
demo:
kml:
tms:
wms:
srs: ['EPSG:4326', 'EPSG:900913']
image_formats: ['image/jpeg', 'image/png']
layers:
- name: osm900913
@olt
olt / test.py
Created Oct 10, 2011
Flask-Assets KeyError
View test.py
raceback (most recent call last):
File "/Users/olt/dev/venv/foo/lib/python2.7/site-packages/flask/app.py", line 1518, in __call__
return self.wsgi_app(environ, start_response)
File "/Users/olt/dev/venv/foo/lib/python2.7/site-packages/flask/app.py", line 1506, in wsgi_app
response = self.make_response(self.handle_exception(e))
File "/Users/olt/dev/venv/foo/lib/python2.7/site-packages/flask/app.py", line 1504, in wsgi_app
response = self.full_dispatch_request()
File "/Users/olt/dev/venv/foo/lib/python2.7/site-packages/flask/app.py", line 1264, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/Users/olt/dev/venv/foo/lib/python2.7/site-packages/flask/app.py", line 1262, in full_dispatch_request
View complete.html
{% for name in names %}
{% include 'part.html' %}
{% endif %}
You can’t perform that action at this time.