• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Pixel width and height must be greater than zero.

Messages
295
Country
us-vermont
I have FWTools2.4.7 in Windows 10. I can gdalwarp my 10 VT jp2 files with no problem.

C:\FWTools2.4.7\bin\gdalwarp.exe -t_srs "+proj=latlong +datum=WGS84" -of GTiff -co "INTERLEAVE=PIXEL" -r cubic %1.jp2 %1WARP.TIF
C:\FWTools2.4.7\bin\listgeo.exe %1WARP.tif > %1WARP.gtf

I reloaded the Geo data to get a GeoTiff file with this:

C:\FWTools2.4.7\bin\geotifcp.exe -g %1warp.gtf %1warp.tif %1GeoTiff.tif

Output of my resample:
Resample Info File: 'VT.INF'
[Source] Type = 'Multisource'
[Source] NumberOfSources = 10
[Source1] Type = 'GeoTiff'
[Source1] SourceDir = '.'
[Source1] SourceFile = 'VT_44642197_20180422Geotiff.tif'
[Source1] Layer = 'Imagery'
[Source1] NullValue = '0,0,0'
[Source1] Variation = 'Day'

Pixel width and height must be greater than zero.

Unable to open data source 'C:\FWTools2.4.7\bin\VT_44642197_20180422Geotiff.tif'.
Failed to create data source.

