openstreetmap

Convert lat/lon to zipcode / neighborhood name

走远了吗. 提交于 2019-11-30 09:50:25
I have a large collection of pictures with GPS locations, encoded as lat/lon coordinates, mostly in Los Angeles. I would like to convert these to (1) zipcodes, and (2) neighborhood names. Are there any free web services or databases to do so? The best I can come up with so far is scrape the neighborhood polygons from the LA times page and try to find out in which polygon every coordinate is. However this might be quite a lot of work, and not all of my coordinates are in LA. As for the zipcodes, this 2004 database is the best I can find, however zipcodes are encoded as a single coordinates

Finding nearest street given a lat-long location

半城伤御伤魂 提交于 2019-11-30 09:39:36
Is there any such API where given a location (in terms of latlong), I could find whether the given point is on road/street or not. And if possible also gives me nearest street/road to that location. I found API from [Find nearby Streets] -> http://www.geonames.org/maps/us-reverse-geocoder.html#findNearbyStreets , but it just gives solution for US. Help me if u know of any better solution/algorithm. ( I am particularly interested in India.) Mathias Schwarz You can use the Google Maps Geocoding API which does exactly that: https://developers.google.com/maps/documentation/geocoding/intro Take a

Import OpenStreetMap-Data (OSM-File) to a MySQL-Database / SQL-File

烈酒焚心 提交于 2019-11-30 09:04:02
问题 Intro I downloaded and extracted the OpenStreetMap Source File (See here). I have a 400GB XML-sourcefile now, and i would like to (1) insert the data in a MySQL Table OR (2) export this to an SQL file, doesn't matter. What I already did / tried I have the XML File^^ and the MySQL Server (5.6.14) I found the tool Osmosis, to convert OSM data and I installed it I read this post: Read cities and streets into a database without api I also read this post: Is this config is capable to import

Android custom control to display map tiles [closed]

早过忘川 提交于 2019-11-30 07:41:42
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 7 years ago . I have on my server map tiles sorted on a folder structure like OpenStreetMap (OSM) uses. I need to be able to display these tiles, zoom in/out, pan and rotate the map. I wouldn't start from the scratch to create

OSMNx : get coordinates of nodes using OSM id

£可爱£侵袭症+ 提交于 2019-11-30 05:45:51
问题 I used the Python library OSMNx to draw an optimal route between several steps of a city trip. The final variable is a list of OSM ids. Now, I'm trying to save this route as a shp or json files. The problem is that I need for that the latitude/longitude of each node, but I didn't found an OSMNx function to do that. I tried get_route_edge_attributes (but coordinates are not a valid attribute for this function). There is any way to get coordinates of an OSM node with this single id ? Thanks in

Map Tile Caching for Offline Viewing

Deadly 提交于 2019-11-30 04:49:50
I'm trying to build an application that will use open source maps from Open Street Maps (though the concept should be applicable to any map provider). The application will enable the user to specify a number of waypoints along a route prior to departure. Because I don't have a data plan for my cell phone (and because rambling in the countryside rarely gives you a good connection), I want to be able to pre-load the relevant map tiles for the waypoints and/or route before departure so that maps can continue to be used without a data connection. My initial thoughts are to download the required

Parsing a large .bz2 file (40 GB) with lxml iterparse in python. Error that does not appear with uncompressed file

烈酒焚心 提交于 2019-11-30 03:53:14
问题 I am trying to parse OpenStreetMap's planet.osm, compressed in bz2 format. Because it is already 41G, I don't want to decompress the file completely. So I figured out how to parse portions of the planet.osm file using bz2 and lxml, using the following code from lxml import etree as et from bz2 import BZ2File path = "where/my/fileis.osm.bz2" with BZ2File(path) as xml_file: parser = et.iterparse(xml_file, events=('end',)) for events, elem in parser: if elem.tag == "tag": continue if elem.tag ==

How to identify Leaflet's Marker during a `popupopen` event?

喜夏-厌秋 提交于 2019-11-30 00:43:56
问题 when a marker is clicked, I need to execute some code that finds the id corresponding to the marker being clicked , retrieves data from backend API, then adds the newly retrieved data to the content of the popup that will open. The only way that is able to listen to a click event on the marker is map.on('popupopen', function(e){ // How to retrieve marker? // eg: Assign an id on creation, retrieve it now during popupopen };) How can I find out which marker this is? Is it possible to add an id

Reverse geo location using OpenStreetMap [closed]

爷,独闯天下 提交于 2019-11-29 20:16:39
I have used OpenStreetMap in my ongoing website. I have developed website using PHP. My requirement is to get ADDRESS based on Geo Location(Latitude & Longitude). Is there any OpenStreetMap API available to get location info based on Lat/Lon? Thanks, Vishal Parmar There are multiple reverse geocoding APIs available for OpenStreetMap (since the data is open-source, anyone can build one). The two that I would recommend you investigate further are: Nominatim, run by a member of the OSM community as a volunteer project. Reverse Geocoding documentation CloudMade Geocoding, run as a commercial

Get exact geo coordinates along an entire route, Google Maps or OpenStreetMap

柔情痞子 提交于 2019-11-29 20:10:33
Suppose I have a route defined from one town to another. From the Google Maps API I can recover a route between the two. However, the route returned from Google is a driving route that includes geo-coordinates only at places where there is another step in a leg (for example, where I have to turn from one highway to another). What I need is geo-locations (lat/long) along the entire route, at specific intervals (for example, every 1/4 mile or 100m). Is there a way to accomplish this via the Google Maps API / web services? Or would the OpenStreetMap database be the way to do it? Kind regards,