• 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.

FSXA FWTools No Input Files Selected

Messages
231
Country
newzealand
I'm trying to merge all these .jp2 files (USGS) into one big tif using FWTools shell with gdal_merge but all I get is:

File not found "1.jp2" etc
No input files selected

What do I do?
 
Hi,

What is the command you entered?

It should be something like: gdal_merge -o output.tif input1.jp2 input2.jp2

If the file names have spaces, you need to put quotes around as well.
 
Hey,

I just copied this:
Code:
gdal_merge "doi1ft2009_08-23_aerialsExpress.jp2" "doi1ft2009_08-24_aerialsExpress.jp2" "doi1ft2009_09-23_aerialsExpress.jp2" "doi1ft2009_09-24_aerialsExpress.jp2" -o "deer_park_merged_NAD83.tif"
http://www.fsdeveloper.com/forum/showpost.php?p=648590&postcount=2

Then I changed the file names with the quotation marks (with or with quotation marks it still doesn't work. I still get "file not found" etc).

So: gdal_merge "1.jp2" "2.jp2" "3.jp2" -o usgsphototest.tif
 
Last edited:
That would assume your .jp2s were in the FWTools folder as well as the output .tif.

try:

gdal_merge "C:\path\to\1.jp2" "C:\path\to\2.jp2" "C:\path\to\3.jp2" -o "C:\path\to\output.tif"

(use actual path of course)

Jim
 
There's something wrong with the inf file I'm using but I don't know what.

When I drop it into the resample.exe it just opens then closes in less than a second.

[Source]
Type = MultiSource
NumberOfSources = 2

[Source1]
SourceDir = "D:\FSXProjects\Airports\PR"
SourceFile = "usgsphoto_wgs84.tif"
Type = TIFF
Layer = Imagery
ulxMap = -160.406122754147
ulyMap = 34.2351176804827
xDim = 0.0000030491070012228
yDim = 0.0000030491070012228
Variation = Day

Channel_BlendMask = 2.1

[Source2]
SourceDir = "D:\FSXProjects\Airports\PR"
SourceFile = "usgsphoto_wgs84_B.tif"
Type = TIFF
Layer = None
ulxMap = -160.406122754147
ulyMap = 34.2351176804827
xDim = 0.0000030491070012228
yDim = 0.0000030491070012228
SamplingMethod = Gaussian

[Destination]
DestDir = "H:\Microsoft Games\Microsoft Flight Simulator X\Addon Scenery\USGSPhotoTest\scenery"
DestBaseFileName = "BurbankPhoto.bgl"
LOD = Auto
CompressionQuality = 85
UseSourceDimensions = 1
 
Hello:

You may find it helpful to use Arno's excellent "Compile Helper" utility to preserve the output messages from various FS SDK compilers so you won't be mystified by what happened during the brief flash of the CMD mode window which otherwise pops onto the screen then disappears:

CompileHelper 2.0

http://www.fsdeveloper.com/forum/downloads.php?do=file&id=75

After configuring Compile Helper with the paths of any FS SDK compilers you will be using (ex: BGLComp, Resample etc.), just Drag-N'-Drop a *.XML source file (or a *.INF file etc.) onto CompileHelper's *.exe instead of the SDK compiler's *.exe file itself.



PS: You can also put a copy of Arno's Compile Helper into the work folder along with FSX SDK Resample if you wish. ;)


Hope this helps ! :)

GaryGB
 
You can write a batch file that'll do the same thing, the objective is to keep the resample window open long enough to read the error. Copy the lines below and paste into Notepad. Save in the folder along with your .inf as "resamble_PR.bat" (or "my_dog_has_fleas.bat", it doesn't matter). Make sure the path to resample.exe is correct for your installation and also the .inf filename.

Code:
"C:\Microsoft Games\Microsoft Flight Simulator X SDK\SDK\Environment Kit\Terrain SDK\resample.exe" inf_filename.inf
pause

Double click the batch file to run it.

Jim
 
There's something wrong with the inf file I'm using but I don't know what.

Couple of thoughts. If the file in Source2 is a blend mask file, is it an 8bit, grayscale TIFF file? If it is, there wouldn't be a 2.1 for the Channel_BlendMask to call, only a 2.0.

Just because I'm curious about these types of things... :rolleyes: Why are you trying to put Burbank photo scenery north, northwest of the Hawaiian islands? Burbank is not at -160 longitude. I use to fly out of Burbank, there's no way I would have driven 2500 miles across the Pacific for that experience! :D
 
