I am using Cesium, and I would like to make a 3d city representation. I would like to retrieve a .json of the current location I am from OpenStreetMap. I have the position and the altitude of where I am. The problem is that I do not understand/can't find from which url source I can retrieve buildings ID and their relative height for a defined tileset position in openstreetmap I found a lot of exemple on internet and lib that do this, but I need to do it from source, and I do not quite know how. Basically, how does for exemple this : https://osmbuildings.org/ get the data from asked 11 Apr '19, 10:03 Popolee |
(Copied from my StackOverflow answer to the same question.) OSM has the data that's necessary to set up such a service, but the various providers use different formats as there's not really a clear standard yet (unlike with 2D raster and, arguably, vector maps). For use with Cesium, you probably want Cesium 3D Tiles. Cesium is offering their own building layer based on OSM data, called Cesium OSM Buildings (no relationship with OSM Buildings), on their Cesium Ion platform. It does not fully support the OSM data model at this point, but the Cesium integration is obviously well done. I'm not sure what OSM Buildings is currently using, but it does not seem to be the same as Cesium's 3D Tiles. Some older info on GitHub mentions using GeoJSON, but looking at the network traffic, it now seems to be using Mapbox Vector tiles, which is not a format specialized for 3D data, but rather a general-purpose solution for transmitting OSM data (and other data sources) as tiled vector maps. On osmbuildings.org/data, they mention that they are willing to provide data in other formats for commercial customers, though, if that's an option for you. Finally, some people have experimented with providing OSM for Cesium using open source software (see e.g. the osm-cesium-3d-tiles and osm2cesium repos). This might be a starting point for setting up your own service if you're willing to go down that path, but it's definitely not a complete and polished solution at this point. answered 20 Sep '20, 16:36 Tordanik |
Generally speaking, openstreetmap.org itself only provides raw data. This is done as bulk downloads of the entire planet and as very small on demand extracts for editing purposes. There is some capacity for larger extracts on openstreetmap.org, but availability is dependant on server load. Regularly updated extracts for countries/cities are available via other sites. I believe, bbbike.org's service supports geojson, if that is what you require. Unfortunately, for the larger part of your question I can't offer much help. OpenStreetMap has it's own data format that stores what 3D information it has as tags on the relevant objects. The most common scheme for this seems to be Simple 3D Buildings. answered 13 Apr '19, 14:52 InsertUser |