Tag Info

Hot answers tagged

4

This is not an R solution, but Quantum GIS (QGIS) is a great way to achieve what you want. You can simply load the .osm file (Add Vector tool), right-click it in the Table of Contents and Save As ESRI Shapefile. QGIS may crash with such a large extract, so to avoid this you can uses OSM Tools like the OverPass API to download only what you need using ...


3

I just found a solution. There is also an active psycop2 connection. When I commit it or close the connection before osm2pgsql runs and open it afterwards again it works. Probably osm2pgsql can't access to the database if this connection is open.


3

Try the OSM Overpass API a try at http://overpass-turbo.eu/. If you don't know the key/value pairs you are looking for or the correct JavaScript syntax, just click the "Wizard" button, type in the feature types you are after. it will build the correct JS sytax for you. Then just click the "Run" button to return the highlighted features in your current ...


2

I have a script I use to take a list of addresses and geocode them to points in a new feature class. You just need to download the requests module and supply a service url for a Geocoding REST service. I do not really know of any open source geocoding services though. import requests import json import arcpy import os import sys arcpy.env.overwriteOutput ...


2

@jazzurro, you perfectly can do this with R, just look up osmar package! Read the osmar documentation (osmar.r-forge.r-project.org/RJpreprint.pdf). At pages 11 pp. you can find a detailed example for extracting roads/highways by the according tags for munich.osm! After pulling and extracting the data from a planet file for Australia you can convert to any ...


2

Finnish Airports Isochrones using the Interpolation plugin Site analyses can benefit greatly from using “drive-time” isochrones to define the study area. Drive time isochrones are often significantly different from simple buffer areas which disregard natural barriers such as rivers or slow roads. ...


2

Personally, I am still using the May 2013 build of Dominik Perpeet from http://www.customdebug.com/osm2pgsql/ but the server is currently down. You can follow the latest development of the Windows build at https://github.com/openstreetmap/osm2pgsql/issues/17 The issue features three different versions, two from onepromise via ...


2

For viewing bus routes you can take a look at OSM-based maps which visualize bus routes. The OSM wiki has a list of public transport maps, for example the transport layer at the front page or the Öpnvkarte. For retrieving bus route data you can use the Overpass API or the nice frontend overpass turbo. Use this query for retrieving all bus routes in the ...


2

You should use osm2pgrouting to import the osm data into you DB, it's a command line tool that will automatically create the appropriate graph for pgrouting. http://www.pgrouting.org/docs/tools/osm2pgrouting.html


2

You might want to look at Metro Extracts: https://mapzen.com/metro-extracts/ You can download updated (weekly) shapefiles of OSM features for many metro areas all over the globe, as .shp or GeoJSON. From there, you can drop it into QGIS or some other desktop GIS and apply the appropriate definition query, to get the bicycling layer. This should get you ...


2

There are two broad ways to do this - one is to piggyback on someone else's infrastructure. For instance, the overpass turbo api has a query already baked in to get cycle routes and this can be exported as geojson (see "load" tab). This is great for one-off queries and where you have a small amount of data, but you are reliant on the generosity of others so ...


2

(I edited my answer for your follow-up questions) You have to use the order in which the node IDs are referenced by the corresponding <way> element in the XML file. In contrast, the order in which the <nodes> elements appear in the XML file is completely irrelevant. Furthermore, as you already discovered, a relation can contain multiple ...


2

The 770.osc.gz file lives in the same directory as osmconvert.exe and the output extract.05m should populate in the same directory as the osmconvert.exe exists. That's not what your code is saying. The code says "execute osmconvert.exe from inside c:\temp\ but read 770.osc.gz and write extract.o5m from the current working directory". If you want ...


1

Query for ST_IsValid([your geometry]) = 'f'


1

Sure you can. Its as easy as loading the map. See this example: http://dev.openlayers.org/examples/osm-google.html Code: (Place this after the OpenLayers map) var gmap = new OpenLayers.Layer.Google("Google Streets"); map.addLayer(gmap); and load the folowing javascript: <script ...


1

When you use OSM data for pgRouting, then you need to use special import tools. This will automatically solve your problem. To get started I highly recommend you the pgRouting workshop, because it will exactly guide you to get pgRouting work with OSM data: http://workshop.pgrouting.org/


1

These pages on the OSM Wiki will help you determine the necessary tags for the data you need: Bus Stop, Stations, etc Bus Routes You can see what actual data is available in your area of interest by using the OSM Overpass Turbo Tool. Use the Wizard to create a subset of the available data using the tags described above


1

For OSM: (from: http://wiki.openstreetmap.org/wiki/Slippy_map_tilenames) X and Y X goes from 0 (left edge is 180 °W) to 2zoom − 1 (right edge is 180 °E) Y goes from 0 (top edge is 85.0511 °N) to 2zoom − 1 (bottom edge is 85.0511 °S) in a Mercator projection Meaning OSM uses a NW origin. Your Mbtiles would be using a SW origin looking at your numbers, ...


1

There are 2 Versions of the Community License COMMUNITY EDITION (Licensed Data) A popular free option among developers, the Community Edition using Licensed Data offers an industry-leading platform that includes the developer tools and resources needed to build rich and engaging mapping applications. General restrictions and requirements regarding the use ...


1

I don't know the schema of the OSM tables, but you asked for a query like this: DELETE FROM labels WHERE label_id IN ( SELECT label_id_2 FROM ( SELECT a.label_id AS label_id_1, b.label_id AS label_id_2 FROM labels AS a, labels AS b WHERE STDWithin(a.the_geom,b.the_geom, 0.001) and a.street = b.street and a.label_id != b.label_id ) ...



Only top voted, non community-wiki answers of a minimum length are eligible