Re: [gdal-dev] GTI: override SRS of source tiles (disable reprojection)

2025-03-18 Thread Scott via gdal-dev
If your rasters are invalid with bad projections or unreadable by 
gdalinfo, disregard the following.


One way to create massive tile index's with individual rasters having 2 
or more different projections is to use good old gdaltileindex. It will 
create an index of tiles (raster files) and bounding box geometry in a 
specified EPSG without altering the underlying raster projection. Such as:


gdaltindex
   -lyr_name bbox
   -tileindex file
   -t_srs EPSG:4326
result.fgb rast_3857.tif rast_4269.tif

The bbox geometry column will be 4326, regardless of what the raster is. 
The above will create a tile index in FlatGeobuf format. FGB is 
important because now you can grab a bbox of only the rasters you need. 
Your client/user will still have to deal with the different projections 
of each raster in the index.


While GTI can also use FGB, gdaltileindex with FGB is a bit more 
lightweight. You can do lots of flexible, non-standard things by adding 
meta data (or whatever) for each tile. Here's a write-up and working 
example using 1 FGB tile index, 514 COG's and a LeafLet client:


https://www.postholer.com/fgbcog/

Hope that helps!
Scott

On 3/18/25 17:13, Craig de Stigter via gdal-dev wrote:

Hi folks

I'm working on converting an existing VRT mosaic pipeline to use GTI to 
improve its scalability with huge layers.


A problem is that our individual raster tiles may have projections with 
subtly varying WKT, since they were often produced by customers using 
different tooling and in different places. The WKT in the tiles may even 
be altogether incorrect or missing (even though they're actually all the 
same projection as the GTI file itself).


With VRT this was not a problem since the VRT file didn't support 
reprojection and just overrode the projection of its tiles. But with GTI 
I think the driver is unnecessarily passing everything through the warp 
kernel.


Is there a way to override the projection of the source tiles when using 
the GTI driver?


--
Regards,
Craig

Platform Engineer
Koordinates
koordinates.com  / @koordinates twitter.com/koordinates>


___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


[gdal-dev] GTI: override SRS of source tiles (disable reprojection)

2025-03-18 Thread Craig de Stigter via gdal-dev
Hi folks

I'm working on converting an existing VRT mosaic pipeline to use GTI to
improve its scalability with huge layers.

A problem is that our individual raster tiles may have projections with
subtly varying WKT, since they were often produced by customers using
different tooling and in different places. The WKT in the tiles may even be
altogether incorrect or missing (even though they're actually all the same
projection as the GTI file itself).

With VRT this was not a problem since the VRT file didn't support
reprojection and just overrode the projection of its tiles. But with GTI I
think the driver is unnecessarily passing everything through the warp
kernel.

Is there a way to override the projection of the source tiles when using
the GTI driver?

-- 
Regards,
Craig

Platform Engineer
Koordinates
koordinates.com / @koordinates 
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev