Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New features for upcoming version 4 #262

Merged
merged 27 commits into from
Aug 17, 2024
Merged

New features for upcoming version 4 #262

merged 27 commits into from
Aug 17, 2024

Conversation

lonvia
Copy link
Member

@lonvia lonvia commented Aug 17, 2024

This adds the API changes and new features for the upcoming new major version:

  • persistent OSM objects: handlers can now add information to objects to be used by later handlers
  • new filters: TagFilter, EntityFilter, IdFilter (Provide pre-filtering by id, tags etc. #218), GeoInterfaceFilter (Python __geo_interface__ support #11)
  • improved SimpleWriter
    • can be used as a Handler
    • can be used as context manager
    • new overwrite parameter to automatically overwrite files
    • generic add() function that takes any object
  • improved FileProcessor
    • allow separate filters for area processing
    • new handler for filtered objects
  • new BackReferenceWriter and ForwardReferenceWriter which automatically complete file with referenced objects
  • expose osmium's IdSet
  • new haversine function for two points

Documentation and usage examples fof these new features to follow.

Costs up to 10% performance.
Python wrappers now stay alive throughout handler chains.
This allows to carry over information from one handler to
the next.

Also generalizes reporting for enabled types.
area and filter don't need extra Python module code.
This is backwards compatible but allows more flexibility to add new
parameters.
This way filters can also be implemented outside the filter module.
Keep an alias for backward compatibility.
The reader will immediatedly start reading, thus making the
FileProcessor construction slow. It also means that the FileProcessor
cannot be reused.
@lonvia lonvia merged commit c20da5a into osmcode:master Aug 17, 2024
21 checks passed
@lonvia lonvia deleted the v4 branch August 17, 2024 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant