Die freie Weltkarte nutzen und mitgestalten.
Von Frederik Ramm
und Jochen Topf.
13.01.2014 | Frederik Ramm
WMS servers are quite old-fashioned in many respects. The WMS specification was created in 2000, and the basics haven’t changed much – WMS essentially specifies what was then mostly a HTTP CGI request. The client says “give me this map, in this projection, for this extent, in this resolution”, and the server hands over a raster image. This is how web mapping was done before the age of tiles, or even vector data. Nonetheless, WMS is a key component in many professional GIS workflows to this day.
In fact, a long time ago when OpenStreetMap started, it did offer a WMS itself, but that was soon replaced by a tile-based map which is better suited for high-exposure situations.
At Geofabrik, we’re doing both – we have tile servers for public-facing, high-volume services, and we offer WMS for those who have different needs. We have been running our OpenStreetMap WMS for a while now (we’re selling the service starting at €35/month, see product web page). We have developed the Mapnik-based WMS server ourselves and it’s open source.
Setting up a WMS isn’t rocket science, but because the WMS needs to compute a new image for each request, you have to carefully adapt the map style and database queries to work fast enough. This is where we’ve spent quite some time optimising things, by creating suitable database indexes or computing simplified geometries for landuse areas or road networks. We’re now soft-launching our overhauled WMS, with new clients getting access to the new services and existing clients being upgraded one by one. Here’s a couple things that our WMS does:
True on-demand rendering – any projection
Every single image served by our WMS is rendered from fresh OSM data when you make the request. This means that the data you see is no older than a few minutes (apart from the simplified major roads and landuse areas used on large map scales). It also means that we will never do bitmap reprojection of pre-rendered data because the images is produced using the requested projection.
If you are using other projections than the standard “Google Mercator” projection – say, UTM or Gauss-Krüger projections – then you will probably be familiar with maps where the labels are anything but straight. This happens when the WMS serves your image as a raster reprojection rather than a fresh vector rendering. It is faster but compromises image quality. We don’t do that.
High-resolution images for printing
We had offered a high-resolution “print” WMS for a while, but now we’re supporting user-set DPI so you can request a map in any resolution. Some desktop GIS systems, like Quantum GIS, will automatically re-request an image in a higher resolution if you make a printout, leading to excellent results.
Because we render each image on demand, we can also switch individual layers from the OSM style on and off. This is something that we had to configure specifically for clients until now, but the new WMS uses the standard WMS layer selection methods to expose a couple of layers (like world boundaries, place names, the road network, landcover, buildings, POIs and so on). Your GIS client will let you decide which layers to request.
This feature is particularly useful for displaying a non-cluttered base map (e.g. without buildings and POIs). You can even use it to generate a transparent map of roads and place names for overlaying on aerial imagery.