OpenStreetMap tiles with custom projection and grid using Mapnik

Previous effort

In a previous post I tried generating OpenStreetMap tiles using GeoServer. It ended when I couldn’t find a good style (SLD) to apply the OSM layer.

The (new) idea, that also failed miserably

In this post I tried to use Mapnik to generating OSM map tiles in EPSG:25832. It failed mainly because the Python scripts published by OSM for generating tiles don’t support epsg:25832 out of the box. Mapnik is however an obvious choice for OSM because:

  • Mapnik can read .osm files
  • There is a comprehensive style for Mapnik, that is being maintained by OSM

Read more

Check if shared library is installed on Mac OS X

One way to check whether a library is installed is to use ld, e.g. check that zlib is installed:

ld -lzlib

If library is installed you’ll get something like this:

ld: warning: -arch not specified
ld: could not find entry point "start" (perhaps missing crt1.o) for inferred architecture x86_64

If library is not installed you’ll get something like this:

ld: library not found for -lzlib

Checking for disc overload on linux

The trick is to use vmstat and look at the number for “wait on acknowledge”.

vmstat -S m 1 100

Look under “cpu” and the “wa” column. If this number is high, it is bad. It should be zero. Some sample output from vmstat looks like this:

procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa
 0  0      0    406     83   3062    0    0     1     5    1    4  0  0 99  1
 0  0      0    406     83   3062    0    0     0     0 2020   49  0  0 100  0
 0  0      0    406     83   3062    0    0     0     0 2020   41  0  0 100  0
 0  0      0    406     83   3062    0    0     0     0 2018   53  0  0 100  0

Look at the column furthest to the right.

OpenStreetMap tiles in EPSG:25832 projection using GeoServer

Warning: This is a description of how to create a OpenStreetMap WMS with GeoServer. It works fine up to the point where the layers published as an unstyled WMS. This is where I’ve not been able to produce a good result, because of lack of a good Styled Layer Descriptor (SLD). If you have hints about a good SLD, feel welcome to submit a comment!

The idea

The idea is/was to first create a good general purpose OpenStreetMap WMS, and then use GeoWebCache to generate tiles from this WMS source in a custom projection, epsg:25832 in our case.

Read more