Skip to content

Degenerate but Parseable Line

vectorGeoJSONLineStringEPSG:4326tinybundled

A zero-length LineString whose two vertices are identical. The geometry is parseable and loadable, but it is degenerate and invalid for many downstream geometric operations.

LineString geometry of degenerate_but_parseable_line, rendered from the case's data
LineString geometry, rendered from the case's actual geometry. Scale is normalized to the viewport and is not comparable between cases.
Property Value
Case ID degenerate_but_parseable_line
Category vector
Format GeoJSON
Geometry type LineString
CRS EPSG:4326
Location Mediterranean, off Libya (synthetic) — 12.00°E, 34.00°N → 12.00°E, 34.00°N
Test tier unit
Size class tiny
Storage class bundled
Redistributable yes
Loader geopandas
Status validated

Use this case

import pytest


@pytest.mark.geocase_case("degenerate_but_parseable_line")
def test_degenerate_but_parseable_line(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:

pip install "geocase[all]"

View GeoCase on PyPI.

What this case checks

Ensure loading succeeds for a degenerate but parseable line while making its zero-length invalidity explicit to validation logic.

Risk types covered

  • geometry/degenerate_but_parseable
  • geometry/zero_length
  • measurement/invalid

Expected behavior

Assertion Expected
expect_loadable yes
expect_valid_geometry no
expect_crs yes
expected_epsg 4326
expected_geometry_types LineString

Notes

Zero-length LineString that parses successfully but is geometrically degenerate.

Required capabilities

  • load
  • geometry-validation
  • bounds-check

Files

Browse this case on GitHub

Source and license

  • Source: geocase-curated
  • License: MIT

Tags

collapsed degenerate invalid linestring parseable vector