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

FSX massive/suicidal project needs help :)

Messages
3
Hi folks!

I'm working on a scenery of 11.000km2 at 0.5m/p (aerial fotography georeferenced)

the gameplan is:

-globalmapper: reproject wgs84&geographic, and save as tif lzw mosaic (200 archives) what gives me an average of 1,3gb per file

-extract geo info from tif (listgeo)

-make blend/water mask on alpha channels (photoshop)

-get geoinfo back on the tif with geotifcp

-resample

I spent last few days researching the forum and sdk documentation, and get all working except one thing: when I try to resample after use geotifcp I get the "pixel width and height must be greater than zero" and don't work

notes:
-the resample work with the tif before photoshop/geotifcp.
-I consider to introduce geoinfo on the inf but manually calculate 200 times the xdim drives me nuts :S (maybe I don't know the fastest way)
Due the nature of the project, I think its better to make a script that automatically input geodata on tiffs after make mask.

thx in advance for any help :)
 
Last edited:
Hey pantxu and welcome on FSDeveloper.com!

To be honest I do not know where your problems come from, however I have another approach to the mesh creation in FSX and FS9 with GlobalMapper. Due to this I will just post this here, because this may get rid of your problems. I hope you understand it, because it is only a simple "tutorial" on how to do it. If you have further questions, do not be afraid to ask! I added the FSX and FS2004, if you want to do it also for FS2004 (and maybe other need it as well).

For FSX:
=======

1) Start GlobalMapper

2) Load *_dem.tiff file

3) Datei --> Batch File Conversion OR Batch Convert/reproject

4) Select GEOTIFF

5) Select GEOTIFF 32BIT

6) Add Files --> Add the file which are source

7) Select output folder

8) Select:

- Force square pixels in output
- Fill small gaps in Data
- Show Batch Conversion Progress

9) Select as Horizontal Datum WGS84.

10) Click ok!

11) Take the new file and resample.exe it!





For FS2004:
==========

1) Start GlobalMapper

2) Load *_dem.tiff file

3) Datei --> Batch File Conversion OR Batch Convert/reproject

4) Select GEOTIFF

5) Select BIL (16-bit Elevation Samples)

6) Add Files --> Add the file which are source

7) Select output folder

8) Select:

- Force square pixels in output
- Fill small gaps in Data
- Show Batch Conversion Progress

9) Select as Horizontal Datum WGS84.

10) Click ok!

11) Take the new file and resample.exe it!

Hope this helps you.
 
All seem okey, you use the correct commands, listgeo, and geotifcp -g
Here an exemple:
listgeo yourfile.tif >yourfile.gtf
geotifcp –g yourfile.gtf yourfile.tif yourfile_W.tif
listgeo yourfile.tif (if you want see if it's goereferencied)
the problem could be in the source files.take into account the "projection" must be (Geografic Latitud/Longitude)
 
Last edited:
hi there!

thx both for feedback.

I don't have problems with mesh (yet) ScKevin, in this case its the georeferenced photography.

Tejal, this is exactly the commands that I use on geotifcp, and I previously change projection in globalmapper to wgs84&geographic (es Asturias :))

I paste here the gtf "before" and "after" editing in photoshop & geotifcp

