I'm trying to interact with .mbtiles databases to pull street level data relating to a lat/long query. I do not need to render the map itself, just access the information relating to the particular tile. At the moment I'm struggling to find a vector tile that extends past Is there a particular way to query a lat/long in an offline client which pulls back vector data from the tile and then print it into a console? I've been posting both here and on My current query to convert a lat/long and read data from the
asked 07 Jul '16, 13:22 JamesGould |
It seems to me that the vector tile route is unnecessarily convoluted. Download a suitable OSM PBF data extract, load it into a PostGIS database with osm2pgsql, and then make your queries against that. You don't say which "street level data" you want to "pull" but if it's the name and geometry of a street, you'd be doing something like
This will look for all street geometries coming near 100 Mercator units (that's roughly metres but depends on where you are) of your point, and list the 10 that come closest. Another option of doing the same is using the Nominatim geocoder and its reverse geocoding capability; it will essentially do the same internally, but give you a nicer output that includes an address hierarchy. Trying to use vector tiles for this seems a bit error-prone. answered 07 Jul '16, 14:01 Frederik Ramm ♦ |