<p dir="ltr">Nice one, thanks! (I had a fomenting PR to implement on the fly geolocation array config, so I'll use your hallucination for the design phase).</p>
<p dir="ltr">đ€</p>
<br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, 19 Oct 2024, 14:44 Even Rouault, <<a href="mailto:even.rouault@spatialys.com">even.rouault@spatialys.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>
<div>
<p><br>
</p>
<div>Le 18/10/2024 Ă 23:32, Michael Sumner a
écrit :<br>
</div>
<blockquote type="cite">
<p dir="ltr">I didn't know you could do that with -to!! That's
awesome </p>
<p dir="ltr">đ€</p>
</blockquote>
<p>Hum, sorry for giving a wrong track, it seems the newly LLM
module implemented in my brain has hallucinated... <br>
</p>
<p>So you have rather to create a geoloc.vrt file with</p>
<p>gdal_translate input.tif geoloc.vrt -b 2 -b 1<br>
</p>
<p>and then;</p>
<p>gdal_translate input.tif imagery.vrt -b 3<br>
<br>
gdalwarp imagery.vrt imagery_warped.tif -geoloc -to
GEOLOC_ARRAY=geoloc.vrt -a_srs EPSG:4326Â -overwrite<br>
</p>
<blockquote type="cite">
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Sat, 19 Oct 2024, 05:01
Even Rouault via gdal-dev, <<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank" rel="noreferrer">gdal-dev@lists.osgeo.org</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<p>Conrad,</p>
<p>Try something like:</p>
<p>gdal_translate input.tif imagery.vrt -b 3<br>
</p>
<p>gdalwarp imagery.vrt imagery_warped.tif -geoloc -to
X_DATASET=input.tif -to X_BAND=2 -to Y_DATASET=input.tif
-to Y_BAND=1 -to PIXEL_OFFSET=0 -to PIXEL_STEP=1 -to
LINE_OFFSET=0 -to LINE_STEP=1 -to SRS=EPSG:4326 -a_srs
EPSG:4326Â -overwrite<br>
</p>
<p>Obviously I have most certainly got something wrong in
the above, but hopefully with a tiny tweaking that should
put you on the right track.<br>
</p>
<p>Reference: <a href="https://gdal.org/en/latest/development/rfc/rfc4_geolocate.html" rel="noreferrer noreferrer" target="_blank">https://gdal.org/en/latest/development/rfc/rfc4_geolocate.html</a><br>
</p>
<p>Even<br>
</p>
<div>Le 18/10/2024 Ă 12:37, Javier Jimenez Shaw via gdal-dev
a écrit :<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>Is it an actual grid? in the meaning of having
constant step size in X and Y.</div>
<div>In that case the geolocation is just the corner and
the x and y sizes. You can convert to a georeference
raster, and warp it.<br>
</div>
<div>If it is not the case, you have something more like
a 2D pointcloud, or a bunch of poins in a strange
vector format.<br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Fri, 18 Oct 2024 at
12:20, Conrad Bielski via gdal-dev <<a href="mailto:gdal-dev@lists.osgeo.org" rel="noreferrer noreferrer" 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>
<div style="font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:16px">
<div dir="ltr">Hello GDAL-experts,</div>
<div dir="ltr"><br>
</div>
<div dir="ltr">normally when I use GDAL for
reprojecting imagery, the projection information
that I use is the source spatial reference (SRS)
associated with the imagery. However, now I have
imagery which is lat/lon geographic and I have
two separate bands which also carry the pixel
geographic information. So the following raster
inputs all the same size:</div>
<div dir="ltr">1. Band 1 = latitude</div>
<div dir="ltr">2. Band 2 = longitude</div>
<div dir="ltr">3. Band 3 = imagery</div>
<div dir="ltr"><br>
</div>
<div dir="ltr">The question I have is how best to
integrate this information into a reprojection
workflow?</div>
<div dir="ltr"><br>
</div>
<div dir="ltr">I presume that gdalwarp is the best
option here, but how can I take advantage of the
individual pixel location information (rather
than just the extents for example)? I know that
I can mosaic into an existing file that I have
already created in the target projection. Is
this the best way to apply gdalwarp in this
context?</div>
<div dir="ltr"><br>
</div>
<div dir="ltr">I'm just wondering what is the best
way to integrate the lat/lon pixel information
into my warping using gdalwarp.</div>
<div dir="ltr"><br>
</div>
<div dir="ltr">Thanks in advance for your help,</div>
<div dir="ltr">Conrad<br>
</div>
</div>
</div>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" rel="noreferrer noreferrer" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="noreferrer noreferrer noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</blockquote>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
gdal-dev mailing list
<a href="mailto:gdal-dev@lists.osgeo.org" rel="noreferrer noreferrer" target="_blank">gdal-dev@lists.osgeo.org</a>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="noreferrer noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
</blockquote>
<pre cols="72">--
<a href="http://www.spatialys.com" rel="noreferrer noreferrer" target="_blank">http://www.spatialys.com</a>
My software is free, but my time generally not.
Butcher of all kinds of standards, open or closed formats. At the end, this is just about bytes.</pre>
</div>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" rel="noreferrer noreferrer" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="noreferrer noreferrer noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</blockquote>
</div>
</blockquote>
<pre cols="72">--
<a href="http://www.spatialys.com" target="_blank" rel="noreferrer">http://www.spatialys.com</a>
My software is free, but my time generally not.
Butcher of all kinds of standards, open or closed formats. At the end, this is just about bytes.</pre>
</div>
</blockquote></div>