1

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 to save. I understand, that I can not store the node object, because it just exists in the scope, but why can I not store the same data, which I store in the list, into a pandas dataframe?

Then I got the message "RuntimeError: Node callback keeps reference to OSM object. This is not allowed.". Also shown in the examples?

What is different in that case? How can I speed up the reading process.

Greats.

tribe
  • 23
  • 6
  • The documentation clearly states: "If you want to keep data for later use the data must be copied out.". For how to create a copy read https://docs.python.org/3/library/copy.html – scai Oct 24 '22 at 07:27

0 Answers0