Fractal Coastline Polygon¶
A Koch snowflake polygon (hexagonal seed, four subdivision passes) standing in for a fractally detailed coastline. 1537 vertices of self-similar crenellation, none of them collinear, so a consumer that simplifies, densifies, or indexes geometry has something with real structure to do.
| Property | Value |
|---|---|
| Case ID | fractal_coastline_polygon |
| Category | vector |
| Format | GeoJSON |
| Geometry type | Polygon |
| CRS | EPSG:4326 |
| Location | Iberian Atlantic coast (synthetic) — 10.00°W, 39.90°N → 7.00°W, 42.50°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("fractal_coastline_polygon")
def test_fractal_coastline_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 a vertex-dense, highly irregular polygon loads and validates intact -- no truncation of the coordinate list, no simplification, no self-intersection introduced by a lossy round-trip.
Expected behavior¶
| Assertion | Expected |
|---|---|
expect_loadable |
yes |
expect_valid_geometry |
yes |
expect_crs |
yes |
expected_epsg |
4326 |
expected_geometry_types |
Polygon |
Notes¶
What this is¶
A Koch snowflake: a regular hexagon on a 1.5-degree circle, subdivided four
times. Each pass replaces every segment a -> b with a, a+(b-a)/3, apex,
a+2(b-a)/3, the apex being the middle third rotated 60 degrees outward. The
vertex count is therefore a closed form -- sides * 4**depth + 1, here
6 * 4**4 + 1 = 1537 coordinates.
Why it exists¶
Before this case, the entire bundled catalog topped out at 10 vertices, and twelve of its canonical geometries were plain five-vertex rectangles. Nothing in it could distinguish a consumer that handles geometry from one that handles rectangles: a bounding-box approximation, an off-by-one in a coordinate loop, or a simplification pass that silently drops detail all score identically against a square.
This polygon has none of the properties a rectangle accidentally has. No three consecutive vertices are collinear, the ratio of its area to its minimum rotated rectangle is well below 0.9, and its perimeter is long relative to its area -- so a bbox stand-in is visibly wrong rather than approximately right.
How it is produced¶
Generated by scripts/generate_vector_fixtures.py (_koch_ring), from pure
math with no PRNG, seeded or otherwise. That is deliberate: the fixture
tree is gated on byte-identical regeneration, and a seeded PRNG is reproducible
only for as long as CPython's random stream is. Coordinates are rounded to six
decimals, matching catalog_extent.py's precision, so nothing churns on
floating-point noise across platforms.
It carries no canonical_source_case_id and no cross_format_canonical tag: it
is not a member of the 60-case transcoding family and must not be compared
against one.
Required capabilities¶
loadbounds-checkgeometry-validation
Files¶
- Primary:
geometry.geojson - Notes:
notes.md
Source and license¶
- Source: geocase-curated
- License: MIT
Tags¶
irregular_geometry polygon procedural valid vector
Related cases¶
- Dense Ring Polygon (4096 vertices) --
dense_ring_polygon_4k - Dense Ring Polygon (4096 vertices, GeoPackage) --
dense_ring_polygon_4k_gpkg - Format-Limited KML Case --
format_limited_kml_case - Format-limited Precision Polygon --
format_limited_precision_polygon - Invalid Geometry at Feature 9,999 (GeoPackage) --
invalid_geometry_at_scale_gpkg