Just because I'm curious about these types of things... :rolleyes: Why are you trying to put Burbank photo scenery north, northwest of the Hawaiian islands? Burbank is not at -160 longitude. I use to fly out of Burbank, there's no way I would have driven 2500 miles across the Pacific for that experience! :D

Ooops, I don't think that's gonna line up with the vector roads quite like it should :D
 
Why are you trying to put Burbank photo scenery north, northwest of the Hawaiian islands? Burbank is not at -160 longitude.
Well the coords came out of the GeoTiff when I converted it from JPG2000 (USGS) to WGS84. (for some reason the decimal coords don't appear in the gtf file but they do appear in FWTools Shell.

I downloaded all the tiles USGS (30 image files) sent me then I merged all of them into one image using gdal_merge.

Geotiff_Information:
Version: 1
Key_Revision: 1.0
Tagged_Information:
ModelTiepointTag (2,3):
0 0 0
-160.40612275414734.2351176804827 0
ModelPixelScaleTag (1,3):
3.04910700122275e-0063.04910700122275e-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.

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 (160d24'22.04"W, 34d14' 6.42"N)
Lower Left (160d24'22.04"W, 34d 9'59.11"N)
Upper Right (160d18'26.56"W, 34d14' 6.42"N)
Lower Right (160d18'26.56"W, 34d 9'59.11"N)
Center (160d21'24.30"W, 34d12' 2.76"N)

And yes, when I compiled it, it shows up north west of the Hawaiian islands in the middle of the ocean! (lol). The imagery looks pretty good for 30cm.
 
Last edited:
Something went wrong there it looks like, see what happens if you run

gdalinfo "path\to\usgsphoto_wgs84.tif" > "path\to\usgsphoto_wgs84.txt"

from the FWTools shell right after doing gdalwarp on your merged .tif. That should give you a text file (usgsphoto_wgs84.txt) with coords in dd.dddd format.

Jim
 
Thanks Jim, that did the trick. ;)

Now my next question is, why are the coordinates in the middle of the Pacific Ocean? :confused:
 
Last edited:
30 image files. Some of the tiles were black (about 2-4) when I merged them all. I checked the original files before merging and they were all fine.

Sometimes I feel like giving up. lol
 
Maybe try merging/reprojecting all in one shot with gdalwarp as Ollyau suggested in that other thread.

gdalwarp -of GTiff -co "INTERLEAVE=PIXEL" -t_srs "+proj=latlong +datum=WGS84" -r cubic "path\to\1.jp2" "path\to\2.jp2" "path\to\3.jp2" "path\to\usgsphoto_wgs84.tif"

Is that coming out really huge BTW? I just merged 12 of them and it came out to like 23000 x 12000px which is getting a little large IMHO. Are your .jp2s like 5000 x 5000px like mine were or smaller?

Jim
 
Yeah, each file is 5000px X 5000px and the total size when they're merged is 30000 x 25000.

Ok, it has now been converted to wgs84 with no black tiles! YAY!

Good news, the PR is now at it's correct position.

Thanks Jim!
 
Last edited:
I usually embed the water and blend masks into the .tif as alpha channels and on one that size I'm pretty sure you'd exceed the 2 Gb limit for .tifs by the time you add those if you were going that route.

I'd probably divide that up into two separate source .tifs if it were me, even if you don't embed the water & blend because they just get so sluggish trying to do anything with them in Photoshop, Gimp, or whatever. If you did decide to split it up you could do something like this:

gdalwarp -of GTiff -co "INTERLEAVE=PIXEL" -t_srs "+proj=latlong +datum=WGS84" -r cubic "path\to\1.jp2" "path\to\2.jp2" "path\to\3.jp2" "path\to\usgsphoto_wgs84_src1.tif"

gdalwarp -of GTiff -co "INTERLEAVE=PIXEL" -t_srs "+proj=latlong +datum=WGS84" -r cubic "path\to\4.jp2" "path\to\5.jp2" "path\to\6.jp2" "path\to\usgsphoto_wgs84_src2.tif"

You'd have to figure out which .jp2s join together to form each of the output .tifs and write your gdalwarp commands accordingly. Then write your multi-source .inf to include both sources and resample will put them back together again. Just a thought, glad to see you got it sorted :) .

Jim
 
Back
Top