[gdal-dev] Tiled GeoTiff that reduce the amount of reads in XYZ maps
Guy Doulberg
guyd at satellogic.com
Sun Jun 17 06:51:00 PDT 2018
Thanks Even
I tried both ways and in both I am still getting a lot of requests, I am
exepcting only few, one for the headers and one for the tile:
The resolution I used is driven from
https://wiki.openstreetmap.org/wiki/Zoom_levels
and the bounds I calculated using mercantile
so an example of what I ran is:
gdal_translate source.tif target.tif -co TILED=YES -co
COPY_SRC_OVERVIEWS=YES -co COMPRESS=LZW -tr 0.596 0.596 -projwin
675091.8338146766 4706074.957461731 684875.7734351791 4696291.017841227
One more thing, the raster I got is 1/3 of the size of the original raster
On Sun, Jun 17, 2018 at 12:00 PM, Even Rouault <even.rouault at spatialys.com>
wrote:
> On dimanche 17 juin 2018 10:19:34 CEST Guy Doulberg wrote:
> > Hi all,
> >
> > I am trying to use cloud optimized geotiff(cog) to reduce the block
> fetched
> > when accessing a raster.
> >
> > The use case I am trying to build, is a TileServer that serves tile in
> > openlayer map.
> > The rasters are to be stored on a remote location, in my case azure blob
> > storage.
> >
> > We were able to do that, and you can see the code here:
> > https://github.com/satellogic/telluric/blob/master/telluric/
> > georaster.py#L1497
> >
> > The problem is, when running in verbose mode I can see that there are
> many
> > requests to the blob storage,
> >
> > I am responsible of creating the raster, is there a way in your opinion I
> > can create the raster aligned to the XYZ tiling system so when I try to
> > fetch a tile from the raster I will be able to do that with a single or
> > close to that call?
>
> If your raster source is not already in WebMercator projection, you could
> use
> gdalwarp with the appropriate -te and -tr to align on the boundaries of
> XYZ
> tiling scheme at a given zoom level.
>
> If your raster is already in WebMercator, gdal_translate -projwin -tr
> would do
>
> If you don't want to compute the bounds, you could use gdal_translate to
> MBTiles that will use gdalwarp internally to reproject and align on XYZ
> tiling
> scheme automatically, followed by gdal_translate to TIFF with -oo
> USE_BOUNDS=NO so that the extent used aligns on tile boundaries.
>
> Even
>
> --
> Spatialys - Geospatial professional services
> http://www.spatialys.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20180617/eaf747db/attachment.html>
More information about the gdal-dev
mailing list