Skip to content

Spike Invalid Polygon

vectorGeoJSONPolygonEPSG:4326tinybundled

A polygon with a self-touching spike that repairs to a mixed GeometryCollection containing both polygonal and linear parts. Useful for testing geometry-fixing helpers that should preserve only polygonal output.

Polygon geometry of spike_invalid_polygon, rendered from the case's data
Polygon geometry, rendered from the case's actual geometry. Scale is normalized to the viewport and is not comparable between cases.
Property Value
Case ID spike_invalid_polygon
Category vector
Format GeoJSON
Geometry type Polygon
CRS EPSG:4326
Location Near the origin (synthetic, no real-world location) — 0.00°E, 0.00°N → 4.00°E, 4.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("spike_invalid_polygon")
def test_spike_invalid_polygon(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

Expose geometry repair helpers that return mixed geometry collections instead of polygon-only repaired output.

Risk types covered

Expected behavior

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

Notes

This polygon contains a self-touching spike. make_valid typically repairs it into a mixed GeometryCollection with one polygon and one linear artifact, which is useful for testing whether repair helpers keep only polygonal output.

Required capabilities

  • load
  • geometry-validation
  • repair

Files

Browse this case on GitHub

Source and license

  • Source: geocase-curated
  • License: MIT

Tags

invalid polygon repair spike vector