Skip to content

Add support for GDAL VRT allowing client side regridding #149

@danlooo

Description

@danlooo

Currently, we have an OSM slippy tiles server to integrate DGGS data in other tools such as leaflet or QGIS. This is server side rendering. However, one might also want to have client side regridding, e.g. to put the data on storage only clouds that don't provide computing ressources. One solution would be GDAL virtual rasters (VRT).

However, this VRT file results on error No transform is available between PROJ-based coordinate operation and Custom CRS: GEOGCRS["unknown",DATUM["Unknown based on WGS 84 e…. in qgis and error ERROR 1: PROJ: proj_crs_get_coordinate_system: Object is not a SingleCRS in gdal. It seems that we can't support VRT for DGGS data.

VRT file:

<VRTDataset rasterXSize="64" rasterYSize="32">
  <GeoTransform> -5.0000000000000000e-01, 1.0000000000000000e+00, 0.0000000000000000e+00,
    -5.0000000000000000e-01, 0.0000000000000000e+00, 1.0000000000000000e+00</GeoTransform>
  <SRS>
    CONVERSION["PROJ-based coordinate operation",
    METHOD["PROJ-based operation method: +proj=isea"]]
  </SRS>
  <Metadata>
    <MDI key="actual_range">{144,222.75}</MDI>
    <MDI key="dggs_dggsrs">ISEA4D.Penta</MDI>
    <MDI key="dggs_resolution">5</MDI>
    <MDI key="missing_value">1.00000000000000005e+32</MDI>
    <MDI key="name">Gray</MDI>
  </Metadata>
  <VRTRasterBand dataType="Float64" band="1">
    <NoDataValue>1e+32</NoDataValue>
    <SimpleSource>
      <SourceFilename relativeToVRT="0">
        ZARR:"/vsicurl/https://s3.bgc-jena.mpg.de:9000/dggs/natural-earth.dggs.zarr":/Gray:0</SourceFilename>
      <SourceBand>1</SourceBand>
      <SourceProperties RasterXSize="64" RasterYSize="32" DataType="Float64" BlockXSize="64"
        BlockYSize="32" />
      <SrcRect xOff="0" yOff="0" xSize="64" ySize="32" />
      <DstRect xOff="0" yOff="0" xSize="64" ySize="32" />
    </SimpleSource>
  </VRTRasterBand>
</VRTDataset>

tested on qgis:

QGIS version3.42.2-Münster
QGIS code branchRelease 3.42
 
Libraries
Qt version5.15.15
Python version3.12.10
GDAL version3.10.3
PROJ version9.6.0
EPSG Registry database versionv12.004 (2025-03-02)
GEOS version3.13.1-CAPI-1.19.2
SQLite version3.49.1
PDAL version2.8.4
PostgreSQL client version17.5
SpatiaLite version5.1.0
QWT version6.1.5
QScintilla2 version2.14.1
OS versionKDE Flatpak runtime
 
Active Python plugins
processing2.12.99
MetaSearch0.3.6
db_manager0.1.20

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions