[gdal-dev] gdal2tiles for floating point images

Javier Jimenez Shaw j1 at jimenezshaw.com
Tue Apr 30 09:58:13 PDT 2024


I know that this is not what you want... but have you considered to use
COG? Openlayers supports it, Leaflet I am not sure (I hope it does, at
least via plugin).
To improve performance, I warped to web mercator with GDAL, so Openlayers
is not wasting time on the reprojection.

On Tue, 30 Apr 2024 at 15:37, Michael Sumner via gdal-dev <
gdal-dev at lists.osgeo.org> wrote:

> Ok so my naive edits are clearly not enough, they still get written as
> Byte so it's deeper in the target spec and spread across a few places I'm
> not ready to get across yet.
>
> Happy to pursue in the longer term though.
>
> Cheers, Mike
>
>
> On Tue, Apr 30, 2024 at 7:00 AM Michael Sumner <mdsumner at gmail.com> wrote:
>
>>
>>
>> On Fri, Apr 26, 2024 at 5:37 AM lefsky--- via gdal-dev <
>> gdal-dev at lists.osgeo.org> wrote:
>>
>>> I'd like to have a version of gdal2tiles that handles image types other
>>> than uint8. Is there a reason why it doesn't handle those types of images?
>>> It appears I'd have to modify the output format from png to tiff.  I have
>>> never modified gdal source before and I'm wondering if this modification
>>> (which appears straightforward to a naive user) hasn't been done before.
>>>
>>
>>
>> Hello, it appears to be sufficient to add GTiff to tiledriver options,
>> handle the file extension, and add an option to override the error/message
>> that advises conversion to Byte:
>>
>>
>> https://github.com/OSGeo/gdal/compare/master...dis-organization:gdal:gdal2tiles-nonbyte
>>
>> I wanted this myself as I'm working on a version of the tiling in an R
>> package, and I'm not confident enough about it without being able to
>> compare to gdal2tiles.py.
>>
>> It will need care to prepare it and merge into GDAL itself, with some
>> thought about documentation, implications for html output (it's compleltely
>> incompatible with the html produced I expect), and tests, but if you want
>> to use it locally it seems ok and I'm happy to follow up off-list.
>>
>> Note that you can use VRT to reference such a tiled output for numeric
>> data, I used it for a tiled global elevation source here (so if we fold
>> this into GDAL that could be a nice option to include, VRT for reading as
>> TMS):
>>
>> https://github.com/hypertidy/sds/blob/main/R/sources.R#L41
>>
>> Cheers, Mike
>>
>>
>>
>>
>>>
>>> Michael
>>>
>>>
>>> --
>>> Michael Lefsky (He/His)
>>> Home Location: HVHF+GH
>>> Cell: 970-980-9036
>>> http://www.researcherid.com/rid/A-7224-2009
>>>
>>> *“for being prematurely, and worse, intuitively right — there’s a heavy
>>> price. But for being wrong — no, not so long as you’re wrong in a pack."
>>> Gary Brecher / Portis*
>>>
>>> *I acknowledge that I live and work on stolen land. This is the land of
>>> the Cheyenne, Arapaho, Ute, and Ocheithi Sakowin people. To learn more
>>> about these nations, please visit;
>>> http://www.utemountainutetribe.com/
>>> http://www.cheyennenation.com/
>>> https://cheyenneandarapaho-nsn.gov/
>>> https://native-land.ca/
>>>
>>> _______________________________________________
>>> gdal-dev mailing list
>>> gdal-dev at lists.osgeo.org
>>> https://lists.osgeo.org/mailman/listinfo/gdal-dev
>>>
>>
>>
>> --
>> Michael Sumner
>> Software and Database Engineer
>> Australian Antarctic Division
>> Hobart, Australia
>> e-mail: mdsumner at gmail.com
>>
>
>
> --
> Michael Sumner
> Software and Database Engineer
> Australian Antarctic Division
> Hobart, Australia
> e-mail: mdsumner at gmail.com
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20240430/82b129fa/attachment-0001.htm>


More information about the gdal-dev mailing list