openstreetmap

How to extract and visualize data from OSM file in Python

一个人想着一个人 提交于 2019-12-22 18:42:49
问题 I have downloaded an OpenStreetMap file on my desktop , and I have used my OSM file in the jupyter notebook. My code: import xml.etree.cElementTree as ET osm_file = "ahmedabad_india.osm" for event, elem in ET.iterparse(osm_file, events=("start",)): print(elem) # prints the Element 'osm' at 0x03A7DC08> #<Element 'bounds' at 0x03A7DDA0> #<Element 'node' at 0x03A7DE90> #<Element 'tag' at 0x03A7DF08> and so on ... I'd like to see the contents of all the tags i.e. <'node', 'id', 'name', ...> and

python osmnx - extract only big freeways of a country

不想你离开。 提交于 2019-12-22 17:54:25
问题 I know it is possible to extract the road network of a city via the OSMNX python package. See details at https://geoffboeing.com/2016/11/osmnx-python-street-networks/ . paris_network = ox.gdf_from_place("Paris") But, let's say I do not want that level of high details, but rather only big freeways of a whole country. I'm looking for something like : france_big_expressway_network = ox.gdf_from_place("France", road_type = "freeway") I guess it might comes from the "infrastructure" argument but

Using osmosis to convert POSTGIS Table to .OSM

拥有回忆 提交于 2019-12-22 09:15:10
问题 I am using osmosis 0.42 and PostGIS 2.0.1 and I'm trying to export some postGIS tables to .OSM xml files. I am using the --read-pgsql command to read from postgis (instead of --read-apidb as it throws an error while connecting to the DB ).. Unfortunately running: osmosis --read-pgsql host="x" database="x" user="x" password="x" --write-xml file="myfile.osm" produce the following error: Task 2-write-xml does not support data provided by default pipe stored at level 1 in the default pipe stack

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

只谈情不闲聊 提交于 2019-12-22 06:49:55
问题 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

importing osm file into a postgres/postgis database

天涯浪子 提交于 2019-12-21 11:43:19
问题 Im using the tool osm2pgsql to import an osm file into a postgres database using phppgadmin as the administrative tool. i have only downloaded a small town from osm in xml format and im having trouble importing it using the terminal on mac. Im a bit of a noob at this so any help would be greatly appreciated. Ive looked at several articles but none provide the clarity i need in order to fulfill my needs. Thanks im getting this error could be something small not sure.. Using projection SRS

Google Maps, Bing Maps, OpenStreetMaps and MapQuest limitation

那年仲夏 提交于 2019-12-21 04:58:11
问题 I'm very confused reading the online term of use of some Online Map Service (like Google Maps, Bing Maps, OpenStreetMaps and Mapquest)... There is a way to use Google or Bing Maps on a website for non-commercial or commercial pourpose without any daily limitation of request?? What kind of Api I can use for free without any limitation of use or request, if I want to see a map on my site with several point of interest inserted by me?? I have read that in free version of Google or Bing some ads

Offer packages of map tiles for offline use

≡放荡痞女 提交于 2019-12-21 03:12:11
问题 I'm making a web application that has to work offline. So far everything works and my last step is to take the map tiles offline. Luckily I know exactly what areas of the map will need to be accessible to users, so I don't have to allow caching of millions of tiles. The map is split into areas and so the idea is to offer the tiles for these areas as downloadable 'packages.' For instance, when I'm online, I go to the 'tile packages' page, which offers downloads for several areas. I choose the

Blurred custom tiles on Android Maps V2

时光怂恿深爱的人放手 提交于 2019-12-21 02:41:20
问题 I want to show a CustomOverlay on a Google Maps V2. The loading of the tiles works as expected, the only thing is, that the shown tiles are not appearing to be sharp at all, kind of blurry. Google did not get me to an usable answer. I took the approach of adding classical 256px x 256px tiles for the TileProvider. I managed to get a tile source where the images were @2x (retina), which made the whole visual experience much sharper, but I would rather not use this source, as the data transfer

Restricting the area the user can go to on Mapview

限于喜欢 提交于 2019-12-21 02:03:22
问题 I am using a customised version of the mapview (OSMDroid version). I am using custom tiles within it and I only want the user to be able to view the area where I have my custom tiles. Is there a way to set the boundary lat longs so when they pan the map it doesn't go past these boundaries? 回答1: Update: I know this is an old question, but osmdroid now has a setScrollableAreaLimit() method that will achieve what you are looking for. There is also a setMinZoomLevel() and setMaxZoomLevel() method

How can I display OSM tiles using Python?

谁说胖子不能爱 提交于 2019-12-20 08:31:06
问题 I'm in the process of generating tiles with generate_tiles.py and I'd like to write a Python app to display them instead of having a web interface. Does anything like that already exist or is there information somewhere on how to write such an app myself? 回答1: You can look/edit your map using a desktop application like Tilemill or QGIS (I can't really guess why are you generating tiles if it is not for a web application). Tilestache has an internal webserver you can use for testing, it's easy