<div dir="ltr"><div>Even,<br></div> Thank you for the very detailed responses. Time to go do some more googling on GDAL perl bindings (or dig into python)<br><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Tue, Jul 1, 2014 at 4:37 PM, Even Rouault <span dir="ltr"><<a href="mailto:even.rouault@mines-paris.org" target="_blank">even.rouault@mines-paris.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Le mardi 01 juillet 2014 15:50:18, Jesse McGraw a écrit :<br>
<div class="">> On Mon, Jun 30, 2014 at 3:07 PM, Even Rouault<br>
> <<a href="mailto:even.rouault@mines-paris.org">even.rouault@mines-paris.org</a>><br>
><br>
> wrote:<br>
> > That might the problem. If you create the GCPs on the PDF and not on the<br>
> > PNG,<br>
> > and that the PDF has rotation, pdftoppm I think will apply the rotation,<br>
> > hence<br>
> > the axis swapping.<br>
><br>
> Remember, I'm using the PNG I've created for all gdal operations, gdal<br>
> never interacts with the source PDF<br>
><br>
> I'm probably fundamentally misunderstanding some aspect of the command<br>
> lines I'm using in gdal*. My end goal is to get the necessary affine<br>
> transformation information to display the PNG I create in step 3a properly<br>
> in a separate Android moving-map application (eg. your current position<br>
> displayed on the diagram as you move around the airport)<br>
<br>
</div>Jesse,<br>
<br>
hum ok, with the images I think I now understand the situation (I've only<br>
looked at the landscape diagram) and what you want.<br>
<br>
You probably don't want to use gdalwarp, which by default will result in a<br>
north-up image. You likely want to compute the geotransform affine matrix for<br>
your GCPs and set it, since indeed your GCPs define a 1st-order transformation.<br>
<br>
The GDAL C API has GDALGCPsToGeoTransform() which does exactly this. I see it<br>
is also available in the Python API : gdal.GCPsToGeoTransform().<br>
See <a href="http://svn.osgeo.org/gdal/trunk/autotest/gcore/gcps2geotransform.py" target="_blank">http://svn.osgeo.org/gdal/trunk/autotest/gcore/gcps2geotransform.py</a> for<br>
how to use it.<br>
<br>
You could then just do a CreateCopy() of the PNG to a VRT, and set the<br>
returned geotransform by the previous step with SetGeoTransform().<br>
<span class="HOEnZb"><font color="#888888"><br>
Even<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
--<br>
Geospatial professional services<br>
<a href="http://even.rouault.free.fr/services.html" target="_blank">http://even.rouault.free.fr/services.html</a><br>
</div></div></blockquote></div><br></div>