Empty Polygon¶
An explicitly empty polygon geometry used to verify that code handles empty-but-typed polygon inputs without crashing.
| Property | Value |
|---|---|
| Case ID | empty_polygon |
| Category | vector |
| Format | GeoJSON |
| Geometry type | Polygon |
| CRS | EPSG:4326 |
| Location | No geometry -- the case is deliberately empty |
| Test tier | unit |
| Size class | tiny |
| Storage class | bundled |
| Redistributable | yes |
| Loader | geopandas |
| Status | validated |
Use this case¶
import pytest
@pytest.mark.geocase_case("empty_polygon")
def test_empty_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:
What this case checks¶
Confirm that geometry utilities gracefully handle Polygon EMPTY inputs.
Risk types covered¶
Expected behavior¶
| Assertion | Expected |
|---|---|
expect_loadable |
yes |
expect_valid_geometry |
yes |
expect_crs |
yes |
expected_epsg |
4326 |
expected_geometry_types |
Polygon |
Known consumer divergences¶
Disagreements already investigated on this case. If your reader reproduces one of these, it is catalogued — not a new finding.
lonboard — lonboard 0.11, geoarrow-pyarrow 0.5
from_geopandas on an all-empty geometry frame raises ValueError: 0-length dimension rather than producing an empty layer.
geoarrow-pyarrow — geoarrow-pyarrow 0.5
as_geoarrow raises an internal AttributeError on an all-empty frame, because infer_type_common returns pa.null() and the caller assumes a geometry type.
Notes¶
Used for functions that should accept or short-circuit on an empty polygon geometry.
Required capabilities¶
loadgeometry-validation
Files¶
- Primary:
geometry.geojson - Notes:
notes.md
Source and license¶
- Source: geocase-curated
- License: MIT
Tags¶
baseline empty polygon vector
Related cases¶
- Empty Geometry in GeoPackage --
empty_geometry_gpkg - Polygon CSV WKT Baseline --
polygon_csv_wkt_baseline - Polygon FlatGeobuf Baseline --
polygon_flatgeobuf_baseline - Polygon GeoPackage Baseline --
polygon_geopackage_baseline - Polygon GML Baseline --
polygon_gml_baseline