Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions crates/engine/testdata/reading-losses/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,16 +190,16 @@ but not covered here, not necessarily a known bug. CRS assumptions remain separa

| Reader dispatch | Paired corpus coverage | Remaining applicable families |
| --- | --- | --- |
| GeoJSON | Z, unreadable geometry | M, members/holes, attributes |
| TopoJSON | Z, missing arcs, bad quantized positions, nested members | M, other parts, attributes |
| Delimited text (CSV/TSV/TXT/DAT, gzip wrapper) | CSV WKT Z, bad WKT/XY, later WKT members, extra cells | M, holes/curves, types/names/encoding, wrapper parity |
| GeoJSON | Z, unreadable geometry, multi-member collections | M, holes, attributes |
| TopoJSON | Z, M, missing arcs, bad quantized positions, nested members | other parts, attributes |
| Delimited text (CSV/TSV/TXT/DAT, gzip wrapper) | CSV WKT Z and M, bad WKT/XY, later WKT members, extra cells | holes/curves, types/names/encoding, wrapper parity |
| Shapefile | Point Z/M, line Z/ZM | Other shapes/parts, attributes; DBF encoding tracked in #2325 |
| Standalone DBF | Invalid date read as Null | Other types/names/encoding; geometry and Z/M inapplicable |
| KML/KMZ | Z, missing geometry, bad coordinate/hole/part, excess point coordinates | Other parts, attributes |
| GPX | Bad waypoint, short track segment | Elevation attributes, other parts, attributes |
| GeoRSS (RSS/Atom/GeoRSS, sniffed XML) | Unreadable place/hole, excess coordinate pairs | GML dimensions, other members, attributes |
| LandXML (including sniffed XML) | Unreadable point, parcel without geometry | Elevations, curves/parts, attributes |
| GML | Z | M, members/holes/curves, attributes |
| GML | Z, M (4-D, with Z) | members/holes/curves, attributes |
| CityGML / CityJSON (distinct parsers) | Varying line Z in each | Other dimensions, surfaces/members/holes, attributes |
| DXF | Varying line Z, unreadable entity/vertex | Other entities/curves/parts, attributes |
| MapInfo MIF/MID | Unreadable object, arc, short part/ring | Other geometry and attribute conversion |
Expand Down
48 changes: 48 additions & 0 deletions crates/engine/tests/integration/never_silent_reading.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,16 @@ pub(super) fn cases(fixture_dir: &std::path::Path) -> Vec<Case> {
geojson(&[point, r#"{"type":"Point","coordinates":["x",2]}"#]),
Said("unreadable geometry"),
),
case(
"GeoJSON: a geometry collection of two members",
"a.geojson",
geojson(&[point, point]),
geojson(&[
point,
r#"{"type":"GeometryCollection","geometries":[{"type":"Point","coordinates":[1,2]},{"type":"Point","coordinates":[3,4]}]}"#,
]),
Expect::Classified(LossCode::DroppedFeature, "unreadable geometry"),
),
// TopoJSON.
case(
"TopoJSON: a height",
Expand All @@ -242,6 +252,20 @@ pub(super) fn cases(fixture_dir: &std::path::Path) -> Vec<Case> {
topo_line("[[0,0,5],[1,1,6]]"),
Expect::Classified(LossCode::DroppedZm, "Z or M"),
),
case(
"TopoJSON: a measure",
"a.topojson",
topo_line("[[0,0],[1,1]]"),
topo_line("[[0,0,null,7],[1,1,null,8]]"),
Expect::Classified(LossCode::DroppedZm, "Z or M"),
),
case(
"TopoJSON: a measure on one position",
"a.topojson",
topo_line("[[0,0],[1,1]]"),
topo_line("[[0,0],[1,1,null,8]]"),
Expect::Classified(LossCode::DroppedZm, "Z or M"),
),
case(
"TopoJSON: an arc index the file doesn't hold",
"a.topojson",
Expand Down Expand Up @@ -278,6 +302,20 @@ pub(super) fn cases(fixture_dir: &std::path::Path) -> Vec<Case> {
"wkt,id\n\"POINT Z(1 2 3)\",1\n",
Expect::Classified(LossCode::DroppedZm, "Z or M"),
),
case(
"CSV: a measure in WKT",
"a.csv",
"wkt,id\n\"POINT(1 2)\",1\n",
"wkt,id\n\"POINT M(1 2 4)\",1\n",
Expect::Classified(LossCode::DroppedZm, "Z or M"),
),
case(
"CSV: a measure on a WKT line",
"a.csv",
"wkt,id\n\"LINESTRING(0 0,1 1)\",1\n",
"wkt,id\n\"LINESTRING M(0 0 7,1 1 8)\",1\n",
Expect::Classified(LossCode::DroppedZm, "Z or M"),
),
case(
"CSV: an unreadable coordinate",
"a.csv",
Expand Down Expand Up @@ -452,6 +490,16 @@ pub(super) fn cases(fixture_dir: &std::path::Path) -> Vec<Case> {
),
Expect::Classified(LossCode::DroppedZm, "Z or M"),
),
case(
// GML can't mark a 3-D position as XYM, so a measure comes with a height: a 4-D position.
"GML: a measure",
"a.gml",
gml(r#"<gml:LineString srsName="urn:ogc:def:crs:EPSG::4326"><gml:posList>48 10 49 11</gml:posList></gml:LineString>"#),
gml(
r#"<gml:LineString srsName="urn:ogc:def:crs:EPSG::4326"><gml:posList srsDimension="4">48 10 5 7 49 11 6 8</gml:posList></gml:LineString>"#,
),
Expect::Classified(LossCode::DroppedZm, "Z or M"),
),
// GeoRSS.
case(
"GeoRSS: an unreadable place",
Expand Down
Loading