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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Bugbuster
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 ?

Thank you for your help
Philippe




--
Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html
_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: How to tell gdal_translate replace BLOCKA in a NITF to NITF conversion

Even Rouault-2

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


_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: How to tell gdal_translate replace BLOCKA in a NITF to NITF conversion

Bugbuster
Hi Even,

thanks a lot for your quick and efficient fix.

Philippe



--
Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html
_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev