openstreetmap

OSM Mapnik Integration

南楼画角 提交于 2019-12-11 07:15:56
问题 I am Trying to Implement OSM and Mapnik. My requirement is to show a Custom map to the end user(First layer of Basic Map and Second Layer of Map generated by the Data). I've Started by implementing Demo Examples from Mapnik but didn't get enough Idea. Here is what I've tried, App.js var mapnik = require('mapnik'); var fs = require('fs'); /// Register fonts and datasource plugins mapnik.register_default_fonts(); mapnik.register_default_input_plugins(); var map = new mapnik.Map(1280, 720); map

Offline routing and navigation in OSMDroid, How can I get this feature?

跟風遠走 提交于 2019-12-11 06:46:31
问题 I am developing Android app with OSM which support offline routing and navigation. I want to integrate the offline routing and navigation in OSM for Android app. There are lots of routing software and I am confused which one is better. Can anyone compare the feature of routing and navigation of different routing providers? 回答1: You can find a comparison of routing services here: https://github.com/MKergall/osmbonuspack/wiki/WhichRoutingService But if you want offline routing, GraphHopper will

Administrative relations of a place with openstreetmap

和自甴很熟 提交于 2019-12-11 06:21:41
问题 I did a lot of research about how to use overpass-api tried a lot of things on http://overpass-turbo.eu/ but i can't find the way to get the result i'm expecting ... I would like with a query, to find all the relations a place has but only administrative relations (department of the place, region of the place, country) everyhting that is assimilated to an "AdministrativeArea" Tried this with both nominatim and the overpass_api If any of you guys have an idea Thanks ! 回答1: Just use the

Script Error: Exception in thread “main” java.lang.NoClassDefFoundError: org/codehaus/classwor lds/Launcher

假装没事ソ 提交于 2019-12-11 06:04:19
问题 I'm running OpenStreetMap's Osmosis in Windows XP to cut a subset of data from a larger set. In various incarnations, the program either hangs or gives me the following error: C:\Documents and Settings\mmorisy\tools>osmosis.bat --read-xml enableDateParsing =no file="us_zipcodes.osm" --log-progress interval="10" --bounding-box top=43.22 868195 left=-73.5981635 bottom=41.2283584 right=-69.814204 --write-xml file="mas s_zipcodes.osm" Exception in thread "main" java.lang.NoClassDefFoundError: org

Strange arctefact in UIImage juxtaposition on retina display

一曲冷凌霜 提交于 2019-12-11 05:50:03
问题 I have a very strange problem in my app which only happen on Retina display and not simulator . I developped a set of applications with embedded openstreetmaps tiles (pieces of map). In each app, I have a lot of pieces of map (256px/256px) that I display in a UIScrollView. It works perfectly on non-retina devices and on retina simulator . The problem : each tile appear with the last row of pixel in a randow color (most time it's black) To illustrate, I made to screenshot of the same place,

Query Overpass turbo by latitude longitude

筅森魡賤 提交于 2019-12-11 05:15:28
问题 How do I ask overpass turbo to give me the way tags corresponding to a set of latitude longitude coordinates? thanks! This is what i tried so far: [out:json][timeout:25]; (way(around:1.0,52.004940, 4.369381)); (._;>;); out tags; But there are 2 problems here. 1. I get a list of different nodes and ways. But i actually only want the way where there is a speed limit given 2. I don't know how to write a query for a whole list of coordinates. Not sure if this is even possible. 回答1: Here's how the

Check which edge attributes exist (NetworkX)

丶灬走出姿态 提交于 2019-12-11 05:02:05
问题 I'm using OSMNX to load an OpenStreetMap file of a city into NetworkX. Is there any way for me to see which attributes are stored in the graph? I believe OSMNX might for instance store the length of a street, or the type of road. I want to know what the names of the attributes are that I can access. 回答1: You could either display the edges to see what's in them: import osmnx as ox G = ox.graph_from_place('Piedmont, California', network_type='drive') print(G.edges(keys=True, data=True)) Or you

MapController setCenter doesn't work

霸气de小男生 提交于 2019-12-11 04:07:02
问题 I've got a GeoPoint gPt with 55.790833, 49.114444 coordinates. I add that thing to map and try to center. But my marker is not in the center of map (it's a little bit higher). What is wrong? This is my code: mResourceProxy = new ResourceProxyImpl(this.getActivity().getApplicationContext()); mapView = (MapView) v.findViewById(R.id.mapview); mapView.setTileSource(TileSourceFactory.MAPNIK); mapView.setBuiltInZoomControls(true); mMapController = mapView.getController(); mMapController.setZoom(15)

Getting Streets of a specific postcode using Open Street Maps

不打扰是莪最后的温柔 提交于 2019-12-11 02:56:50
问题 I want to write a code that has the Countrycode and Postcode as an input and the ouput are the streets that are in the given postcode using some apis that use GSM. My tactic is as follows: I need to get the relation Id of the district. For Example 1991416 is the relation id for the third district in Vienna - Austria. It's provided by the nominatim api: http://nominatim.openstreetmap.org/details.php?place_id=158947085 Put the id in this api url: http://polygons.openstreetmap.fr/get_wkt.py?id

Leaflet in R: SetView based on range of latitude and longitude from dataset

微笑、不失礼 提交于 2019-12-11 02:35:48
问题 In ggmap, you can set the view of the map based on longitude and latitude of input data, where two columns of csv are Longitude and Latitude, i.e. sep <- read.csv("31R_SEP_assets_csv.csv") # get the map bbox <- make_bbox(sep$Longitude, sep$Latitude, f = 0.3) map <- get_map(bbox) I am searching for similar function in leaflet, but so far, I only find setView() that takes in an actual value for latitude and longitude, i.e. m <- leaflet() %>% setView(lng = -71.0589, lat = 42.3601, zoom = 12) m %