Skip to content

Advertise GTiff batch outputs as Cloud-Optimized GeoTIFF media type#502

Open
Copilot wants to merge 2 commits into
masterfrom
copilot/fix-media-type-for-cogs
Open

Advertise GTiff batch outputs as Cloud-Optimized GeoTIFF media type#502
Copilot wants to merge 2 commits into
masterfrom
copilot/fix-media-type-for-cogs

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 14, 2026

Batch job results were exposing COG files with the generic GeoTIFF media type (image/tiff; application=geotiff), which causes downstream clients to treat them as non-cloud-optimized rasters. This change aligns GTiff result metadata with COG semantics by emitting the COG profile media type.

  • Media type mapping update

    • Updated IOFORMATS so GTiff resolves to:
      • image/tiff; application=geotiff; profile=cloud-optimized
    • This ensures response/content typing and STAC asset typing consistently advertise cloud-optimized GeoTIFF for GTiff outputs.
  • Batch asset metadata consistency

    • Updated dummy backend batch-result asset metadata for .tiff outputs to use the same COG media type.
    • Keeps API-level job result payloads and download endpoints aligned with format mapping behavior.
  • Expectation alignment in tests

    • Updated GTiff/GeoTIFF MIME-type assertions in focused test coverage (ioformats, execute response headers, and batch job result/view assertions) to the COG media type.

Example of the effective change:

# Before
FormatInfo("GTiff", "image/tiff; application=geotiff", extension="geotiff")

# After
FormatInfo("GTiff", "image/tiff; application=geotiff; profile=cloud-optimized", extension="geotiff")

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • artifactory.vgt.vito.be
    • Triggering command: /usr/bin/python /usr/bin/python /usr/lib/python3/dist-packages/pip/__pip-REDACTED__.py install --ignore-installed --no-user --prefix /tmp/pip-build-env-g5lftlm1/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i REDACTED --extra-index-url REDACTED -- setuptools>=40.8.0 (dns block)
    • Triggering command: /usr/bin/python python -m pip install -e .[dev] --extra-index-url REDACTED (dns block)
  • schemas.stacspec.org
    • Triggering command: /usr/bin/python python -m pytest -q tests/test_views.py::TestBatchJobs (dns block)
    • Triggering command: /usr/bin/python python -m pytest -q tests/test_views.py::TestBatchJobs::test_get_job_results_100 tests/test_views.py::TestBatchJobs::test_get_job_results_110 tests/test_views.py::TestBatchJobs::test_get_job_results_public_href_asset_100 tests/test_views.py::TestBatchJobs::test_get_job_results_signed_100 tests/test_views.py::TestBatchJobs::test_get_job_results_signed_110 tests/test_views.py::TestBatchJobs::test_get_job_results_signed_with_expiration_100 tests/test_views.py::TestBatchJobs::test_get_job_results_signed_with_expiration_110 tests/test_views.py::TestBatchJobs::test_download_result tests/test_views.py::TestBatchJobs::test_download_result_nested_path tests/test_views.py::TestBatchJobs::test_download_result_with_s3_object_storage tests/test_views.py::TestBatchJobs::test_download_result_signed tests/test_views.py::TestBatchJobs::test_download_result_signed_with_expiration tests/test_views.py::TestBatchJobs::test_download_result_signed_with_expiration_supports_range_request tests/test_views.py::TestBatchJobs::test_download_result_with_s3_object_storage_with_expiration_supports_range_request (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI linked an issue May 14, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Fix media type for COGs in asset Advertise GTiff batch outputs as Cloud-Optimized GeoTIFF media type May 14, 2026
Copilot finished work on behalf of jdries May 14, 2026 18:09
Copilot AI requested a review from jdries May 14, 2026 18:09
@jdries jdries marked this pull request as ready for review May 14, 2026 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wrong media type for COGs

2 participants