MultiLineString GML Baseline¶
Canonical baseline multilinestring stored as GML for cross-format comparison and format-specific loader behavior testing.
| Property | Value |
|---|---|
| Case ID | multilinestring_gml_baseline |
| Category | vector |
| Format | GML |
| Geometry type | MultiLineString |
| CRS | EPSG:4326 |
| Location | Great Rift Valley, East Africa (synthetic) — 36.10°E, 0.70°S → 37.20°E, 0.30°S |
| Test tier | unit |
| Size class | tiny |
| Storage class | bundled |
| Redistributable | yes |
| Loader | geopandas |
| Status | validated |
Use this case¶
import pytest
@pytest.mark.geocase_case("multilinestring_gml_baseline")
def test_multilinestring_gml_baseline(geocase_case) -> None:
data = geocase_case.load()
assert data is not None
Use GeoCase in your tests¶
Install the complete set of vector, raster, and NetCDF dependencies:
What this case checks¶
Provide a canonical multilinestring encoded as GML so format-specific loader behavior can be compared directly against the GeoJSON baseline.
Risk types covered¶
Expected behavior¶
| Assertion | Expected |
|---|---|
expect_loadable |
yes |
expect_valid_geometry |
yes |
expect_crs |
yes |
expected_epsg |
4326 |
expected_geometry_types |
MultiLineString |
Notes¶
Purpose¶
Tests MultiLineString geometry loading from GML format.
Data¶
- Geometry:
MULTILINESTRING ((36.1 -0.5, 36.6 -0.3, 37.1 -0.4), (36.3 -0.7, 36.9 -0.6, 37.2 -0.5)) - Attributes:
id= 1,name=multilinestring_gml_baseline - OGR additionally injects a
gml_idcolumn on read. - Feature count: 1
Validation¶
- Geometry type:
MultiLineString - CRS:
EPSG:4326 - Geometry equals
simple_valid_multilinestringundershapely.normalize, which is howtests/unit/test_cross_format_canonical.pycompares them. The comparison is winding-insensitive by necessity: the Shapefile specification mandates the opposite ring orientation from RFC 7946, and OGR rewrites winding on write. Orientation itself is asserted byshapefile_ring_orientation.
Axis order — the bytes really are latitude-first¶
These files are written with srsName="urn:ogc:def:crs:EPSG::4326". The URN
form forces EPSG:4326's declared axis order, which is (latitude,
longitude) — and it does so regardless of GDAL's OAMS_TRADITIONAL_GIS_ORDER
setting, which the generator applies for every other format. So on disk this
file reads:
Latitude first. That is correct GML, not a defect, and OGR reads it back lon-first as you would expect:
load_case("multilinestring_gml_baseline").load().geometry.iloc[0] # MULTILINESTRING ((36.1 -0.5, 36.6 -0.3, 37.1 -0.4), (36.3 -0.7, 36.9 -0.6, 37.2 -0.5))
The trap is for anyone who parses the XML as text — an entirely reasonable
thing to do with a small GML file. Split gml:pos on whitespace, feed the
pair to a constructor expecting (x, y), and you have silently swapped every
coordinate. Nothing raises; the geometry is simply somewhere else.
This is why the case carries the axis_order risk type. The content gate
checks the claim against the bytes: the file must use the URN form, and the
first ordinate must fall inside the declared latitude band.
Note that out_of_bounds_coordinates deliberately does not carry this risk
type. It catches a swap only because latitude 100 is outside the valid range —
that is a validity signal, not a statement about axis ordering.
Generation¶
Generated by scripts/generate_vector_fixtures.py — do not hand-edit. The
geometry is derived from params.canonical_source_case_id
(simple_valid_multilinestring), and generate_vector_fixtures.py --check fails on any drift.
Required capabilities¶
loadgeometry-validationbounds-check
Files¶
Source and license¶
- Source: geocase-curated
- License: MIT
Tags¶
baseline cross_format_canonical format_comparison gml multilinestring valid vector
Related cases¶
- LineString GML Baseline --
linestring_gml_baseline - MultiPoint GML Baseline --
multipoint_gml_baseline - MultiPolygon GML Baseline --
multipolygon_gml_baseline - Point GML Baseline --
point_gml_baseline - Polygon GML Baseline --
polygon_gml_baseline