feat: add PostPass query builder module to osm2pgsql-query-builder - #305
Open
KenKambi wants to merge 1 commit into
Open
feat: add PostPass query builder module to osm2pgsql-query-builder#305KenKambi wants to merge 1 commit into
KenKambi wants to merge 1 commit into
Conversation
Author
|
Hey @spwoodcock ! PR is up — 42/42 tests passing. Let me know if you'd like any changes before merging. 🙌 |
Member
|
Awesome, thanks Ken! Love the tests too 🙌 I think we should merge, then I will probably rename the package - I thought I would separate everything into small packages, but that is hassle - perhaps all of this can live together in raw-data-api-py, renamed to osm-data-client |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
Related Issue :
What does this PR do ?
osm2pgsql-query-builderpackage.tags ->> 'key'column format as osm2pgsql, so all existing filter helpers are reused from
builder.py— no duplication.osm2pgsql_query_builder/postpass_module.py__init__.pytests/test_postpass.py.A brief description of how this solves the issue.
-PostPassQueryParams & BboxFilter: Pydantic models for strict input validation.
-build_postpass_query: Generates optimized SQL using the && (bounding box) operator for faster spatial index scans.
-wrap_postpass_geojson: Wraps query results into a valid GeoJSON FeatureCollection directly via PostgreSQL's json_build_object
Consideration :
How to test ?
To test these changes locally, install the package in editable mode and run the suite: