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

DEM data - cannot create BGL

Messages
1,263
Country
canada
I have DEM data of Canada. My INF file will not create the BGL file. There are no errors. I have added and deleted optional parameters and the file "compiles" for 7 hours , down to 30 minutes. I must be doing something wrong. The example files compile. My data compiles with the FS9 SDK resample.exe within 10 seconds.

Here is the INF File. Any suggestions would be appreciated.

; Resample INFormation file
; Variations test

[Source]
Type = Multisource
NumberOfSources = 2

[Source1]
Type = Raw
Layer = Elevation
SourceDir = "SourceData"
SourceFile = "040p04e.raw"
nCols= 1201
nRows= 1201
ULXMAP = -81.75
ULYMap = 43.25
XDIM = 0.000208160
YDIM = 0.000208160
BandLayout=BSQ
ByteOrder=Intel
nBands=1201
SampleType=SINT16
PixelIsPoint=0

[Source2]
Type = Raw
Layer = Elevation
SourceDir = "SourceData"
SourceFile = "040p04w.raw"
nCols= 1201
nRows= 1201
ULXMAP = -82.00
ULYMap = 43.25
XDIM = 0.000208160
YDIM = 0.000208160
BandLayout=BSQ
ByteOrder=Intel
nBands=1201
SampleType=SINT16
PixelIsPoint=0

[Destination]
DestDir = "Output"
DestBaseFileName = "040p04"
DestFileType = BGL
LOD = Auto
UseSourceDimensions = 0
NorthLat=43.25
SouthLat=43.00
WestLon=-82.00
EastLon=-81.50
BoundingCell=8,52,33
MinBoundingCell=13,1672,1063
MaxBoundingCell=13,1679,1067
 
Maybe the resample try to make a file with a LOD number too big.
Try to fix the LOD=9 (or 8,10 to make from 8 to 10)
 
Hi ronh.

Just curious, but why are you using boundingcell? Why not just UseSourceDimensions=1?

At any rate, I don't think you would specify both bounding cells and lat-long in the destination.

I'd use this:

Code:
[Source]
Type = Multisource
NumberOfSources = 2

[Source1]
Type = Raw
Layer = Elevation
SourceDir = "SourceData"
SourceFile = "040p04e.raw"
nCols= 1201
nRows= 1201
ULXMAP = -81.75
ULYMap = 43.25
XDIM = 0.000208160
YDIM = 0.000208160
BandLayout=BSQ

[Source2]
Type = Raw
Layer = Elevation
SourceDir = "SourceData"
SourceFile = "040p04w.raw"
nCols= 1201
nRows= 1201
ULXMAP = -82.00
ULYMap = 43.25
XDIM = 0.000208160
YDIM = 0.000208160
BandLayout=BSQ

[Destination]
DestDir = "Output"
DestBaseFileName = "040p04"
LOD = Auto
UseSourceDimensions = 1

Dick
 
Last edited:
Thanks Dick and marcoh,

I feel that there is a bug in resample for FSX and raw BSQ files. I have increase and decreased the LOD and used UseSourceDimensions=1 etc.

I finally got it to work, but I had to change my dem data to GeoTiff and not RAW BSQ. The raw data BSQ worked fine using FS9 resample but I wanted to use FSX resample.

So now I have to concentrate on the US Canada border as the DEM data is 0 MSL for the overlapping parts in the US.

Thanks for the replies.
 
Last edited:
Here is the INF File. Any suggestions would be appreciated.

; Resample INFormation file
; Variations test

[Source]
Type = Multisource
NumberOfSources = 2

[Source1]
Type = Raw
Layer = Elevation
SourceDir = "SourceData"
SourceFile = "040p04e.raw"
nCols= 1201
nRows= 1201
ULXMAP = -81.75
ULYMap = 43.25
XDIM = 0.000208160
YDIM = 0.000208160
BandLayout=BSQ
ByteOrder=Intel
nBands=1201
SampleType=SINT16
PixelIsPoint=0



Shouldn't nBands be 2 for 16 bit elevation data?

scott s.
.
 
also, shouldn't be XDIM and YDIM = 0.0002083333 for 0.25x0.25deg data with 1201x1201 vertexes? (this note is of course only for perfectionists, I believe that the results will be acceptable also with the little bit unprecise value 1200/1201 smaller) :)

Vlada Stoje
 
Shouldn't nBands be 2 for 16 bit elevation data?

scott s.
.

Scott,

Thanks for the tip. but,

I do get a BGL file with nBands=2, but smaller - would this mean a faster loading with raw data than Geotiff. I thought the nbands would be the number of rows - hence 1201.

It does not compile in 10 seconds like FS9 resample but it does create a file.

Where did you find the definition of nBands?

I use read_dem to convert dem to BSQ. I use 3dem to convert dem to GeoTiff.

Vlada,

Agree - my math was wrong and now use 2.0833334E-4



*********** EDIT ************

Okay my terrain seems to work with the change to nBands = 2. I can now start merging US data and Canadian data for the border area. Scott thanks for pointing this out. I running 1 arc second data from US in the Niagara Falls area, because the Canadian data Maps US terrain elevation to 0 MSL.
 
Last edited:
After thinking about this, I think maybe I was wrong and nBands should be 1. the reason is that a "band" for elevation data is 16 bits. Here is the header file for some USGS BIL-format elevation data:

BYTEORDER I
LAYOUT BIL
NROWS 5220
NCOLS 7200
NBANDS 1
NBITS 16
BANDROWBYTES 14400
TOTALROWBYTES 14400
BANDGAPBYTES 0


Resample doesn't have the "nBits" option, but probably by specifying Layer=elevation resample interprets the data as 16 bit.

I have to admit I have been exporting my data from Global Mapper in 16-bit GeoTiff since it is so easy to write the .inf for it. The only problem is that I don't have any image editing software which understands this format. I have a back-burner project going to try to use some SRTM -3 data to fill a hole in SRTM - 1, but it needs some smoothing.

scott s.
.
 
Last edited:
Scott,

I use 3dem. This program takes my canadian DEM data and converts to GEOTiff. I agree inf file easier with GeoTiff.

I downloaded US data 1" as GeoTiff directly. Now I need to look at 1/3 and 1/9, but later when I get my new octo quad core 32.0 GHz :eek: Nvidia 108900 :p

thanks again for the help - will need to see nBands=1 works.

************ Edit *************

using nBands = 1 makes the files the same size as using GeoTiff - so no advantage of RAW vs. GeoTiff - Go GeoTiff it's an easier inf file.
 
Last edited:
Old problem

Hi, Ron

Certainly, you solved you mesh problem and perhaps may help me.

I compiled 3 areas around a default FSX mesh area that I must preserv, since it has a special mesh information (SBRJ - Sugar Loaf, Rio de Janeiro, Brazil).

I tried to follow the following instructions from FSX SDK to create 3 sources and 1 destination INF files, so I would expect only one bgl, but it did not work the way I thought.

HTML:
Multiple .inf  files are  allowed because  it is  possible for  the [Source] and
[Destination] sections to be in separate files. This is convenient when you want
to generate different resolutions  of data from a  single source file. Build  an
.inf  file  for the  source  data and  multiple  .inf files  with  [Destination]
sections  for  each destination  file.

If you know how to compile many sources in one bgl or how to merge FSX bgl´s, please, give me some directions on those.

Best regards,

José
 
Back
Top