<div dir="ltr">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. <div><br></div><div>Happy to pursue in the longer term though.</div><div><br></div><div>Cheers, Mike</div><div> </div><div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 30, 2024 at 7:00 AM Michael Sumner <<a href="mailto:mdsumner@gmail.com">mdsumner@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Apr 26, 2024 at 5:37 AM lefsky--- via gdal-dev <<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">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. </div></blockquote><div><br></div><div><br></div><div>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: </div><div><br></div><div><a href="https://github.com/OSGeo/gdal/compare/master...dis-organization:gdal:gdal2tiles-nonbyte" target="_blank">https://github.com/OSGeo/gdal/compare/master...dis-organization:gdal:gdal2tiles-nonbyte</a><br></div><div><br></div><div>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. </div><div><br></div><div>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. </div><div><br></div><div>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): </div><div><br></div><div><a href="https://github.com/hypertidy/sds/blob/main/R/sources.R#L41" target="_blank">https://github.com/hypertidy/sds/blob/main/R/sources.R#L41</a><br></div><div><br></div><div>Cheers, Mike</div><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><br></div><div>Michael <br clear="all"><div><br></div></div><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Michael Lefsky (He/His) <br></div><div>Home Location: HVHF+GH<br></div><div>Cell: 970-980-9036</div><div><div><span style="color:rgb(51,51,51);font-family:Arial,Helvetica,sans-serif;font-size:12px;white-space:nowrap"><a href="http://www.researcherid.com/rid/A-7224-2009" target="_blank">http://www.researcherid.com/rid/A-7224-2009</a></span><br><div><br><div><em style="color:rgb(96,96,96);font-family:Helvetica;font-size:11px"><span style="font-family:"courier new",courier,"lucida sans typewriter","lucida typewriter",monospace"><strong>“</strong><strong>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.</strong><strong></strong><strong>" Gary Brecher / Portis</strong></span></em></div></div></div></div><div><em style="color:rgb(96,96,96);font-family:Helvetica;font-size:11px"><span style="font-family:"courier new",courier,"lucida sans typewriter","lucida typewriter",monospace"><strong><br></strong></span></em></div><div><div style="color:rgb(34,34,34)"><font size="1">*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;</font></div><div style="color:rgb(34,34,34)"><font size="1"><a href="http://www.utemountainutetribe.com/" style="color:rgb(17,85,204)" target="_blank">http://www.utemountainutetribe.com/</a><br></font></div><div style="color:rgb(34,34,34)"><font size="1"><a href="http://www.cheyennenation.com/" style="color:rgb(17,85,204)" target="_blank">http://www.cheyennenation.com/</a><br></font></div><div style="color:rgb(34,34,34)"><font size="1"><a href="https://cheyenneandarapaho-nsn.gov/" style="color:rgb(17,85,204)" target="_blank">https://cheyenneandarapaho-nsn.gov/</a><br></font></div><div style="color:rgb(34,34,34)"><font size="1"><a href="https://native-land.ca/" style="color:rgb(17,85,204)" target="_blank">https://native-land.ca/</a><br></font></div></div><div><br></div></div></div></div></div></div></div>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature">Michael Sumner<br>Software and Database Engineer<br>Australian Antarctic Division<br>Hobart, Australia<br>e-mail: <a href="mailto:mdsumner@gmail.com" target="_blank">mdsumner@gmail.com</a></div></div>
</blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature">Michael Sumner<br>Software and Database Engineer<br>Australian Antarctic Division<br>Hobart, Australia<br>e-mail: <a href="mailto:mdsumner@gmail.com" target="_blank">mdsumner@gmail.com</a></div>