osmcode / pyosmium

Python bindings for libosmium
https://osmcode.org/pyosmium
BSD 2-Clause "Simplified" License
314 stars 64 forks source link

Convert SimpleHandler to a pure Python class #243

Closed lonvia closed 7 months ago

lonvia commented 7 months ago

Now that any Python class can function as a handler, there is no need for a C++ implementation of SimpleHandler anymore. Convert it to a Python class that essentially functions as a mixin to your handler and supplies the apply_file() and apply_buffer() convenience functions.

To implement these two functions, we also need to expose the AreaManager, responsible for building area objects, and the FileBuffer, which wraps Python buffers in a form usable for the osmium Reader object.