Lecture d’objets WFS
gpf_wfs_get_featuresQueries a WFS type to retrieve structured geographic features with attribute filters, spatial operators, and property selection. Returns data ready for mapping.
Instructions
Interroge un type WFS et renvoie des résultats structurés sans demander au modèle d'écrire du CQL ou du WFS.
Utiliser select pour choisir les propriétés, where pour filtrer, order_by pour trier et spatial_operator avec ses paramètres dédiés pour le spatial. Avec result_type="request", la géométrie est automatiquement ajoutée aux propriétés sélectionnées pour garantir une requête cartographiable.
Exemple attributaire : where=[{ property: "code_insee", operator: "eq", value: "75056" }].
Exemple bbox : spatial_operator="bbox" avec bbox_west, bbox_south, bbox_east, bbox_north en lon/lat.
Exemple point dans géométrie : spatial_operator="intersects_point" avec intersects_lon et intersects_lat.
Exemple distance : spatial_operator="dwithin_point" avec dwithin_lon, dwithin_lat, dwithin_distance_m.
Exemple réutilisation : spatial_operator="intersects_feature" avec intersects_feature_typename et intersects_feature_id issus d'une feature_ref.
⚠️ Quand typename et intersects_feature_typename sont identiques, utiliser gpf_wfs_get_feature_by_id pour récupérer exactement l'objet ciblé.
OBLIGATOIRE : toujours appeler gpf_wfs_describe_type avant ce tool, sauf si gpf_wfs_describe_type a déjà été appelé pour ce même typename dans la conversation en cours.
Les noms de propriétés ne peuvent pas être devinés : ils sont spécifiques à chaque typename et diffèrent systématiquement des conventions habituelles (ex : pas de nom_officiel, navigabilite sans accent, etc.). Toute tentative sans appel préalable à gpf_wfs_describe_type provoquera une erreur.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| typename | Yes | Nom exact du type WFS à interroger, par exemple `BDTOPO_V3:batiment`. Utiliser `gpf_wfs_search_types` pour trouver un `typename` valide. | |
| limit | No | Nombre maximum d'objets à renvoyer. Valeur par défaut : 100. Maximum : 5000. | |
| result_type | No | `results` renvoie une FeatureCollection avec les propriétés attributaires uniquement — **les géométries ne sont pas incluses**, ce mode ne peut donc pas être utilisé directement pour cartographier. `hits` renvoie uniquement le nombre total d'objets correspondant à la requête. `request` renvoie l'URL WFS compilée (`get_url`) à destination de `create_map` via `geojson_url`, ou pour déboguer la requête générée. **La géométrie est automatiquement ajoutée aux propriétés du `select`** pour garantir l'affichage cartographique. | results |
| select | No | Liste des propriétés non géométriques à renvoyer pour chaque objet. Utiliser `gpf_wfs_describe_type` pour connaître les noms exacts disponibles. Exemple : `["code_insee", "nom_officiel"]`. | |
| order_by | No | Liste ordonnée des critères de tri. | |
| where | No | Clauses de filtre attributaire, combinées avec `AND`. | |
| spatial_operator | No | Type optionnel de filtre spatial. | |
| bbox_west | No | Longitude ouest en WGS84 `lon/lat`, utilisée avec `spatial_operator = "bbox"`. | |
| bbox_south | No | Latitude sud en WGS84 `lon/lat`, utilisée avec `spatial_operator = "bbox"`. | |
| bbox_east | No | Longitude est en WGS84 `lon/lat`, utilisée avec `spatial_operator = "bbox"`. | |
| bbox_north | No | Latitude nord en WGS84 `lon/lat`, utilisée avec `spatial_operator = "bbox"`. | |
| intersects_lon | No | Longitude du point en WGS84 `lon/lat`, utilisée avec `spatial_operator = "intersects_point"`. | |
| intersects_lat | No | Latitude du point en WGS84 `lon/lat`, utilisée avec `spatial_operator = "intersects_point"`. | |
| dwithin_lon | No | Longitude du point en WGS84 `lon/lat`, utilisée avec `spatial_operator = "dwithin_point"`. | |
| dwithin_lat | No | Latitude du point en WGS84 `lon/lat`, utilisée avec `spatial_operator = "dwithin_point"`. | |
| dwithin_distance_m | No | Distance en mètres, utilisée avec `spatial_operator = "dwithin_point"`. | |
| intersects_feature_typename | No | Type WFS du feature de référence, utilisé avec `spatial_operator = "intersects_feature"`. | |
| intersects_feature_id | No | Identifiant du feature de référence, utilisé avec `spatial_operator = "intersects_feature"`. |