<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p><br>
</p>
<div class="moz-cite-prefix">Le 05/11/2022 à 04:33, Michael Sumner a
écrit :<br>
</div>
<blockquote type="cite"
cite="mid:CAAcGz98Qbvqep=Qt_mLtva+CwPJmoiRVOBE-NfMsQ+DAtc-5KA@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<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. <br>
</div>
</blockquote>
<p>something like</p>
<p>out_ds = gdal.GetDriverByName("GTiff").Create("output.tif",
width, height, number_of_bands, data_type, options =
["TILED=YES"])</p>
<p>out_ds.SetGeoTransform([ some geotransform with rotational terms
])</p>
<p>srs = osr.SpatialReference()</p>
<p>srs.ImportFromEPSG( xxx ) / srs.ImportFromWkt( xxx )<br>
</p>
<p>out_ds.SetSpatialRef( srs )</p>
gdal.Warp(out_ds, src_ds, .... )<br>
<p><br>
</p>
<p><br>
</p>
<blockquote type="cite"
cite="mid:CAAcGz98Qbvqep=Qt_mLtva+CwPJmoiRVOBE-NfMsQ+DAtc-5KA@mail.gmail.com">
<div dir="ltr"> 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"
moz-do-not-send="true" class="moz-txt-link-freetext">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>
<hr style="display:inline-block;width:98%">
<div id="m_-4105275956097184085divRplyFwdMsg" dir="ltr"><font
style="font-size:11pt" face="Calibri, sans-serif"
color="#000000"><b>From:</b> Michael Sumner <<a
href="mailto:mdsumner@gmail.com" target="_blank"
moz-do-not-send="true" class="moz-txt-link-freetext">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"
moz-do-not-send="true" class="moz-txt-link-freetext">bheberlein@wisc.edu</a>><br>
<b>Cc:</b> gdal-dev <<a
href="mailto:gdal-dev@lists.osgeo.org"
target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">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" moz-do-not-send="true"
class="moz-txt-link-freetext">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>
<hr style="display:inline-block;width:98%">
<div
id="m_-4105275956097184085x_m_219862940684509146divRplyFwdMsg"
dir="ltr"><font style="font-size:11pt"
face="Calibri, sans-serif" color="#000000"><b>From:</b>
Michael Sumner <<a
href="mailto:mdsumner@gmail.com"
rel="noreferrer" target="_blank"
moz-do-not-send="true"
class="moz-txt-link-freetext">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"
moz-do-not-send="true"
class="moz-txt-link-freetext">bheberlein@wisc.edu</a>><br>
<b>Cc:</b> gdal-dev <<a
href="mailto:gdal-dev@lists.osgeo.org"
rel="noreferrer" target="_blank"
moz-do-not-send="true"
class="moz-txt-link-freetext">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"
moz-do-not-send="true"
class="moz-txt-link-freetext">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"
moz-do-not-send="true"
class="moz-txt-link-freetext">gdal-dev@lists.osgeo.org</a><br>
<a
href="https://lists.osgeo.org/mailman/listinfo/gdal-dev"
rel="noreferrer" target="_blank"
moz-do-not-send="true"
class="moz-txt-link-freetext">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"
moz-do-not-send="true" class="moz-txt-link-freetext">mdsumner@gmail.com</a></div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
gdal-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/gdal-dev">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
</body>
</html>