openstreetmap

Reading OSM Map (or other format) files to determine shortest distance from coordinate to path

為{幸葍}努か 提交于 2020-04-19 11:41:23
问题 My App uses openstreetmap files to show waypoint (or coordinates) on a map. Based on an Openstreet map file: how can I determine the shortest distance from a GPS coordinate to the (walking) path. Can I read an OSM (map) or .osm file ... to access the paths? 回答1: There are some misconceptions. First, the OSM file is not the map file. The OSM file can be used to create a format to make map rendering fast e.g. mapsforge format does this. With e.g. GraphHopper you import the OSM file like .pbf or

how to extract all countries geometry from Openstreet map dataset in BigQuery

房东的猫 提交于 2020-04-18 03:57:12
问题 I am using this query to extract the geometry of all countries using OSM, it works ok, but I am sure, it is creating a duplicated as I am using flag as a reference, some places have a flag, but they are not really countries SELECT feature_type, osm_id, osm_timestamp, geometry,ar.key,ar.value, FROM `bigquery-public-data.geo_openstreetmap.planet_features`,UNNEST(all_tags) ar where ('boundary', 'administrative') IN (SELECT (key, value) FROM UNNEST(all_tags)) and(feature_type="polygon" or feature

Find multiple tags around coordinates with Overpass API

冷暖自知 提交于 2020-04-16 05:47:12
问题 Given this overpass query https://overpass-turbo.eu/s/Sle, that searches for museums and galleries, how can I introduce a new type of tag to search around the same location, for example I want to also search for node["amenity"~"cafe|bar"] around the same area (500 meters around lat: 500,53.866444 and lon: 10.684738 . Everything I've tried either raises an error or returns incomplete results. For example, the following works, but only returns cafés and bars but no museums. [out:json]; node[

OSM offline on Android

自闭症网瘾萝莉.ら 提交于 2020-03-23 23:17:04
问题 I'm trying to build an offline map on android and I'm still a beginner in that. so I added osmdroid to my project and I downloaded a the map data from this link. after some searching in the internet I still didn't find an example to display the data. In addition osmdroid use sd card location from what I found. is there a possibility to change that with a clear example about how to do it ? thank you 回答1: You downloaded raw openstreetmap data. Osmdroid requires rendered tiles for offline

详解QtLocation(六):实现自定义LBS插件的离线缓存

落花浮王杯 提交于 2020-03-23 03:32:07
3 月,跳不动了?>>> 写在前面 静态的插件参数 前面已经讲到,我们在QML端只有 Map 对象,各种各样的地图源是靠配置LBS插件来实现的;在配置插件的同时,还可以配置插件参数 PluginParameter ,官方LBS插件能够配置的插件参数参见 Plugin References and Parameters 。以官方的 Open Street Map Plugin 为例: Plugin { name: "osm" PluginParameter { name: "osm.useragent"; value: "My great Qt OSM application" } PluginParameter { name: "osm.mapping.host"; value: "http://osm.tile.server.address/" } PluginParameter { name: "osm.mapping.copyright"; value: "All mine" } PluginParameter { name: "osm.routing.host"; value: "http://osrm.server.address/viaroute" } PluginParameter { name: "osm.geocoding.host"; value: "http:

Extract constrained polygon using OSMnx

自闭症网瘾萝莉.ら 提交于 2020-03-22 09:48:26
问题 I'm playing around with OSMnx package in order to solve the following task: - there is a point X on the map defined by latitude and longitude - we need to detect a polygon that contains that point X and is constrained by the neighboring roads - so basically the point X is inside the polygon and the neighboring roads will be borders of that polygon. So far I've managed only to plot the visualization of the graph on the map and find the closest edge/node to point X. In the attached image I've

How to open a cluster from event in leaflet to bounce marker?

ε祈祈猫儿з 提交于 2020-03-05 06:08:13
问题 I have problem with bounce marker. When marker is a single marker, everything is ok. But markers in cluster, how i Can open this cluster, and show selected marker? I used options disableClusteringAtZoom: but this options declustering markers, when one marker bounce, other markers are visible. I used plugin markerClusterGroup for leaflet and smoothMarkerBouncing private drawSelectedElement(animate: boolean): void { _.forEach(this.selectedMarkers, (selectedMarker: OpMarker) => { if

How to get points from OpenStreetMap of a certain country?

喜欢而已 提交于 2020-02-05 08:42:27
问题 i'm trying to get the list of all schools in my country, and after several tries i write the following query that works with no errors on http://overpass-turbo.eu: /* This has been generated by the overpass-turbo wizard. The original search was: “amenity=school”=“yes” */ [out:json][timeout:60]; // gather results ( // query part for: “amenity=school” node[amenity=school]({{geocodeBbox:Italia}}); way[amenity=school]({{geocodeBbox:Italia}}); relation[amenity=school]({{geocodeBbox:Italia}}); ); /

Use OpenStreetMap to get the country name for a given set of GPS coordinates

耗尽温柔 提交于 2020-02-03 08:40:12
问题 Does anybody know if there is a way to use OpenStreetMap (offline or API) to get the country name for a given set of GPS coordinates? I'm not interested in using the Google or Geonames API mentioned here: Country name for GPS coordinates 回答1: Take a look at Nominatim or one of the other OSM-based search engines (geocoders). 来源: https://stackoverflow.com/questions/45824949/use-openstreetmap-to-get-the-country-name-for-a-given-set-of-gps-coordinates

Filtering intersections to (4-way intersections, T-junctions, and other ) using Overpass API in a given bounding box

亡梦爱人 提交于 2020-02-01 09:35:23
问题 There is a script Here that can process the data from OSM to detect intersections in a given bounding box. It works by getting all the ways in a given bounding box and then finding other ways that share common nodes with these roads. Here is the query that does that, way ["highway"] ["highway"!~"footway|cycleway|path|service|track|proposed"] (, , , ) ->.relevant_ways; foreach.relevant_ways->.this_way{ node(w.this_way)->.this_ways_nodes; way(bn.this_ways_nodes)->.linked_ways; way.linked_ways [