The gdalinfo of the JPEG2000 file "looks" OK to me:
C:\FWTools2.4.7\bin>gdalinfo VT_44642197_20180422.jp2
Driver: JP2ECW/ERMapper JPEG2000
Files: VT_44642197_20180422.jp2
Size is 6000, 6000
Coordinate System is:
PROJCS["NAD_1983_2011_StatePlane_Vermont_FIPS_4400",
GEOGCS["GCS_NAD_1983_2011",
DATUM["NAD_1983_2011",
SPHEROID["GRS_1980",6378137,298.257222101]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433]],
PROJECTION["Transverse_Mercator"],
PARAMETER["latitude_of_origin",42.5],
PARAMETER["central_meridian",-72.5],
PARAMETER["scale_factor",0.9999642857142858],
PARAMETER["false_easting",500000],
PARAMETER["false_northing",0],
UNIT["metre",1,
AUTHORITY["EPSG","9001"]]]
Origin = (446000.000000000000000,220200.000000000000000)
Pixel Size = (0.150000000000000,-0.150000000000000)
Corner Coordinates:
Upper Left ( 446000.000, 220200.000) ( 73d10'43.63"W, 44d28'48.04"N)
Lower Left ( 446000.000, 219300.000) ( 73d10'43.29"W, 44d28'18.88"N)
Upper Right ( 446900.000, 220200.000) ( 73d10'2.90"W, 44d28'48.28"N)
Lower Right ( 446900.000, 219300.000) ( 73d10'2.57"W, 44d28'19.12"N)
Center ( 446450.000, 219750.000) ( 73d10'23.10"W, 44d28'33.58"N)
Band 1 Block=6000x1 Type=Byte, ColorInterp=Undefined
Overviews: arbitrary
Band 2 Block=6000x1 Type=Byte, ColorInterp=Undefined
Overviews: arbitrary
Band 3 Block=6000x1 Type=Byte, ColorInterp=Undefined
Overviews: arbitrary
Band 4 Block=6000x1 Type=Byte, ColorInterp=Undefined
Overviews: arbitrary

My GTF Files "look" ok to me.
Geotiff_Information:
Version: 1
Key_Revision: 1.0
Tagged_Information:
ModelTiepointTag (2,3):
0 0 0
-73.178784856304 44.4800773404146 0
ModelPixelScaleTag (1,3):
1.64394339422765e-0061.64394339422765e-0060
End_Of_Tags.
Keyed_Information:
GTModelTypeGeoKey (Short,1): ModelTypeGeographic
GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
GeographicTypeGeoKey (Short,1): GCS_WGS_84
GeogCitationGeoKey (Ascii,7): "WGS 84"
GeogAngularUnitsGeoKey (Short,1): Angular_Degree
GeogSemiMajorAxisGeoKey (Double,1): 6378137
GeogInvFlatteningGeoKey (Double,1): 298.257223563
End_Of_Keys.
End_Of_Geotiff.

The gdalinfo of the GeoTiff file "looks" OK:

Example:

GCS: 4326/WGS 84
Datum: 6326/World Geodetic System 1984
Ellipsoid: 7030/WGS 84 (6378137.00,6356752.31)
Prime Meridian: 8901/Greenwich (0.000000/ 0d 0' 0.00"E)

Corner Coordinates:
Upper Left ( 73d10'43.63"W, 44d28'48.28"N)
Lower Left ( 73d10'43.63"W, 44d28'18.88"N)
Upper Right ( 73d10' 2.57"W, 44d28'48.28"N)
Lower Right ( 73d10' 2.57"W, 44d28'18.88"N)
Center ( 73d10'23.10"W, 44d28'33.58"N)

GCP Projection =
GEOGCS["WGS 84",
DATUM["WGS_1984",
SPHEROID["WGS 84",6378137,298.257223563,
AUTHORITY["EPSG","7030"]],
AUTHORITY["EPSG","6326"]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433],
AUTHORITY["EPSG","4326"]]
GCP[ 0]: Id=1, Info=
(0,0) -> (-73.178784856304,44.4800773404146,0)
Metadata:
AREA_OR_POINT=Area
Image Structure Metadata:
INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left ( 0.0, 0.0)
Lower Left ( 0.0, 4967.0)
Upper Right ( 6937.0, 0.0)
Lower Right ( 6937.0, 4967.0)
Center ( 3468.5, 2483.5)
Band 1 Block=6937x1 Type=Byte, ColorInterp=Red
Mask Flags: PER_DATASET ALPHA
Band 2 Block=6937x1 Type=Byte, ColorInterp=Green
Mask Flags: PER_DATASET ALPHA
Band 3 Block=6937x1 Type=Byte, ColorInterp=Blue
Mask Flags: PER_DATASET ALPHA
Band 4 Block=6937x1 Type=Byte, ColorInterp=Alpha

I looked at the posts about this problem but saw nothing that would help me.

I don't have the app to shrink this image in Irfanview. I attached the zipped inf file.
 

Attachments

Last edited by a moderator:
You still need to define the Top left hand corner and xdim/ydim... Resample wont read to embedded coordinates.

Use GeoTiff to Inf.exe available here if you need to.

[Source]
Type=TIFF
Layer=Imagery
SourceDir="."
SourceFile="AMARILLO_PS_Full_40_SW.tif"
PixelIsPoint=0
ulxMap=-101.7587684
ulyMap=35.2195241
xDim=3.5E-06
yDim=3.5E-06
Variation=Day
 
Thank you Shaun...these are new items for an infile for me..can you point me to your source ....much obliged.
As an aside, I have 340 hi-res image files to hand-edit the inf and resample, so I am trying to use GeoTiff the way I did in the past which had the coordinates embedded.

I'm going to look at your resample posts.
 
Last edited by a moderator:
Hi,

Resample works fine with GeoTIFF files, no need to provide the extra information in the INF file, I haven't done so for years already.

Are you sure the file name in the INF file matches exactly with the ones you made with gdalwarp? Also gdalwarp will put the geo referencing in there already, so no need to run the geotifcp command on the images. That is only needed if you edit the images in a tool like Photoshop that does not support GeoTIFF.
 
Arno...thanks...I did need to color correct the images in Paint Shop Pro hence the use of geotifcp. I am continuing to look at this again....
...... (In OSGeo4W). More later.

FLASH! Just tried OSGeo4W gdalwarp and, although my images all came out in color in FWTools, the images warped in OSGeo4W came out in grayscale.

My code..
echo on
C:\OSGeo4W\bin\gdalwarp.exe -t_srs "+proj=latlong +datum=WGS84" -of GTiff -co "INTERLEAVE=PIXEL" -r cubic C:\OSGeo4W\bin\JP2\%1.jp2 C:\OSGeo4W\bin\WRP\%1WARP.TIF
C:\OSGeo4W\bin\listgeo.exe C:\OSGeo4W\bin\WRP\%1WARP.TIF > C:\OSGeo4W\bin\GTF\%1WARP.gtf


Warping these in OSGeo4W I did see
TIFFReadDirectory: Warning, Unknown field with tag 42112 (0xa480) encountered.

I will try to resample a warped image and report back on my black and white scenery.


P.S. If you google "Unknown field with tag 42112 (0xa480) encountered" there is a lot of speculation and humma humma on github.
 
Last edited by a moderator:
I'll zip a bgl file to show how really high resolution images have a weird effect unless you turn water waves to zero. Maybe the files are small enough to attach.
 
Did you generate a water mask?
 
No water mask...the really high resolution ground images, when they are turned into bgls, have a wavelike appearance that only goes away if you turn off all water effects. I will zip a sample for everyone to see if you can tell me what the limit is for attaching files. The ground actually looks like a coating of ice that increases as you turn up the water effects.
 
Back
Top