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
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 ...
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 ...
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 ...
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 ...
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) ...
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-...
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 ...
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 \
...
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 ...
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 ...
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, ...
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 ...
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.
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 ...
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 ...
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 ...
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 ...
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
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 ...
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 ...
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 ...
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/...
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.
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 ...
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 ...
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, ...
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=...
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
osmosis × 140openstreetmap × 118
postgis × 30
osm2pgsql × 20
postgresql × 19
java × 6
overpass-api × 6
python × 5
filter × 5
nominatim × 5
osmfilter × 5
extract × 4
josm × 4
pbf × 4
import × 3
ubuntu × 3
update × 3
overpass-turbo × 3
open-source-routing-machine × 3
osmium × 3
geoserver × 2
polygon × 2
convert × 2
merge × 2
ogr × 2