openstreetmap

How do I efficiently store all OpenStreetMap data in an indexed way?

萝らか妹 提交于 2019-12-05 10:38:24
Note: While I target Windows Phone 7, it doesn't introduce anything besides a size restriction. In an attempt to write a GPS / Routing / Map application for the Windows Phone 7, I'm trying to attempt to use OpenStreetMap for this and I want to get my data stored in a SQL Server Compact Edition database on my Windows Phone 7 . This is giving me a lot of trouble so I'm getting clueless what the right way is... Here is my progress: I've downloaded Belgium.osm.pbf , which contains all the Belgium OSM data in PBF format . Note that Belgium isn't that large, it's the country I live in so it seems as

open street maps (osmdroid) shows grey tiles not map in PC

我的未来我决定 提交于 2019-12-05 08:31:11
I am using osmdroid to get open Street maps in my app. I had build my project with the needed jars (osmdroid) and added all needed permissions in the manifest. But when I try to debug my app in android emulator (adt eclipse) I am not able to see the map, only grey tiles. My project is working fine because if I debug in a smartphone I am able to see the map, the problem is only with the emulator. I have done some research but I only found information of google maps solutions but not open street maps (osmdroid). Does somebody know how to solve this issue? this is how I show the map in xml file

Detect if the OSM Mapview is still loading or not in android

≯℡__Kan透↙ 提交于 2019-12-05 08:15:58
I have included Open Street Maps in my android application. In the mapview, user should be able to capture the screen after the map is fully loaded. But currently user can capture the image even when the mapview is still loading. Can someone tell me how to detect when the mapview is fully loaded? Below is my code to load the mapview: public class MainActivity extends Activity { MapView mapView; MyLocationOverlay myLocationOverlay = null; ArrayList<OverlayItem> anotherOverlayItemArray; protected ItemizedOverlayWithBubble<ExtendedOverlayItem> itineraryMarkers; @Override protected void onCreate

'Expected String or Unicode' when reading JSON with Pandas

筅森魡賤 提交于 2019-12-05 08:12:10
I try to read an Openstreetmaps API output JSON string, which is valid. I am using following code: import pandas as pd import requests # Links unten minLat = 50.9549 minLon = 13.55232 # Rechts oben maxLat = 51.1390 maxLon = 13.89873 osmrequest = {'data': '[out:json][timeout:25];(node["highway"="bus_stop"](%s,%s,%s,%s););out body;>;out skel qt;' % (minLat, minLon, maxLat, maxLon)} osmurl = 'http://overpass-api.de/api/interpreter' osm = requests.get(osmurl, params=osmrequest) osmdata = osm.json() osmdataframe = pd.read_json(osmdata) which throws following error: ---------------------------------

zoom mapView to a certain bounding box on osmdroid

南楼画角 提交于 2019-12-05 08:07:06
I want to use the zoomToBoundingBox method to zoom a map to a specific bounding box. The method does nothing but display the map on zoom level 0. In the mapView.java source code I found this: /** * Zoom the map to enclose the specified bounding box, as closely as possible. * Must be called after display layout is complete, or screen dimensions are not known, and * will always zoom to center of zoom level 0. * Suggestion: Check getScreenRect(null).getHeight() > 0 */ I checked getScreenRect(null).getHeight() > 0 and it gives me false. How do you complete display layout programmatically? What can

Self hosting GraphHopper Directions API

人盡茶涼 提交于 2019-12-05 07:47:40
We are looking for an offline routing and reverse geocoding service. GraphHopper advertises that its Directions API can be self-hosted : GraphHopper Directions API Self-Hosting / On-Premises The Directions API comes as a cloud service where you pay on-demand. The API is also available as on-premises solution (self-hosted), which gives you maximum performance, customization possibilities, independence; all in your hands! After installing GraphHopper on my local instance as per these instructions , I am able to perform routing queries successfully through the localhost HTTP API. How do I get

How to get the Lat, Long of a clicked location using leaflet Api

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-05 03:58:56
I am using OSM with leaflet API. Now I want to get the lat and long of a clicked location. I meant something similar to this: http://openlayers.org/dev/examples/click.html map.events.register("click", map, function(e) { var position = map.getLonLatFromPixel(e.xy); alert("Lat, Lon : "+position.lon.toFixed(3),position.lat.toFixed(3)); }); This code in open layers helps to get the lat,long values - looking for something similar using leaflet. Any help would be really great. Thanks in advance map.on('click', function(e) { alert(e.latlng); }); Docs 来源: https://stackoverflow.com/questions/13175101

how to find intersections from OpenStreetMap?

北城余情 提交于 2019-12-05 03:09:30
问题 How to extract intersections in the OpenStreetMap? I need the longitude and latitude of the intersections, thanks! 回答1: There has been a similar question here. There is no direct API call to retrieve intersections. But you can query all ways in a given bounding box (for example directly via the API or via the Overpass API) and look for nodes shared by two or more ways as explained in the other answer. 回答2: Try the GeoNames findNearestIntersectionOSM API: http://api.geonames.org

Draw a map with gps markers and save this image to file

一笑奈何 提交于 2019-12-05 01:11:26
问题 I have some GPS position recordings, which I want to draw into a map (e.g. OpenStreetMap) and save this as an image file. I'm using python. I've found osm-gps-map as a candidate library to do the visualization, but apparantly the API lacks some functionality to satisfy all of my needs. What I need is a library that does: draw stuff into a map (e.g. an OSM-based map), i.e. a list of GPS positions. automatically adjust view (scale/position) to fit in all drawn positions save this view to an

OpenLayer/OpenStreetMap Hike&Bike Map

风格不统一 提交于 2019-12-04 19:29:47
In my SPA i want to inlcude openstreetmap via OpenLayer per JavaScript. This works fine. But how can i change the map type to the Hike&Bike Map like here: http://hikebikemap.de/ ? currently i am using the following code: var zoom = 11; var fromProjection = new OpenLayers.Projection('EPSG:4326'); var toProjection = new OpenLayers.Projection('EPSG:900913'); var markers = new OpenLayers.Layer.Markers( 'Markers' ); var map = new OpenLayers.Map(); var mapnik = new OpenLayers.Layer.OSM(); map.addLayer(mapnik); map.addLayer(markers); var position = new OpenLayers.LonLat(lng, lat).transform(