Skip to content

Commit d433d39

Browse files
kylebarronclaude
andauthored
test: Add the CRS conformance suite from geotiff-test-data (#181)
* docs: Add design spec for GeoKey to CRS conformance corpus and table-driven builder Design for making GeoKey -> CRS parsing match GDAL/PROJ: a shared conformance corpus and CT table in geotiff-test-data, and a rewrite of _crs.py that interprets the table with pyproj's typed constructors. Written before any code so the manifest schema, table schema, equality definition and known-failures mechanism can be reviewed first. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * docs: Record review answers in the CRS conformance spec Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * docs: Add the implementation plan for the CRS conformance corpus Also records the async-tiff issue/PR in the spec and switches GeoKey names to the no-suffix form and axes to a direction list, so the plan and spec agree. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * docs: Correct Mercator scale keys and polar axes in the CRS spec Found by the corpus review: libgeotiff reads only ProjScaleAtNatOrigin for CT 7, and PROJ gives Polar Stereographic south/south or north/north axes by the sign of the latitude. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * chore: Bump geotiff-test-data for the CRS conformance corpus Also adds the stage 3 plan. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * test: Vendor the GeoTIFF CT method table with a drift test The JSON ships in the wheel under async_geotiff/data for the table-driven builder. pytest now collects only tests/, since the geotiff-test-data submodule carries its own suite with its own dependencies. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * test: Add the GeoKey-to-CRS conformance test with a known-failures list Every row of the geotiff-test-data CRS manifest is opened and its CRS compared to GDAL's with pyproj equivalence (ignoring geographic axis order, as rasterio does), then by projecting the manifest's test point with both CRSs. 34 rows fail against the current builder and are listed as strict xfails so the list can only shrink; two EPSG-coded rows differ only by proj.db version and are non-strict. The submodule bump also brought the corrected predictor-2 fixture, which async-tiff 0.7.0 decodes wrongly on partial tiles; the two read tests for it are strict xfails until async-tiff is fixed. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * test: Link the predictor xfail to async-tiff#370 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * chore: Keep implementation plans out of git Specs are committed under dev-docs/specs; plans are working notes. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * chore: Require async-tiff 0.7.2, which fixes predictor 2 on partial tiles The corrected predictor-2 fixture from geotiff-test-data decodes correctly with 0.7.2, so the read tests need no xfail. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
1 parent d61a4a6 commit d433d39

8 files changed

Lines changed: 2979 additions & 20 deletions

File tree

‎dev-docs/specs/2026-10-26-geokey-crs-conformance-design.md‎

Lines changed: 711 additions & 0 deletions
Large diffs are not rendered by default.

‎fixtures/geotiff-test-data‎

Submodule geotiff-test-data updated 242 files

‎pyproject.toml‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ classifiers = [
2222
keywords = ["geotiff", "tiff", "async", "cog", "raster", "gis"]
2323
dependencies = [
2424
"affine>=2.4.0",
25-
"async-tiff>=0.7.0",
25+
"async-tiff>=0.7.2",
2626
"defusedxml>=0.7.1",
2727
"numpy>=2.0",
2828
"pyproj>=3.3.0",
@@ -72,6 +72,10 @@ docs = [
7272
requires = ["uv_build>=0.8.8,<0.12.0"]
7373
build-backend = "uv_build"
7474

75+
[tool.pytest.ini_options]
76+
# The geotiff-test-data submodule has its own test suite with its own dependencies.
77+
testpaths = ["tests"]
78+
7579
[tool.ruff]
7680
extend-exclude = ["fixtures"]
7781

‎src/async_geotiff/data/__init__.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""Data files shipped with async-geotiff."""

0 commit comments

Comments
 (0)