- Messages
- 542
- Country

Hi. I am stumped at the moment, and I thought someone here might be able to help.
I had some jp2 files which I merged then reprojected and converted to GeoTiffs.
When I ran these all through resample, the output bgls were perfect, as in they were in exactly the right spot and lined up with the adjacent scenery I am trying to match. The colour needed adjusting, so obviously I had to use a graphics editor (GIMP) to edit the colours. Now I am having trouble resampling the edited files. I have tried a few methods. I tried the following in FWTools:
listgeo -no_norm original.tif > original.geo
geotifcp -g original.geo modified.tif modified_geotiff.tif
Which is a line I got from a GeoTiff FAQ page.
This spat out a new version of my GeoTiff from the edited file, but it seemed to only contain information on the Longitude, which I saw when I checked it out with gdalinfo.
I also tried another method, to create a world file (tfw) by using:
gdal_translate -co "TFW=YES" F:\USGS_Right_of_BS_AZNorth3FSX_JP2\AZ3_11_jp2Merge_wgs84_3band.tif F:\USGS_Right_of_BS_AZNorth3FSX_JP2\AZ3_11_jp2Merge_wgs84_3band_tfwgen.tif
which worked and gave me a tfw file with the folowing info:
0.0000082919
0.0000000000
0.0000000000
-0.0000082919
-111.3750263646
34.8750236610
Now I assumed that this should be my xdim, ydim, ulxMap and ulyMap, but when I used the following inf, I ended up with a bgl which showed the correct Latitude, but a Longitude showing 0.000007, which is strangely very close to the xdim and ydim value:
[Source]
Type = TIFF
SourceDir = "."
SourceFile = "AZ3_11_jp2Merge_wgs84_3band_edit1.tif"
ulxMap = -111.3750263646
ulyMap = 34.8750236610
xdim = 0.0000082919
ydim = 0.0000082919
Layer = Imagery
PixelIsPoint = 1
Variation = All
NullValue = 0,0,0
[Destination]
DestDir = ".\BGLs"
DestBaseFileName = "AZ_3JP11_edit1"
DestFileType = BGL
CompressionQuality = 85
LOD = Auto
Edit:
This is what resample is showing as it runs, for some reason it is not using the ulxMap value:
F:\USGS_Right_of_BS_AZNorth3FSX_JP2>resample.exe AZ_3JP6.inf
Microsoft Corp. Terrain Resampler 10.0.61637.0 (FSX-Xpack.20070926-1421)
Copyright (C) Microsoft Corporation. All rights reserved.
Resample Info File: 'AZ_3JP6.inf'
[Source] Type = 'TIFF'
[Source] Type = 'TIFF'
[Source] SourceDir = '.'
[Source] SourceFile = 'AZ3_6_jp2Merge_wgs84_3band_edit1.tif'
[Source] Layer = 'Imagery'
[Source] ULYMAP = 34.937518
[Source] XDIM = 0.000009
[Source] YDIM = 0.000009
[Source] PixelIsPoint = 1
[Source] Variation = 'All'
[Destination] DestDir = '.\BGLs'
[Destination] DestBaseFileName = 'AZ_3JP6_edit1'
[Destination] LOD = 'Auto'
[Destination] DestFileType = 'BGL'
[Destination] CompressionQuality = 85
Cell 428 of 4518 (9.47%); 0:00:24 elapsed, 0:03:49 remaining...
Edit 2: I had this problem with two files I had edited, AZ3_6_jp2Merge_wgs84_3band_edit1, and AZ3_11_jp2Merge_wgs84_3band_edit1.
For some reason AZ3_11_jp2Merge_wgs84_3band_edit1 is now running OK through resample, yet even by copying this good inf and filling in the details for No.6, AZ3_6_jp2Merge_wgs84_3band_edit1 is still failing to show ulxMap as it resamples.
Now I am even more confused!
Does anyone know what could be happening here?
Cheers,
Scott
I had some jp2 files which I merged then reprojected and converted to GeoTiffs.
When I ran these all through resample, the output bgls were perfect, as in they were in exactly the right spot and lined up with the adjacent scenery I am trying to match. The colour needed adjusting, so obviously I had to use a graphics editor (GIMP) to edit the colours. Now I am having trouble resampling the edited files. I have tried a few methods. I tried the following in FWTools:
listgeo -no_norm original.tif > original.geo
geotifcp -g original.geo modified.tif modified_geotiff.tif
Which is a line I got from a GeoTiff FAQ page.
This spat out a new version of my GeoTiff from the edited file, but it seemed to only contain information on the Longitude, which I saw when I checked it out with gdalinfo.
I also tried another method, to create a world file (tfw) by using:
gdal_translate -co "TFW=YES" F:\USGS_Right_of_BS_AZNorth3FSX_JP2\AZ3_11_jp2Merge_wgs84_3band.tif F:\USGS_Right_of_BS_AZNorth3FSX_JP2\AZ3_11_jp2Merge_wgs84_3band_tfwgen.tif
which worked and gave me a tfw file with the folowing info:
0.0000082919
0.0000000000
0.0000000000
-0.0000082919
-111.3750263646
34.8750236610
Now I assumed that this should be my xdim, ydim, ulxMap and ulyMap, but when I used the following inf, I ended up with a bgl which showed the correct Latitude, but a Longitude showing 0.000007, which is strangely very close to the xdim and ydim value:
[Source]
Type = TIFF
SourceDir = "."
SourceFile = "AZ3_11_jp2Merge_wgs84_3band_edit1.tif"
ulxMap = -111.3750263646
ulyMap = 34.8750236610
xdim = 0.0000082919
ydim = 0.0000082919
Layer = Imagery
PixelIsPoint = 1
Variation = All
NullValue = 0,0,0
[Destination]
DestDir = ".\BGLs"
DestBaseFileName = "AZ_3JP11_edit1"
DestFileType = BGL
CompressionQuality = 85
LOD = Auto
Edit:
This is what resample is showing as it runs, for some reason it is not using the ulxMap value:
F:\USGS_Right_of_BS_AZNorth3FSX_JP2>resample.exe AZ_3JP6.inf
Microsoft Corp. Terrain Resampler 10.0.61637.0 (FSX-Xpack.20070926-1421)
Copyright (C) Microsoft Corporation. All rights reserved.
Resample Info File: 'AZ_3JP6.inf'
[Source] Type = 'TIFF'
[Source] Type = 'TIFF'
[Source] SourceDir = '.'
[Source] SourceFile = 'AZ3_6_jp2Merge_wgs84_3band_edit1.tif'
[Source] Layer = 'Imagery'
[Source] ULYMAP = 34.937518
[Source] XDIM = 0.000009
[Source] YDIM = 0.000009
[Source] PixelIsPoint = 1
[Source] Variation = 'All'
[Destination] DestDir = '.\BGLs'
[Destination] DestBaseFileName = 'AZ_3JP6_edit1'
[Destination] LOD = 'Auto'
[Destination] DestFileType = 'BGL'
[Destination] CompressionQuality = 85
Cell 428 of 4518 (9.47%); 0:00:24 elapsed, 0:03:49 remaining...
Edit 2: I had this problem with two files I had edited, AZ3_6_jp2Merge_wgs84_3band_edit1, and AZ3_11_jp2Merge_wgs84_3band_edit1.
For some reason AZ3_11_jp2Merge_wgs84_3band_edit1 is now running OK through resample, yet even by copying this good inf and filling in the details for No.6, AZ3_6_jp2Merge_wgs84_3band_edit1 is still failing to show ulxMap as it resamples.
Now I am even more confused!
Does anyone know what could be happening here?
Cheers,
Scott
Last edited:

) from the backup made by the GIS utility via either the restore function in that same utility, or via a companion GIS utility specifically stated to be capable of reading and restoring geo-referencing info from the backup files created by the same one used to make the original geo-referencing info backup.
