The map info section provides georeferencing information for the image, as shown on the screen, the Lat/Long coordinates should normally refer to the original X and Y of the image, but for me, these coordinates indicate a point at the center of my image.
My question is: is there any way to modify these coordinates?
I think there is no need to change it.
The map info field does not only contain latitude/longitude but also the reference pixel they belong to.
As reference X=11906.5 and Y=8965.5 is defined. This is the centre and if the lat/lon values match this, everything is fine.
Thank you for your kind reply
no, the data is displayed correctly but for me, I need to convert the hdr file to ROI_PAC format the function by which I can make that requires two coordinates one at the top left (east) and the other at the top left north of the image
Thank you for your reply.
Sorry, I don’t quite get it. I did as you see, but it seems that the image was projected from its correct location.
I think there is no way to do this and snap always displays the center coordinate of the image.
This is I wasn’t sure about. Also. in the hdr file centre pixel is used as reference.
So, you need to do it manually like this.
11906.5 * 0.00013151333575950978 = 1.56586353222060319557
-4.410560112231575 - 1.56586353222060319557 = -5.976423644
Or to save the manual calculation you can set a pin using the pin manager at location [0,0] and you get the coordinates.
The conversion is tricky.
I think the error results from the band being the wrong data type. If I get it right the ROI_PAC needs integer data types and not floating point.
Ther are two options. Both might change the values. So, you need to be careful and validate the conversion results. You can convert the data in SNAP first.
In the menu Raster / Data Conversion / Convert Datatype you can find this function.
I’m not sure which scaling and data type is necessary. Probably int32 or int16.
Afterwards to conversion with gdal might work.
Another way is to use the parameters of gdal.
See gdal_translate — GDAL documentation. You can add ot and scale parameters.