<div dir="ltr">yes I see, well you can probably set a target GeoTIFF with the geotransform that you want - and gdalwarp to that as the target.  I don't believe you can do that with gdalwarp directly, and I have no idea with python - and finally I'm sorry to add irrelevant discussion - but this is interesting and I'm going to try it out in R and C++ and would love to see a python example too. <div><br></div><div>Cheers, Mike</div><div><br></div><div><br></div><div><br><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Nov 5, 2022 at 2:21 PM Brendan Heberlein <<a href="mailto:bheberlein@wisc.edu">bheberlein@wisc.edu</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 class="msg-8414452608495145630">




<div dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
Hi Mike,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
regardless of the map projection, it may be desirable to have the grid oriented in one direction or another, e.g. due to the spatial distribution of data points. Although the CRS/SRS designates the coordinate axes, these are not always aligned with the desired
 grid orientation.</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
So, basically I want to be able to specify an arbitrary geotransform array for the output grid. This would allow the grid to be assigned an arbitrary orientation within the CRS frame.</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
Thanks,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
Brendan</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
</div>
<div id="m_-4105275956097184085appendonsend"></div>
<hr style="display:inline-block;width:98%">
<div id="m_-4105275956097184085divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Michael Sumner <<a href="mailto:mdsumner@gmail.com" target="_blank">mdsumner@gmail.com</a>><br>
<b>Sent:</b> Friday, November 4, 2022 6:57 PM<br>
<b>To:</b> Brendan Heberlein <<a href="mailto:bheberlein@wisc.edu" target="_blank">bheberlein@wisc.edu</a>><br>
<b>Cc:</b> gdal-dev <<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a>><br>
<b>Subject:</b> Re: [gdal-dev] Specify Grid Rotation for gdal.Warp() with Geolocation Arrays</font>
<div> </div>
</div>
<div>
<div dir="auto">well, the map projection does this - there are many possibilities. Or, do you have another geolocation array you want as the target? 
<div dir="auto"><br>
</div>
<div dir="auto">If you have an example I'm happy to try a few things, but I'd assumed you had a target map projection in mind. What kind of crs to choose depends on your goal, or is purely to not have north up? </div>
<div dir="auto"><br>
</div>
<div dir="auto">Perhaps there's something terminology wise I'm missing ...</div>
<div dir="auto"><br>
</div>
<div dir="auto">Mike</div>
</div>
<br>
<div>
<div dir="ltr">On Sat, 5 Nov 2022, 10:50 Brendan Heberlein, <<a href="mailto:bheberlein@wisc.edu" target="_blank">bheberlein@wisc.edu</a>> wrote:<br>
</div>
<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
Hi Mike,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
thanks for the response.</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
Can you clarify how I would go about specifying the grid orientation for the output raster? None of -te, -ts or -t_srs address this.</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<br>
</div>
<div id="m_-4105275956097184085x_m_219862940684509146appendonsend"></div>
<hr style="display:inline-block;width:98%">
<div id="m_-4105275956097184085x_m_219862940684509146divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Michael Sumner <<a href="mailto:mdsumner@gmail.com" rel="noreferrer" target="_blank">mdsumner@gmail.com</a>><br>
<b>Sent:</b> Friday, November 4, 2022 6:41 PM<br>
<b>To:</b> Brendan Heberlein <<a href="mailto:bheberlein@wisc.edu" rel="noreferrer" target="_blank">bheberlein@wisc.edu</a>><br>
<b>Cc:</b> gdal-dev <<a href="mailto:gdal-dev@lists.osgeo.org" rel="noreferrer" target="_blank">gdal-dev@lists.osgeo.org</a>><br>
<b>Subject:</b> Re: [gdal-dev] Specify Grid Rotation for gdal.Warp() with Geolocation Arrays</font>
<div> </div>
</div>
<div>
<div dir="auto">that's exactly what the warper does with geolocation arrays, set the target extent, dimension, and crs with -te, -ts, -t_srs with gdalwarp.
<div dir="auto"><br>
</div>
<div dir="auto">python will have those analogous controls for the warper.</div>
<div dir="auto"><br>
</div>
<div dir="auto">Cheers, Mike</div>
<div dir="auto"><br>
</div>
<div dir="auto"><br>
</div>
</div>
<br>
<div>
<div dir="ltr">On Sat, 5 Nov 2022, 01:23 Brendan Heberlein via gdal-dev, <<a href="mailto:gdal-dev@lists.osgeo.org" rel="noreferrer" target="_blank">gdal-dev@lists.osgeo.org</a>> wrote:<br>
</div>
<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
Hello,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
I would like to be able to warp an image dataset using a geolocation array, while specifying the grid to which the output dataset is sampled. Specifically, I want to be able to warp the dataset to a grid which is not oriented North-up.</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
Can GDAL support this currently? Or, what is the likelihood this could be supported in the future?</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
I primarily rely on the Python bindings, so a solution within that framework would be ideal for me.</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
Thanks!</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
     — Brendan</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<br>
</div>
</div>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" rel="noreferrer" 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>
</div>
</div>
</blockquote>
</div>
</div>
</div>

</div></blockquote></div><br clear="all"><div><br></div>-- <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>