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

2025-03-19 Thread Craig de Stigter via gdal-dev
Thanks for the replies. Using a FGB tile index without GTI/VRT
unfortunately doesn't solve the problem since at some point the caller will
still have to (pointlessly) transform the tiles, but thanks for the
suggestion anyway.

The VRT connection string sounds ideal; I hadn't seen that before. I had
been considering adding VRTs for each tile but tons of XML files lying
around wasn't very appealing, so it's great that we can do that without the
extra files!

Thanks
Craig

On Wed, 19 Mar 2025 at 22:24, Even Rouault 
wrote:

> Craig,
> >
> > Is there a way to override the projection of the source tiles when
> > using the GTI driver?
>
> One way would be to put in the GTI index
> "vrt:///path/to/file?a_srs=srs_def" where srs_def is an EPSG code or a
> WKT string (cf
> https://gdal.org/en/stable/drivers/raster/vrt.html#vrt-connection-string)
>
> Even
>
> --
>
> http://www.spatialys.com
> My software is free, but my time generally not.
>
>

-- 
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


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

2025-03-19 Thread Even Rouault via gdal-dev

Craig,


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


One way would be to put in the GTI index 
"vrt:///path/to/file?a_srs=srs_def" where srs_def is an EPSG code or a 
WKT string (cf 
https://gdal.org/en/stable/drivers/raster/vrt.html#vrt-connection-string)


Even

--

http://www.spatialys.com
My software is free, but my time generally not.

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


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