Permalink
Fetching contributors…
Cannot retrieve contributors at this time
83 lines (60 sloc) 2.01 KB

OSM Buildings Server

Code for OSM Buildings data service ist not public. However, you may use our service for free.

Before hitting us with heavy load, please get in touch at support@osmbuildings.org

The built in default server URL schema is https://{s}.data.osmbuildings.org/0.2/{k}/tile/{z}/{x}/{y}.json

Placeholder and adressing schema is described here: http://wiki.osgeo.org/wiki/Tile_Map_Service_Specification#Tile_Resources

{s} in our case stands for a subdomain (a,b,c,d) to extend the number of browser requests per domain.

Data Source

We are pulling OpenStreetMap data from Overpass API (http://overpass-turbo.eu/). That way we are very flexible in terms of querying and data freshness. For retrieving building data, we convert TMS adressed tiles to geographic bounding boxes (projection EPSG 4326) and opted for a JSON formatted response.

GeoJSON Properties

OSM Buildings Server does a lot of alignments, optimizations and caching and finally returns GeoJSON. The result is fully compatible but has a few conventions, see below.

GeoJSON property OSM Tags
height height, building:height, levels, building:levels
minHeight min_height, building:min_height, min_level, building:min_level
color/wallColor building:color, building:colour
material building:material, building:facade:material, building:cladding
roofColor roof:color, roof:colour, building:roof:color, building:roof:colour
roofMaterial roof:material, building:roof:material
shape building:shape[=cylinder,sphere]
roofShape roof:shape[=dome]
roofHeight roof:height

Sample Implementation

Code by Michael Meier (michael.meier@fau.de)

http://git.rrze.uni-erlangen.de/gitweb/?p=osmrrze.git;a=blob;f=scripts/osmbuildings-json-generator.pl