Tag Info

New answers tagged

2

The best way is to use the planet.osm.pbf dump, which is a binary format and substantially faster than bzipped XML. You should also use Osmconvert instead of osmosis for a task like this. A suitable command would be osmconvert planet-latest.osm.pbf -b=10.5,49,11.5,50 -o=nuernberg.osm.pbf This will create a PBF file, which is quicker to process than ...


1

Frederik Ramm answered on help.openstreetmap.org (edited by SomeoneElse): --merge can only merge two pipes, not more; you must use two instances of --merge to merge three pipes. Try this: osmosis \ --read-pbf switzerland.osm.pbf --tf accept-nodes sport=* --tf accept-ways sport=* --tf reject-relations \ --read-pbf file=switzerland.osm.pbf --tf ...


1

The bbox for osmosis should have the order left - right - top - bottom. Note that West of Greenwich has to be negative. Alternatively, you can write something like --bb left=30. right=34. bottom=53. top=57. to avoid any misunderstanding. See http://wiki.openstreetmap.org/wiki/Osmosis/Detailed_Usage_0.44#--bounding-box_.28--bb.29 EDIT The Map-Writer ...


1

If I understand correctly what you are looking for is something a bit like what is possible using Google Maps with its user added markers and lines. The reason that Google can do this is that they offer a service costing lots of money - but paid for by advertisers. OSM is different. There are disadvantages - and advantages. The fact that it's a lot harder ...


0

ArcGIS has a tool called Dissolve that can do this, though from what I read the QGIS equivalent only does polygons. That article mentioned you can still do it with "Vector > Geometry Tools > Singleparts to Multiparts" The (much) slower alternative would be an attribute selection for each name and then merging the geometry of those records.


1

With version 10.2 for ArcGIS on windows 8.1, I was not able to add the toolbox. This is because the installer did not copy the 'data' folder. To get the data folder, I had to download the source code from github, and place it into the directory C:\Program Files (x86)\ESRI\OSMEditor


0

To load OSM data through Overpass API in Leaflet layer using this plugin: http://labs.easyblog.it/maps/leaflet-layerjson/examples/overpass.html


0

Well, there are just very few .NET components esp. for routing with OSM: http://wiki.openstreetmap.org/wiki/Frameworks http://wiki.openstreetmap.org/wiki/Routing/offline_routers In short: I guess a wrapper is a better way to deal with your requirements, esp. as you seem to be lucky with MoNav in general.


0

If you type "a" and hit enter, it brings up some information about the program and it will ask you questions to guide you through converting your files. Also, the .exe has to be in the same folder as the source data. Hope that helps. . .


2

--write-pgsql wants to talk to a Postgis database. You have not specified any database connection for that task, e.g.: osmosis --read-pbf file=switzerland.pbf --tf accept-nodes shop=supermarket --write-pgsql host=128.178.12.34 database=myDatabase user=myUsername password=myPassword Furthermore, keep in mind that restaurants can also be modelled as closed ...


1

Try this post: How to manage the osmosis command line? Pay attention to comments where I solved some troubles. Here I have some tricks too: How to extract primary and secondary roads from OSM data?


1

ST_Length, when called on a geometry, reports in units of the spatial reference system. For EPSG:900913/EPSG:3857, the units are in Mercator meters, not in meters. At all points on the globe, a Mercator meter is at most 1 real meter. To do this there are two possible fixes Transform to an appropriate projection for your area. UTM, state plane and albers ...


1

osm2pgsql is a good option for working with OpenStreetMap data like this, particularly if you have enough data you need a database to store it. You would find building information in planet_osm_polygon. You could get it using a query like SELECT * FROM planet_osm_polygon WHERE building IS NOT NULL and building != 'no'. For addresses you may find that ...


0

Make sure that your version of osm2pgsql is built for the version of postgis you have. There were some major changes in postgis 2.0. It might help to run the legacy.sql to add the old functions again, see http://postgis.org/documentation/manual-2.1SVN/PostGIS_FAQ.html#legacy_faq EDIT Second choice: ...


-1

AFAIK the most OSM tools rely on a 4326 projection, so it's not a wise idea to change the DB schema to a different one. Instead you could write a small wrapper or use e.g. Geoserver to reproject the geometries per request.


0

The syntax for osm2pgsql is osm2pgsql [options] planet.osm.{pbf,gz,bz2}. Like most command-line programs, osm2pgsql takes the input file name at the end of the command line.


1

Converting OSM to PBF is probably not necessary, most tools that can read PBFs can also read OSM XML. If you do need to read the file with osmosis, the issue here is that ogr2osm by default generates files that can be loaded in JOSM and merged with existing OSM data. These files have no timestamp or version attributes as well as having negative IDs, while ...


0

