Example query: "what is the sea coast closest to Marckolsheim, and how close is it?"
There is currently no simple way for the LLM to answer that. In practice, it tries different gpf_count_features queries on typename: BDTOPO_V3:limite_terre_mer with varying values of distance_m in a dwithin_point_filter centered on the centroid of Marckolsheim (7.583646, 48.137485), until it reaches the lowest non-zero result. It then answers with the obtained result, which is around 409 km.
The closest sea coast is determined to be feature_id: limite_terre_mer.9925, which is around 10km long and centered on (7.517065, 43.781103). The problem is: the distance between the centroid of Marckolsheim and the detected sea coast is around 484 km, far from the required 409 km limit! The error is higher than 15%.
This issue is about mentioning adding to the description of dwithin_point_filter a warning not to use this filter for doing measurements because it is not precise enough. I don't think we can actually fix it, I believe it must be the Geoserver implementation of the DWITHIN cql filter that uses projections in order to be fast, but this approach cannot remain precise for any distance.
Example query: "what is the sea coast closest to Marckolsheim, and how close is it?"
There is currently no simple way for the LLM to answer that. In practice, it tries different
gpf_count_featuresqueries ontypename: BDTOPO_V3:limite_terre_merwith varying values ofdistance_min adwithin_point_filtercentered on the centroid of Marckolsheim (7.583646, 48.137485), until it reaches the lowest non-zero result. It then answers with the obtained result, which is around 409 km.The closest sea coast is determined to be
feature_id: limite_terre_mer.9925, which is around 10km long and centered on (7.517065, 43.781103). The problem is: the distance between the centroid of Marckolsheim and the detected sea coast is around 484 km, far from the required 409 km limit! The error is higher than 15%.This issue is about mentioning adding to the description of
dwithin_point_filtera warning not to use this filter for doing measurements because it is not precise enough. I don't think we can actually fix it, I believe it must be the Geoserver implementation of the DWITHIN cql filter that uses projections in order to be fast, but this approach cannot remain precise for any distance.