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.
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.
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 |
Code by Michael Meier (michael.meier@fau.de)