georust / geotiff

Reading GeoTIFFs in Rust, nothing else!
MIT License
83 stars 23 forks source link

Images for testing purposes #20

Open gschulze opened 1 month ago

gschulze commented 1 month ago

I'm looking for GeoTIFFs for testing purposes. In particular, I want something like https://download.osgeo.org/geotiff/samples/GeogToWGS84GeoKey/GeogToWGS84GeoKey5.tif for testing various coordinate transformation methods, with easily identifiable control points:

  1. One image using the ModelTiePoint and PixelScale tags
  2. One image using the ModelTransformation tag
  3. One image using multiple ModelTiePoints (or ground control points)

I'm currently trying to prepare such images, but maybe I can save some work by using existing images. Do you have an idea where to look, @weiji14, @dominikbucher, or @kylebarron?

kylebarron commented 1 month ago

I don't know but @geospatial-jeff and @vincentsarago might

kylebarron commented 1 month ago

Check out https://github.com/OSGeo/gdal/tree/master/autotest/gcore/data

weiji14 commented 1 month ago

Yeah, I wish there was a standard set of GeoTIFF files for testing somewhere. Generally I try and find them in the test/ folder of repos, e.g.:

  1. One image using multiple ModelTiePoints (or ground control points)

Only dataset with GCPs I'm aware of are Sentinel-1 GRD files but they're quite big... Maybe see this comment for ideas - https://github.com/gjoseph92/stackstac/pull/182#issuecomment-1256574850, specifically the pointer to how rioxarray generates a synthetic GeoTIFF with GCPs.

Oh, and we might want to be careful with having too many GeoTIFF files commited to git history. If it's possible to generate synthetic images on-the-fly and test roundtrip write/read operations, that would be best. But I understand that we might still want a few test fixture files to test only the read-part.

vincentsarago commented 1 month ago
  1. One image using multiple ModelTiePoints (or ground control points)

You can find a small one in rio-tiler fixture: https://github.com/cogeotiff/rio-tiler/blob/main/tests/fixtures/cog_gcps.tif

If it's possible to generate synthetic images on-the-fly and test roundtrip write/read operations, that would be best. But I understand that we might still want a few test fixture files to test only the read-part.

@geospatial-jeff started to work on https://github.com/cogeotiff/cog-fixtures/tree/master

in rio-tiler I've also a dataset fixture https://github.com/cogeotiff/rio-tiler/blob/main/tests/conftest.py#L23-L94

gschulze commented 1 month ago

@kylebarron, @weiji14, @vincentsarago thank you all for your suggestions. I have to see whether there's something usable for that purpose; otherwise, I'll probably create a test image myself.