Questions tagged [osmium]

osmium is a fast and flexible C++ library for working with OpenStreetMap data.

osmium is a fast and flexible C++ library for working with OpenStreetMap data.

Osmium was developed to work efficiently with huge amounts of data. The primary goals are processing speed and efficiently using available memory. It is both a low-level efficient OSM library as well as a powerful tool for various tasks.

28 questions
6
votes
2 answers

How to extract and visualize data from OSM file in Python

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,…
Kinjal Kachi
  • 111
  • 1
  • 1
  • 8
5
votes
2 answers

Problem extracting OSRM data using Docker

I am trying to extract OSRM data but having troubles. In a previous question (lua error when trying to extract osrm data), I was encountering an error. So I am not trying to do the same thing except with Docker. I am using a newer Mac with a Silicon…
bill999
  • 2,147
  • 8
  • 51
  • 103
4
votes
1 answer

Way containing NodeRefs with invalid location

I'm parsing the mayotte pbf with osmium, and my handler is looking for ways. When I find one I process its barycentre and print it. The issue I ran into is that all of the ways I process have invalid location. And if print the location I get…
Ulysse BN
  • 10,116
  • 7
  • 54
  • 82
3
votes
1 answer

Failure to install python package (osmium)

I am trying to install a python package called osmium into a virtual environment that I created with venv. With the virtual environment activated and from the Scripts directory of the virtual environment, calling pip install osmium fails (error…
rhz
  • 960
  • 14
  • 29
3
votes
1 answer

How do I fix "Exception: Cannot find boost_python library"?

I got the following error message when trying to install osmium: $ pip install osmium --user [...] Complete output from command python setup.py egg_info: Traceback (most recent call last): File "", line 1, in File…
Martin Thoma
  • 124,992
  • 159
  • 614
  • 958
3
votes
1 answer

"No module named 'osmium._osmium'" error when trying to use PyOsmium

I am trying to use PyOsmium but it will not import. python3 setup.py install appears to complete just fine but when I import osmium I get the error: Traceback (most recent call last): File "", line 1, in File…
Whonut
  • 288
  • 2
  • 12
2
votes
1 answer

Enable Handler Class Methods to Yield Instance Attributes

This question is regarding the package pyosmium specifically. I was just wondering if the following functionality is possible, and if not how it could be implemented. I want to stream/yield certain instance attributes instead of updating them…
manesioz
  • 798
  • 1
  • 9
  • 21
2
votes
0 answers

How to parallelize libosmium area parsing?

I'm looking into ways to make libosmium based project to parse through OpenStreetMap PBF areas using multiple threads. Parsing nodes, ways, or relations is multi-threaded, but parsing areas is not. For example, while running the following code that…
Tauno Siitam
  • 485
  • 4
  • 12
2
votes
0 answers

Installing pyosmium

I've been having trouble installing pyosmium on OS X 10.8 with the Canopy installation of Python. I'm not sure where the headers should go, and I get different install errors depending on where I try. I've installed the dependencies (Boost.Python,…
amball
  • 293
  • 3
  • 17
1
vote
0 answers

Osmium - How to keep only some tag names?

I am using osmium tool in order to filter some data from a planet.osm.pbf file in order to inject that data into a Nominatim docker. Here is my command: osmium tags-filter planet-latest.osm.pbf place=city,town,village -o planet-light.osm.pbf…
Nasedo47
  • 337
  • 3
  • 13
1
vote
0 answers

OpenStreetMap, Osmium, List, Pandas DataFrame, Python

I have a problem, which I do not understand. I want to read some nodes out of a *.osm file with osmium in Python. https://docs.osmcode.org/pyosmium/latest/intro.html The example shows that I can append a list with all node information, that I want…
tribe
  • 23
  • 6
1
vote
1 answer

How to extract relation members from .osm xml files

All, I've been trying to build a website (in Django) which is to be an index of all MTB routes in the world. I'm a Pythonian so wherever I can I try to use Python. I've successfully extracted data from the OSM API (Display relation (trail) in…
Freek
  • 1,097
  • 2
  • 12
  • 30
1
vote
0 answers

How to clean up *.osm.pbf files (Removing unwanted nodes, relationships, ways) with osmosis or osmium

I've recently began to dig deeper into manipulation raw osm data and later convert them to *.mbtiles to serve vector tiles to my web application. As the map only needs to be of low detail (is mainly used for displaying aviation data), I don't need…
danielreiser
  • 5,292
  • 5
  • 31
  • 43
1
vote
0 answers

How to fix v8 deprecated GetFunction?

I'm trying to repair node-osmium so that it works with Node 12 as I've got some old code I'd like to run. v8 has now fully deprecated a lot of APIs that do not signal failure properly. These were previously only warnings of deprecation soon, they're…
Mat
  • 82,161
  • 34
  • 89
  • 109
1
vote
1 answer

osmium - add output header to PBF

I create multiple synthetic OSM PBF files with pyosmium and later on I want to merge them and use osmium executable to set some custom headers on the PBF for archiving purposes. However, calls such as osmium cat --no-progress example1.pbf…
nilsnolde
  • 199
  • 1
  • 12
1
2