Expand description
ERA RINF SPARQL retrieval module (feature 006).
Provides:
- The
SparqlClienttrait so production code can hit the real endpoint viaUreqSparqlClientwhile tests inject deterministic fixtures. - A tiny inline WKT
LINESTRINGparser (avoids pulling a wkt crate). - Builders for the two SPARQL queries documented in
specs/006-download-rinf-topology/research.md. - Row-to-core-model mappers that produce
Netelement/NetRelationinstances ready for downstream workflows.
Structs§
- Ureq
Sparql Client - Default blocking SPARQL client backed by [
ureq].
Traits§
- Sparql
Client - Pluggable SPARQL transport — production uses ureq, tests use mocks.
Functions§
- build_
netelements_ query - Build the netelements SPARQL query for a given closed WGS84 polygon WKT.
- build_
netrelations_ query - Build the netrelations SPARQL query for a list of seed element IRIs.
- fetch_
netelements - High-level helper: fetch + parse netelements for a search polygon.
- fetch_
netrelations - High-level helper: fetch + parse netrelations for the given seed IRIs.
- linestring_
length_ meters - Approximate length of a WGS84 LineString in meters (great-circle, equirectangular).
- map_
netelements_ to_ core - Map parsed netelement rows to core
Netelementstructs. - map_
netrelations_ to_ core - Map parsed netrelation rows to core
NetRelationstructs. - parse_
netelements_ response - Parse the SPARQL-JSON response for the netelements query.
- parse_
netrelations_ response - Parse the SPARQL-JSON response for the netrelations query.
- parse_
wkt_ linestring - Parse a
LINESTRING(...)WKT into a [LineString<f64>].