openstreetmap

Cannot parse a protocol buffers file in python when using the correct .proto file

為{幸葍}努か 提交于 2019-12-14 03:56:31
问题 (see update at bottom) Tilemaker is an OpenStreetMap programme to generate Mapbox vector tiles (which are themselves protocol buffers (pbf) files) from an OSM pbf data file. I have compiled it and used it to create a directory of vector tiles. I cannot parse those files in Python. I created the vector tiles with: tilemaker input.pbf --output=tiles/ Then I created a simple python programme, based on Google's Protocol Buffers Python Tutorial in this way: Compiling the .proto files: mkdir py

JavaScript offline routing library for OpenStreep Maps

a 夏天 提交于 2019-12-14 03:00:47
问题 Is there any library written in JavaScript for offline routing, to generate routes based on OSM data? And is there any with leaflet support? 回答1: While not generally advised (see scai's comment above), you actually can do offline routing in JavaScript, for example by using graphhopper cross-compiled to js or any of these libs. 来源: https://stackoverflow.com/questions/33102211/javascript-offline-routing-library-for-openstreep-maps

postgis query for addresses (with osm data)

谁说我不能喝 提交于 2019-12-14 02:05:32
问题 I want to make queries for addresses to postgis database with data from openstreetmap, check if such address exist in database and if so, get coordinates. Database was filled from .pbf file using osmosis. This is schema for the database http://pastebin.com/Yigjt77f. I have addresses in form of city name, street name and number of street. The most important for me is this table: CREATE TABLE node_tags ( node_id BIGINT NOT NULL, k text NOT NULL, v text NOT NULL ); k column is in form of tags,

Displaying OpenStreetMap boundaries on Google maps (using v3 api)

て烟熏妆下的殇ゞ 提交于 2019-12-13 15:42:15
问题 I want to display the city boundary on the Google Map using GeoJSON data which I get using the following tools. I went to the nominatim.openstreetmap.org and search for a city (Denver for example) With the retrieved OSM ID (in this case : 253750) then I've generated the GeoJSON file using the online tool (polygons.openstreetmap.fr) - which looks like this http://polygons.openstreetmap.fr/get_geojson.py?id=253750&params=0 After that, I've downloaded the file and tried to load this GeoJSON data

Please recommend a good OpenStreetMap component [closed]

蓝咒 提交于 2019-12-13 14:45:15
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . I've been asked to write an internal application for our business that uses mapping functionality to place push-pins of business

ImageMagick cropping large image into xyz tiles

别说谁变了你拦得住时间么 提交于 2019-12-13 13:28:13
问题 i'm having a large jpg, which has a resolution of x * 256 / x * 256. I want to cut this image into 256x256 tiles with a naming convention {zoom}-{x}-{y}.jpg. In the past i've used ZoomifyExpress Converter which does the cutting and zooming. I also want 6 different zoom levels. I've started so far with this command: convert example.jpg -crop 256x256 +gravity -set filename:tile ./tiles/%[fx:page.x/256]-%[fx:page.y/256] %[filename:tile].jpg This produces a lot of x-y.jpg tiles.I don't know how i

Osmdroid and marshmallow

蓝咒 提交于 2019-12-13 11:24:31
问题 I'm using osmdroid 5.2 lib in android 6.0 . I'm asking WRITE_EXTERNAL_STORAGE and ACCESS_COARSE / FINE_LOCATION permissions on realtime . But map not working: Unable to decode stream: java.io.FileNotFoundException: /storage/emulated/0/osmdroid/tiles/Mapnik/14/10079/5358.png.tile: open failed: EACCES (Permission denied) Map works only from the second run application. Can anyone help me? Thanks in advance. 回答1: You have to ask for the permissions before the mapview is loaded and displayed.

How to get road name or street name from GPS coordinates?

家住魔仙堡 提交于 2019-12-13 09:36:04
问题 Is there any possibility to get road name or street name when the GPS coordinates are given? I am developing an android application to provide upcoming road accident information to road users who are driving towards the accident situation. Therefore, I need to identify road users who are driving on the same route where the accident is. Hence, I will get the current position of the road user in every 500m. So I need to map this GPS positions with the road address and check whether the road

How to display only exact region on any open-source map (like maptalks)? [duplicate]

懵懂的女人 提交于 2019-12-13 09:23:28
问题 This question already has answers here : Google Maps v3 - limit viewable area and zoom level (12 answers) Closed 6 months ago . I need to show only one region on the map. For example Alaska or New-York city. 回答1: This solution is relevant to many js libraries. 1. Get boundaries via nominatim.openstreetmap.org API in a geojson format. 2. Set polygon/multipolygon mask on a [base]layer 回答2: You could find you'r area boundary and set map to limit panning. look at sample below: var allowedBounds =

How to get info if I am in village or out of the village (city)? (iOS geocoder or Overpass API for OSM) [closed]

大城市里の小女人 提交于 2019-12-13 08:25:53
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 6 years ago . Is there any way to find out if I am within village/city or out the village/city using iOS SDK (geocoder information) or Overpass API