Polygon with Hole¶
vectorGeoJSONPolygonEPSG:4326tinybundled
A polygon containing an interior ring (hole). Tests that tools correctly distinguish outer and inner rings and compute area accounting for the hole.
| Property | Value |
|---|---|
| Case ID | polygon_with_hole |
| 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 → 10.00°E, 10.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("polygon_with_hole")
def test_polygon_with_hole(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¶
Verify that inner rings are preserved on load and that area calculations subtract the hole.
Risk types covered¶
Expected behavior¶
| Assertion | Expected |
|---|---|
expect_loadable |
yes |
expect_valid_geometry |
yes |
expect_crs |
yes |
expected_epsg |
4326 |
expected_geometry_types |
Polygon |
Notes¶
Purpose¶
Exercises interior-ring handling. The polygon is valid but contains one hole.
What to expect¶
- Geometry validity checks pass.
- Exactly one polygon hole is present.
- Area-sensitive workflows should subtract the interior ring area.
Typical checks¶
assert_valid_geometry(gdf)assert_has_holes(gdf)assert_geometry_type(gdf, "Polygon")assert_epsg(gdf, 4326)
Common failure modes¶
- Inner ring dropped during load/serialization.
- Incorrect area if hole is ignored.
- Ring orientation assumptions causing geometry rewrites.
Required capabilities¶
loadgeometry-validationarea-check
Files¶
- Primary:
geometry.geojson - Notes:
notes.md
Source and license¶
- Source: geocase-curated
- License: MIT
Tags¶
hole interior_ring polygon vector
Related cases¶
- Self-Intersecting Polygon --
self_intersecting_polygon - Shapefile Ring Orientation Reversal --
shapefile_ring_orientation - Ambiguous Engine-dependent Polygon --
ambiguous_engine_dependent_polygon - Classic Antimeridian Polygon --
classic_antimeridian_polygon - CRS Mismatch Overlay Pair --
crs_mismatch_overlay_pair