[gdal-dev] How to tell gdal_translate replace BLOCKA in a NITF to NITF conversion

Even Rouault even.rouault at spatialys.com
Fri Dec 1 10:01:00 PST 2017


On vendredi 1 décembre 2017 09:42:25 CET Bugbuster wrote:
> Dear all,
> 
> I would like to modify all geolocation information in a NITF image. The
> original image (*MyOriginalNTIF.nsf*) is not corrrectly located.
> 
> I know a way to make sure /gdal_translate/ will ignore ALL geographic
> information form original image. I just need to compute my new NITF image in
> *two steps* :
> 1) convert originial NITF image into a plain TIF image :
> /gdal_translate -of GTiff -co PROFILE=baseline MyOriginalNTIF.nsf
> MyOriginalNTIF.tif/
> 
> 2) convert the intermediate plain TIF image into NITF with my coputed
> location information :
> /gdal_translate -of NITF -a_srs epsg:4326 -gcp xxx -gcp yyy -gcp zzz -gcp
> ttt -co TRE=BLOCKA='001000.....010.0' MyOriginalNTIF.tif
> MyNewRelocatedNITF.nsf'/
> 
> This is not very efficient. I would like to do it in a *single step*.
> However, the direct /gdal_translate/ from NITF to NITF does not work as I
> expect it : the new BLOCKA is ignored and I always get the *original
> BLOCKA*.
> 
> My question : is there a way to tell /gdal_translate/ (or NITF driver) to
> consider the input image as a non-geolocated image ?

Philippe,

I can't think of a better workaround (you could possible just translate to VRT and remove the 
metadata in the VRT to make things faster, if size/speed is a concern). But I've just fixed that 
issue per:
https://trac.osgeo.org/gdal/changeset/40900

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20171201/02f3ffa1/attachment.html>


More information about the gdal-dev mailing list