listgeo before geotifcp (resample don't work):
Geotiff_Information:
Version: 1
Key_Revision: 1.0
Tagged_Information:
ModelTiepointTag (2,3):
0 0 0
-5.5433186612689443.5704877669589 0
ModelPixelScaleTag (1,3):
4.4998092030915e-0064.49980920309126e-0061
End_Of_Tags.
Keyed_Information:
GTModelTypeGeoKey (Short,1): ModelTypeGeographic
GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
GeographicTypeGeoKey (Short,1): GCS_WGS_84
GeogAngularUnitsGeoKey (Short,1): Angular_Degree
GeogEllipsoidGeoKey (Short,1): Ellipse_WGS_84
GeogSemiMajorAxisGeoKey (Double,1): 6378137
GeogSemiMinorAxisGeoKey (Double,1): 6356752.314245
GeogInvFlatteningGeoKey (Double,1): 298.257223560493
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 ( 5d32'35.95"W, 43d34'13.76"N)
Lower Left ( 5d32'35.95"W, 43d32'21.56"N)
Upper Right ( 5d30' 1.68"W, 43d34'13.76"N)
Lower Right ( 5d30' 1.68"W, 43d32'21.56"N)
Center ( 5d31'18.81"W, 43d33'17.66"N)
listgeo after geotifcp (resample don't work):
Geotiff_Information:
Version: 1
Key_Revision: 1.0
Tagged_Information:
ModelTiepointTag (2,3):
0 0 0
-5.543318661268940 0
ModelPixelScaleTag (1,3):
4.4998092030915e-0640 0
End_Of_Tags.
Keyed_Information:
GTModelTypeGeoKey (Short,1): ModelTypeGeographic
GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
GeographicTypeGeoKey (Short,1): GCS_WGS_84
GeogAngularUnitsGeoKey (Short,1): Angular_Degree
GeogEllipsoidGeoKey (Short,1): Ellipse_WGS_84
GeogSemiMajorAxisGeoKey (Double,1): 6378137
GeogSemiMinorAxisGeoKey (Double,1): 6356752.314245
GeogInvFlatteningGeoKey (Double,1): 298.257223560493
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 ( 5d32'35.95"W, 0d 0' 0.00"N)
Lower Left ( 5d32'35.95"W, 0d 0' 0.00"N)
Upper Right ( 5d32'35.95"W, 0d 0' 0.00"N)
Lower Right ( 5d32'35.95"W, 0d 0' 0.00"N)
Center ( 5d32'35.95"W, 0d 0' 0.00"N)

I notice that there are changes on some params but I only do "geotifcp -g original.gtf photoshopedited.tif final.tif"

thx!
 
Last edited:
I downloaded some imagery with an alpha channel once, so I had to remove the alpha channel in PS before I reprojected it, but other than that I always do the reprojection first. Then I use gdalinfo "mytif.tif" > "mytif.txt" to output the coords of my wgs84.tif to a txt file. From that txt file I set up an .ini for resample with the coords in the .ini (UseSourceDimensions = 1), and from that point on there's no need to put the coords back into the .tiff every time you edit it in PhotoShop. Just drop the .ini on resample.exe whenever you want to compile a new .bgl.

Jim

EDIT: I see now the problem is the sheer number of .infs you'd need to create. Suicidal is right, lol :) . Check out this thread though, Arno wrote a batch file to make .infs for all geotifs residing in a particular folder. Don't know if that helps you with your issue or not though as it still requires the coordinate info to be in the .tif. Might be worth a look, maybe you can adapt it somehow:

http://www.fsdeveloper.com/forum/showthread.php?t=105540
 
Last edited:
hey JRobinson! btw one question about your method in case I can't solve geotifcp problem: Based on gdalinfo below on this post, can you please tell me the inf data? (ulxmap, ulymap, xdim & ydim) I have a spreadsheet but I think its wrong cause it create a bad scaling on fsx, thx in advance for any indication regard quickest way to get xdim calculations (I supose that I will have to do 200+ times :D)

Back to original error, since resample says: "pixel width and height must be greater than zero" and the area on bold below disapears after geotifcp, I suspect that this info is critical but I don't know how many forum users use geotifcp inject with the same commands with success its very plain&simple but I don't know what I'm doing wrong :banghead:

gdalinfo before geotifcp (resample works):
Driver: GTiff/GeoTIFF
Files: 1.tif
Size is 9523, 6926
Coordinate System is:
GEOGCS["WGS 84",
DATUM["WGS_1984",
SPHEROID["WGS 84",6378137,298.257223560493,
AUTHORITY["EPSG","7030"]],
AUTHORITY["EPSG","6326"]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433],
AUTHORITY["EPSG","4326"]]
Origin = (-5.543318661268941,43.570487766958905)
Pixel Size = (0.000004499809203,-0.000004499809203)

Metadata:
AREA_OR_POINT=Area
Image Structure Metadata:
INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left ( -5.5433187, 43.5704878) ( 5d32'35.95"W, 43d34'13.76"N)
Lower Left ( -5.5433187, 43.5393221) ( 5d32'35.95"W, 43d32'21.56"N)
Upper Right ( -5.5004670, 43.5704878) ( 5d30'1.68"W, 43d34'13.76"N)
Lower Right ( -5.5004670, 43.5393221) ( 5d30'1.68"W, 43d32'21.56"N)
Center ( -5.5218928, 43.5549049) ( 5d31'18.81"W, 43d33'17.66"N)
Band 1 Block=9523x1 Type=Byte, ColorInterp=Red
Band 2 Block=9523x1 Type=Byte, ColorInterp=Green
Band 3 Block=9523x1 Type=Byte, ColorInterp=Blue

gdalinfo after geotifcp (resample don't work):
Driver: GTiff/GeoTIFF
Files: 3.tif
Size is 9523, 6926
Coordinate System is `'
GCP Projection =
GEOGCS["WGS 84",
DATUM["WGS_1984",
SPHEROID["WGS 84",6378137,298.257223560493,
AUTHORITY["EPSG","7030"]],
AUTHORITY["EPSG","6326"]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433],
AUTHORITY["EPSG","4326"]]
GCP[ 0]: Id=1, Info=
(0,0) -> (-5.54331866126894,0,0)
Metadata:
TIFFTAG_SOFTWARE=Adobe Photoshop CS6 (Windows)
TIFFTAG_DATETIME=2012:07:23 22:18:52
TIFFTAG_XRESOLUTION=72
TIFFTAG_YRESOLUTION=72
TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
AREA_OR_POINT=Area
Image Structure Metadata:
INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left ( 0.0, 0.0)
Lower Left ( 0.0, 6926.0)
Upper Right ( 9523.0, 0.0)
Lower Right ( 9523.0, 6926.0)
Center ( 4761.5, 3463.0)
Band 1 Block=9523x1 Type=Byte, ColorInterp=Red
Band 2 Block=9523x1 Type=Byte, ColorInterp=Green
Band 3 Block=9523x1 Type=Byte, ColorInterp=Blue

thx!
 
Maybe the phtoshop process is the thing to blame, have you converted the image from indexed to RGB, don't know if this have something to do with the issue.
 
hey JRobinson! btw one question about your method in case I can't solve geotifcp problem: Based on gdalinfo below on this post, can you please tell me the inf data? (ulxmap, ulymap, xdim & ydim) I have a spreadsheet but I think its wrong cause it create a bad scaling on fsx, thx in advance for any indication regard quickest way to get xdim calculations (I supose that I will have to do 200+ times :D)

Basically you just need the coords of the upper left corner and the pixel sizes for the .inf, but you'll also use the lower right for calculating xdim and ydim. I use this spreadsheet, just input the coords of the corners and the pixel dimensions and copy the xdim and ydim to the .inf (I made the spreadsheet for FS9 hence "CellXdimensionDeg" and "CellYdimensionDeg" instead of "xDim" and "yDim"). I worked out that last one you posted, I think this will give you a .bgl from "1.tif":


[Source]
Type = TIFF
SourceDir = "."
SourceFile = "1.tif"
Layer = Imagery
Variation = Day
NullValue = 0,0,0
ulxMap = -5.5433187
ulyMap = 43.5704878
nCols = 9523
nRows = 6926
xDim = 4.50028355387523E-06
yDim = 4.50046209386318E-06

[Destination]
DestDir = "."
DestBaseFileName = "your_bgl_filename_here"
DestFileType = BGL
LOD = Auto
CompressionQuality = 90
UseSourceDimensions = 1

I think resample will actually choke on that one if it finds coordinate information in the .tif, so save it once in PhotoShop to remove any geo data before attempting to resample.


Back to original error, since resample says: "pixel width and height must be greater than zero" and the area on bold below disapears after geotifcp, I suspect that this info is critical but I don't know how many forum users use geotifcp inject with the same commands with success its very plain&simple but I don't know what I'm doing wrong :banghead:

You know, I remember seeing that error once when I tried to put coords back into a WGS84 tif. Every time I've needed to use geotifcp it's been on NAD83 imagery and I then did the reprojection afterwards. This has always worked fine for me using exactly the command you posted. Can you get the .tifs out of global mapper in NAD83 projection? Maybe try that and reproject them after the photoshop edits??

Jim
 
the gameplan is:

-globalmapper: reproject wgs84&geographic, and save as tif lzw mosaic (200 archives) what gives me an average of 1,3gb per file

notes:
-I consider to introduce geoinfo on the inf but manually calculate 200 times the xdim drives me nuts :S (maybe I don't know the fastest way)

Due the nature of the project, I think its better to make a script that automatically input geodata on tiffs after make mask.

thx in advance for any help :)

When you are processing the files through Global Mapper you can elect to generate a World file aka .tfw file. That will contain your upper left corner, along with xDim and yDim. So why go to the bother of trying to reinsert any geo data back into a TIFF file? Heck, I edit imagery and export back out as a BMP file. Resample doesn't care if it's TIFF or BMP, as long as it has some data telling it where the imagery needs to go and what the scale of the pixels are.

Writing a program to read the Tfw files and make INFs from it doesn't take very long.
 
Back
Top