<div dir="ltr"><div dir="ltr">If it can be useful to anyone facing the same issue, my little script for parsing these aux.xml and writing the expected GDAL commands to rectify the raster is available here <a href="https://github.com/domlysz/PAM-GCPs-warper">https://github.com/domlysz/PAM-GCPs-warper</a></div><div dir="ltr"><br></div><div>Regards<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le mer. 20 mars 2019 à 18:09, Dominique Lyszczarz <<a href="mailto:domlysz@gmail.com">domlysz@gmail.com</a>> a écrit :<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">Thank you Even for these informations, that's good to know. I've added the .aux.xml in the repository if it can be useful as reference. Finally, I got good results with gdal_translate -gcp option following by gdalwarp. Fun fact, in the PAM file Y image coordinates are negatives values but must be pushed as positive number in gdal_translate command.<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le mer. 20 mars 2019 à 15:57, Even Rouault <<a href="mailto:even.rouault@spatialys.com" target="_blank">even.rouault@spatialys.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Dominique,<br>
> <br>
> I'm trying to read a raster georeferenced with ArcGIS. It's a jpg file<br>
> coming with a PAM file (.aux.xml) that store GCPs and define a polynomial<br>
> transformation of order 3. Unfortunately GDAL does not take the PAM file<br>
> into account and gdalinfo does not report GCPs. After some investigations,<br>
> I found this commit<br>
> <<a href="https://github.com/OSGeo/gdal/commit/f8822eb50466fb740e228b8c6a7f066b916faa" rel="noreferrer" target="_blank">https://github.com/OSGeo/gdal/commit/f8822eb50466fb740e228b8c6a7f066b916faa</a><br>
> 0a> that suggest PAM files are supported by GDAL but only for TIFF dataset.<br>
<br>
Not really. PAM files are supported for most formats, included JPEG, but the <br>
ESRI specific GCP decoding was limited for now to the GTiff format, mostly <br>
because of the oddity you noticed: in the case for which this was developed <br>
for<br>
(see <a href="https://lists.osgeo.org/pipermail/gdal-dev/2017-January/045854.html" rel="noreferrer" target="_blank">https://lists.osgeo.org/pipermail/gdal-dev/2017-January/045854.html</a> and <br>
the related email thread), pixel coordinates were indeed surprisingly in <br>
inches and from the bottom left origin. So I couldn't/didn't want to <br>
generalize that to core PAM processing.<br>
<br>
> <br>
> I'm a bit confused with theses PAM files, is there any technical doc from<br>
> ESRI? <br>
<br>
Not to my knowledge. Initially PAM was developed for GDAL itself, but it seems <br>
ESRI developed some extensions on top of it, like the one you are facing to.<br>
<br>
> The file can be downloaded here :<br>
> <a href="https://drive.google.com/drive/folders/1hZXncJhcfZI0Uem-oCfUsruO9mPwWD0U?usp" rel="noreferrer" target="_blank">https://drive.google.com/drive/folders/1hZXncJhcfZI0Uem-oCfUsruO9mPwWD0U?usp</a><br>
> =sharing<br>
<br>
You didn't include the most interesting part, that is the .aux.xml file itself<br>
<br>
Even<br>
<br>
-- <br>
Spatialys - Geospatial professional services<br>
<a href="http://www.spatialys.com" rel="noreferrer" target="_blank">http://www.spatialys.com</a><br>
</blockquote></div>
</blockquote></div>