openstreetmap

OSM to Google Maps polygons

白昼怎懂夜的黑 提交于 2019-11-27 07:52:07
问题 I want to draw a city district area on Google Maps using Polygon class and an array of lat/lng coordinates. OpenStreetMap provides me all data I need — if I type some district name I can get useful data in OSM XML format, for example OSM drawn polygon of “Vecmilgravis” district in Riga, Latvia and it's data in OSM XML format. The problem is all those node nodes are sorted in some weird order, so if I just extract all lat and lng pairs and make an coordinates array for Google Maps Polygon

Python ElementTree support for parsing unknown XML entities?

只愿长相守 提交于 2019-11-27 04:24:30
问题 I have a set of super simple XML files to parse... but... they use custom defined entities. I don't need to map these to characters, but I do wish to parse and act on each one. For example: <Style name="admin-5678"> <Rule> <Filter>[admin_level]='5'</Filter> &maxscale_zoom11; </Rule> </Style> There is a tantalizing hint at http://effbot.org/elementtree/elementtree-xmlparser.htm that XMLParser has limited entity support, but I can't find the methods mentioned, everything gives errors: #!/usr

leaflet map shows up grey

假装没事ソ 提交于 2019-11-27 03:47:30
问题 I'm starting leaflet.js with the quickstart but my map shows as grey... is there something I'm missing? script.js: var leafletMap = L.map('leafletMap').setView([51.505, -0.09], 13); L.tileLayer('http://{s}.title.cloudmade.com/' + API_KEY + '/997/256/{z}/{x}/{y}.png', { attribution: 'Map data © [...]', maxZoom: 18 }).addTo(leafletMap); // marker var marker = L.marker([51.5, -0.09]).addTo(leafletMap); style.css: #leafletMap { height: 200px; width: 200px; } index.html: <!DOCTYPE html> <html>

Get list of all intersections in a city

心不动则不痛 提交于 2019-11-27 03:31:24
问题 What is the best source and way to get a list of all intersections in a major city? 回答1: If one doesn't mind a few false positives the following Overpass API script gets road intersections out of OpenStreetMap data pretty easily: http://overpass-turbo.eu/s/QD (the script can't detect false intersections – where only two lines meet, though, e.g. when a road is represented by multiple way objects in the OSM data) In case that the script goes offline a more readable version directly here:

Min/max zoom level in OpenLayers

二次信任 提交于 2019-11-27 02:36:04
问题 I'm using OpenLayers to display a map in a web page. I am using tiles from CloudMade, but the same issues occur with the Mapnik tiles from OpenStreetMap. I'm trying to restrict the map so that the user cannot zoom all the way out to world view -- I want them to stay at roughly a city level zoom at minimum. I have tried using the minZoomLevel / maxZoomLevel / numZoomLevels properties; only the maxZoomLevel and numZoomLevels properties seem to work, whereas the minZoomLevel property seems to be

Draw Line between two Geo Points in JMapViewer

隐身守侯 提交于 2019-11-27 02:11:47
I'm working with OpenStreet Maps in Java with JMap Viwer http://wiki.openstreetmap.org/wiki/JMapViewer I can load the maps and everything ok but I don't know how to draw a line between two points from a latitude and longitude. Any body know the function to draw this kind of lines? Thank you. The addMapPolygon() method of JMapViewer works for this, but paintPolygon() silently rejects a polygon having fewer than three vertices. For a line between two points, just repeat the last Coordinate . Coordinate one = new Coordinate(...); Coordinate two = new Coordinate(...); List<Coordinate> route = new

open street maps api for android

北战南征 提交于 2019-11-27 00:07:07
问题 Does anyone know where I can find the open street maps api for android? I have searched the site and all I can see is other peoples implementations of it. I'm looking for one which can be integrated into another app and fully customized. 回答1: You can integrate OSM by using the Osmdroid API. This gives you functionality very similar to Google maps but you can also use OSM tiles offline if you prepare the tiles with Mobile Atlas Creator (MOBAC) See Osmdroid home page (GitHub) You just need the

RoadManager for osmdroid error

霸气de小男生 提交于 2019-11-26 21:21:04
问题 I am following a tutorial here https://code.google.com/p/osmbonuspack/wiki/Tutorial_1 but I have encountered an error that it doesn't show the correct route correctly. It just shows a straight line from Point A to Point B. What I want to achieve is to show the correct route from these points. I'm guessing the error is that it doesn't recognize any nodes to go through. A similar question has been also asked and I am assuming I have the same problem if I haven't explained my question well.

How to create map tiles from OpenStreetMap offline, display it on Android?

China☆狼群 提交于 2019-11-26 17:59:23
问题 What I want is to display a simple offline map using OpenStreetMap. I cannot find in the web the right tools to create map tiles and use it to display a map in Android. I have downloaded different resources but it seems that I don't have any idea where to start. I want to integrate images from OpenStreetMap using JOSM but i don't know if I can use it on Android. Can I use Mapnik? Your help will a great thank you. 回答1: I'm currently developing (my first) Android application using the

时空大数据集列表

耗尽温柔 提交于 2019-11-26 15:42:26
时空大数据集列表 每个人都在讲大数据,不管见过没见过的,不管处理过还是没处理过的,甚至是想过和没想过的,来点靠谱的吧。 公开的数据链接,见https://github.com/caesar0301/awesome-public-datasets 说好的时空大数据呢? 来访问下面链接, GIS/Environment BODC - marine data of ~22K vars Cambridge, MA, US, GIS data on GitHub EOSDIS - NASA's earth observing system data Factual Global Location Data Geo Spatial Data from ASU Geo Wiki Project - Citizen-driven Environmental Monitoring GeoFabrik - OSM data extracted to a variety of formats and areas GeoNames Worldwide Global Administrative Areas Database (GADM) Homeland Infrastructure Foundation-Level Data Integrated Marine Observing System