Introduces a new class FileProcessor, which can be used to read a file iteratively:
for obj in osmium.FileProcessor('foo.osm.xml'):
if obj.is_node():
print(f'Found node {obj.id}')
Location handling, area processing and the new filter classes can be used with the processor. The same scope restrictions apply as for handlers: an object can only be accessed inside the loop. If you need to keep data, you need to copy it out.
There is no documentation yet. Refer to the refurbished examples and new tests for an idea how this is supposed to work. This is still a bit experimental and the interface might still slightly change.
Introduces a new class FileProcessor, which can be used to read a file iteratively:
Location handling, area processing and the new filter classes can be used with the processor. The same scope restrictions apply as for handlers: an object can only be accessed inside the loop. If you need to keep data, you need to copy it out.
There is no documentation yet. Refer to the refurbished examples and new tests for an idea how this is supposed to work. This is still a bit experimental and the interface might still slightly change.