Redesign WFS querying with structured filters and reusable feature refs#38
Merged
Redesign WFS querying with structured filters and reusable feature refs#38
Conversation
- redesign `gpf_wfs_get_features` around a structured input schema with `select`, `where`, `order_by` and dedicated spatial operators - compile WFS requests as POST calls, add a `request` result mode, and support `intersects_feature` through reusable `feature_ref` values - expose `feature_ref` metadata in `adminexpress`, `cadastre`, `urbanisme` and `assiette_sup` results - split the WFS get-features logic and tests into dedicated modules and add JSON schema publishing helpers - remove the obsolete `gpf_wfs_list_types` tool and the old CQL filter resource - update the README, tests and build script to match the new WFS workflow
mborne
approved these changes
Apr 10, 2026
| .array(orderBySchema) | ||
| .min(1) | ||
| .optional() | ||
| .describe("Liste ordonnée des critères de tri."), |
Contributor
There was a problem hiding this comment.
Notes :
- turned array to string by the past to avoid problems with some agents / models
- syntax for ASC / DSC removed
| dwithin_lon: longitudeSchema("Longitude du point en WGS84 `lon/lat`, utilisée avec `spatial_operator = \"dwithin_point\"`.").optional(), | ||
| dwithin_lat: latitudeSchema("Latitude du point en WGS84 `lon/lat`, utilisée avec `spatial_operator = \"dwithin_point\"`.").optional(), | ||
| dwithin_distance_m: z.number().finite().positive().describe("Distance en mètres, utilisée avec `spatial_operator = \"dwithin_point\"`.").optional(), | ||
| intersects_feature_typename: z.string().trim().min(1).optional().describe("Type WFS du feature de référence, utilisé avec `spatial_operator = \"intersects_feature\"`."), |
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.
Summary
This branch reworks the WFS querying surface to make it safer, more reusable, and easier for clients/LLMs to use without writing raw CQL manually.
Main changes
gpf_wfs_get_featuresaround a structured query contract:cql_filter,property_names,sort_by,count, andresult_type="url"flowselect,where,order_by, andspatial_operatorbbox,intersects_point,dwithin_point, andintersects_featureresult_type="request"to expose the compiled WFS request, including POST payload and a derived GET URL when possiblegpf_wfs_get_featuresnow returnsfeature_refdata on featuresadminexpress,cadastre,urbanisme, andassiette_supnow expose reusablefeature_refvalues when availableintersects_featurecan use those references directly in later WFS queriesfeature_refgpf_wfs_list_typestoolwfs-cql-filterresource/cheatsheet now that queries are structured instead of raw CQL-drivengpf_wfs_get_featurescontract and reusablefeature_refworkflow@camptocamp/ogc-clientdependency