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 <mdsum...@gmail.com> wrote: > > > On Fri, Apr 26, 2024 at 5:37 AM lefsky--- via gdal-dev < > gdal-dev@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@lists.osgeo.org >> https://lists.osgeo.org/mailman/listinfo/gdal-dev >> > > > -- > Michael Sumner > Software and Database Engineer > Australian Antarctic Division > Hobart, Australia > e-mail: mdsum...@gmail.com > -- Michael Sumner Software and Database Engineer Australian Antarctic Division Hobart, Australia e-mail: mdsum...@gmail.com
_______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev