Skip to main content
5 votes
Accepted

Extracting POI from Openstreetmap (*.osm)

easy. 1. download *.osm.pbf 2. install osmosis 3. in the command window type osmosis --rbf INPUT.osm.pbf --nk keyList="amenity" --wx OUTPUT.osm
Pil Kwon's user avatar
  • 1,050
5 votes
Accepted

Getting area covered by intersection or junction?

OSM usually doesn't contain the exact outline of a junction or intersection (except in very few cases where area:highway has been mapped) and most roads don't have a width set. However you can try to ...
scai's user avatar
  • 6,235
5 votes
Accepted

How to query relations and visualise it on Overpass turbo

Unfortunately, it's not clear from your description what you mean by "visualise only the relations". Relations are made up of ways and nodes, and ways are made up of nodes. Relations don't ...
mmd's user avatar
  • 4,647
3 votes

Unclosed linestring to polygon works with QGIS but not with PostGIS

Try enforcing closed LineStrings by adding their ST_StartPoint to the end of the them: SELECT ST_MakePolygon( ST_MakeValid( ST_AddPoint( shape. ST_StartPoint( shape ) ) ) ) AS shape FROM ...
geozelot's user avatar
  • 30.6k
3 votes
Accepted

OSRM how to use my own map

You have to change the used speed profile (defined in a .lua file) depending on the specific attributes of your edges/ways. By default, car.lua considers edges with common OSM attributes like ...
Mesa's user avatar
  • 1,512
3 votes

Look for all `highway` type `way` in certain area, using the overpass-api directly (not overpass turbo) or osmosis

Backend solution (no API) I found a solution using just backend scripts without overpass or any other api using osmium instead of osmosis. Download the extract you want from geofabrik.de (.pbf file) ...
Emeeus's user avatar
  • 141
3 votes
Accepted

Issues with OSM encoding

Ok, Answering my own question: I ran the above code in linux and understood that the issue was with the windows locale. The workaround I found was to use iconv with from and to parameters set to "UTF-...
deann's user avatar
  • 141
3 votes
Accepted

Tracking OSM "Planet" Extract dates

Using OSMConvert, the wiki shows how you can extract/display the timestamp from the file header: osmconvert yourfile.pbf --out-timestamp This could be included in your update process and piped into ...
kttii's user avatar
  • 3,640
2 votes

How to filter OSM data for addr keys with Osmosis

Osmosis has option for tag filter. here is the documentation. https://wiki.openstreetmap.org/wiki/Osmosis/Detailed_Usage_0.46#--tag-filter_.28--tf.29 Example usage: osmosis \ --read-xml input.osm \ ...
neogeomat's user avatar
  • 8,380
2 votes

Filtering out OpenStreetMap data made by specific users using osmosis?

I had the same desire to get all changed by a specific user. This question popped up quite high in the search results so I want to answer it despite its age in the hope others find the information ...
user228505's user avatar
2 votes

Downloading OpenStreetMap data by osmosis?

Osmosis is not a download tool. You need to download data from the Server with the export function of the website, but this is limited in size due to limited server resources. It is encouraged to ...
AndreJ's user avatar
  • 76.9k
2 votes
Accepted

Getting coordinates of ways in *.pbf file?

Osmosis takes all nodes to the output file, unless you add the --used-node options. --tf reject-nodes discards all nodes, including those of your ways. If the way leaves your bounding box or polygon, ...
AndreJ's user avatar
  • 76.9k
2 votes
Accepted

Make my OSM database up to date again

Take a look at the history folder, it has weekly files going back a month. https://planet.openstreetmap.org/planet/full-history/2017/ Update: I don't know if this will help you... but based on the ...
kttii's user avatar
  • 3,640
2 votes

How does osmosis take so much disk space?

Geofabrik offers compressed files (.pbf and .osm.bz2). The current uncompressed OSM XML file for Poland is 21 GB large.
scai's user avatar
  • 6,235
2 votes
Accepted

Install osmosis without wget and still create its folder?

You don't need this step when using the package manager. This directory is only created for storing the files from the previously downloaded osmosis archive. Since you already installed osmosis via ...
scai's user avatar
  • 6,235
2 votes
Accepted

Get all geom points that are more than 3 meters from the linestring, at big scale

You've got two interacting things that might slow down your query: Trying to do a "all things disjoin" or "all things further" style query Using functional indexes I have found ...
Paul Ramsey's user avatar
  • 19.9k
2 votes

Wrong csv format generated by OSM tools

5710782475,-6.0900342,54.4808682,,,,,,,,,,,,,,, is correct. Node 5710782475 is part of a way tagged as amenity=parking and this tag is part of your filter expression. Since it is part of this way it ...
scai's user avatar
  • 6,235
1 vote
Accepted

Export planet OSM file from Rails port using Osmosis

The error message already includes the solution: may need to upgrade osmosis or specify validateSchemaVersion=no You need to add this paarameter+value as option next to the --read-apidb parameter ...
mmd's user avatar
  • 4,647
1 vote

Extract Certain Elements from Global OSM Database

You might wan to try --tf accept-relations waterway=* --used-way --used-node or alternatively accept-ways
Sagan's user avatar
  • 11
1 vote

OSM Data Extract Streetnames for cities

Address tags are not only present at nodes, they do exist on ways and relations, too. So you need to process all elements in order to get all addr:street and addr:city combinations. In the end this ...
scai's user avatar
  • 6,235
1 vote
Accepted

OSM updates with Osmosis -> Osm2Pgsql resulting in missing features?

I received an answer at help.openstreetmap.org that I will share here, to hopefully help out future individuals attempting the same process: "You need to be careful to use the same options for update ...
Randy Bo Bandy's user avatar
1 vote
Accepted

Re-sync OSM DB After Failure

In my case, The replication state doesn't contain a timestamp propertyresulted directly due to not using the https url in configuration.txt and it was not related to state.txt. Changing the url to ...
picmate's user avatar
  • 327
1 vote

Missing roads from OpenStreetMap data with osmosis

I would recommend you using the HOT site to download OSM data. You can download data for a specific location or even draw a boundary for an area. and download only the road. https://export.hotosm.org/...
yvvazsua's user avatar
1 vote

How to merge OSM files with same ID?

Solved by merging all HGT into a single TIFF and then convert it to PBF.
Magno C's user avatar
  • 2,150
1 vote

Convert a big .osm file to .map

I did something similar once. Load your osm file to some gis software, edit it (keep only what you really need) and then save it as csv. I thing you are talking about mapserver when you refer to a map ...
Gery's user avatar
  • 2,135
1 vote

Add data to existing populated PostGIS database through Osmosis

I stumbled across this question when encountering a similar issue with my own project. The reason to avoid appending to the existing tables in this manner is so that the topology of the OSM data is ...
jnlt's user avatar
  • 11
1 vote

Updating One Country's OSM Data through Osomosis

One solution to this problem would be to set up your database using a country extract and only apply coutry specific updates, rather than minutely diffs from planet.openstreetmap.org. As one example, ...
mmd's user avatar
  • 4,647
1 vote

How to hierarchically query PostgreSQL data coming from OpenStreetMap

You can't perform any spatial relations like ST_Contains cause you've got only nodes in your database. To do this you need also country borders as areas. You can get this from OSM (filter by boundary=...
Jendrusk's user avatar
  • 2,617
1 vote

Import OSM data in postgis with python script

Part of the question mentions not knowing how to create a schema. You can create a schema with pgAdmin (GUI) or with this SQL statement: CREATE SCHEMA tiger_data; I recommend you install the ...
kttii's user avatar
  • 3,640

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