Skip to content

Dateline crossing polygon

vectorGeoJSONPolygonEPSG:4326tinybundled

A polygon crossing the dateline. Its bounding box spans the whole planet unless antimeridian wrapping is handled, breaking bbox filters and reprojection.

Polygon geometry of dateline_crossing_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 dateline_crossing_polygon
Category vector
Format GeoJSON
Geometry type Polygon
CRS EPSG:4326
Location Antimeridian, North Pacific — 170.00°E, 40.00°N → 170.00°W, 50.00°N (crosses the antimeridian — the box runs east from the first corner, over 180°)
Test tier unit
Size class tiny
Storage class bundled
Redistributable yes
Loader geopandas
Status validated

Use this case

import pytest


@pytest.mark.geocase_case("dateline_crossing_polygon")
def test_dateline_crossing_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

Detect code that assumes longitude continuity across the antimeridian or produces incorrect bounds.

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

Antimeridian stress case for longitude wrapping and bounds logic.

What to expect

  • Geometry is valid and in EPSG:4326.
  • Naive min/max longitude assumptions may break.
  • Reprojection/bounds operations can reveal dateline handling bugs.

Typical checks

  • assert_valid_geometry(gdf)
  • assert_epsg(gdf, 4326)
  • assert_geometry_type(gdf, "Polygon")
  • Compare bounds before/after reprojection for sanity.

Common failure modes

  • Incorrect bbox crossing interpretation.
  • Longitude normalization bugs around -180/180.

Required capabilities

  • load
  • bounds-check
  • reprojection

Files

Browse this case on GitHub

Source and license

  • Source: geocase-curated
  • License: MIT

Tags

antimeridian crs dateline polygon vector