The OSM wiki lists some more tools for converting shape files to .osm. Maybe try another one?


0

Have you tried this? Shp2OSM & PG2OSM You may need one step in Postgre ...


0

The .osm file you create with the script does not have version/user/timestamp attributes. Osmosis does not like that. I guess you have to look for other ways to get your map file. I'm not sure how you want to do the last step anyway.


1

For a simple way to add markers on top of an OSM based map: uMap This lets you add markers, or draw lines or areas on the map. You can import data from a GPX, KML, or GeoJSON file etc. It has a number of different tile layers to choose for the background map. You can share a link to the map if you want, or embed it another webpage. By default, any maps ...


1

That depends on what you want to achieve. How to render your own tiles is described on switch2osm. This step is only necessary if you want to change the style of the tiles. TileMill is another approach for rendering your own tiles, among many many others. If you are instead just interested in adding a custom overlay, then go for Leaflet or OpenLayers. ...


0

Mapbox is the answer to my question along with this nice tutorial: http://youtu.be/JUfLpFV1F4c Download TileMill from here to create your own layers to work with your MapBox projects. https://www.mapbox.com/tilemill/ Don't forget to sign up for http://mapbox.com to use their web app and make your own private maps


3

QGIS and the server behind Overpass API are not able to handle large area requests. If you need that amount of data, think about downloading pbf extracts from Geofabrik filter the data for the items you really want with direct Overpass API calls set up a local postgis database for your area of interest with a suitable Geofabrik extract


0

You can calculate which links are accessible within 10 km (shortest path), delete the rest and then calculate path according to your more generic cost.


0

You can also use our RW Net or RW NetServer products for local calculations. OSM is a possible data source, but depending upon where in the world you are, there are many more, either pulicly owned (some free) or commercial ones. You also need to geocode your addresses, it is not clear if they already have coordinates?


1

Actually you can use two tools, both are easy to install on your own server. OSRM writen in C++ and Lua GraphHopper if you prefer Java


2

I suggest first to open a command window, then execute osmconvert. Here are some hints on opening command windows: http://stackoverflow.com/questions/378319/windows-explorer-command-prompt-here Another choice is to create a batch file with the command, and add a pause command as last line: osmconvert.exe D:\Karten\osm\Geofabrik\germany.osm.pbf ...


0

You know, you don't need to put the data into SpatialLite. You can just: 1) Download the data (Vector > OpenStreetMap > Download Data, creates an .osm file) 2) Load the data (.osm file) as a vector layer (Layer > Add Vector Layer). After you select the file, it'll ask you which layers you want to add (as GDAL makes separate files for each type: Point, ...


0

There’s a thorough explanation in the PostGIS FAQ: In PostGIS 2, the default geometry operator class gist_geometry_ops was changed to gist_geometry_ops_2d and the gist_geometry_ops was completely removed. Simply remove the gist_geometry_ops statement, changing this: CREATE INDEX idx_my_table_geom ON my_table USING gist(geom gist_geometry_ops); To ...


2

Overpass API allows you to download only selected objects. For country borders, admin_level=2 should return the information you want: <osm-script> <query type="relation"> <has-kv k="admin_level" v="2"/> </query> <print mode="meta"/> </osm-script> This returns 302 border relations without all coordinates. ...


1

After the import of the raw data, osm2pgsql builds the polygon data out of closed ways and multipolygon relations. Building indices is the last step, so you might rescue the polygons. I'm not sure at what stage the planet_osm_roads are generated from the planet_osm_lines. These are needed for low level zoom of roads and railways. But I would not be sure ...


0

It's an old question, but there are some new answers now. WhirlyGlobe-Maply can now do vector map display on iOS. http://mousebirdconsulting.blogspot.com/2014/03/vector-maps-introduction.html


0

The source tag is always deleted. This is hardcoded in osm2pgsql / parse-primitive.c and parse-xml2.c: /* 'created_by' and 'source' are common and not interesting to mapnik renderer */ if (strcmp((char *)xk, "created_by") && strcmp((char *)xk, "source")) { ... To keep the source tag, there are two options: Change the code and compile ...


2

The names of the tables should be self-explaining: planet_osm_point is a point layer file planet_osm_line is a line layer file planet_osm_roads similar to line, contaning simplified geometries of roads and railways for lower zoom levels planet_osm_polygon contains (multi-)polygons These tables reflect the OSM datamodel in the way they can be used GIS ...


0

On Overpass Turbo ... Click the button (6th from left) which reads "Load" In the small window which appears click 'Templates' Click 'key-value' This provides a template for more specific queries of the data. On this template you'll see the lines... {{key=???}} {{value=???}} Replace the '???' with pairs of values like: {{key=highway}} ...



Top 50 recent answers are included