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

resample gets stuck

dave hoeffgen

Resource contributor
Messages
1,439
Country
germany
Hi there,
I tried to convert a 32 bit geotiff containing grayscale LandClass information.
I tried directing the ChannelValue to the red channel.

Here is my full code:
Code:
[Source]
Type                = GeoTIFF
SourceDir           = "imagery"
SourceFile          = "mask.tif"
Layer               = LandClass
Channel_Value       = 1.0
SamplingMethod      = Majority
MajorityMode        = Weighted

[Destination]
DestDir             = "[...]\Scenery"
DestBaseFileName    = "[...]"
DestFileType        = BGL
UseSourceDimensions = 1
The rest of the code is copied from the sdk examples with tweaked paths and names.

However after reading out the text from the INF file resample gets stuck. No crash, no error message, it just doesn't continue.
Does anybody know what I did wrong?

Thanks in advance,
Dave
 
DestDir = "[...]\Scenery"
DestBaseFileName = "[...]"

Is this an example or do you actually have brackets in these lines? Don't have my FSX SDK but P3D has

Code:
[Source]
Type                = GeoTIFF
SourceDir           = "SourceData"
SourceFile          = "ModifiedGlccSubset2.tif"
Layer               = LandClass
SamplingMethod      = Majority
MajorityMode        = Weighted

[Destination]
DestDir             = "Output"
DestBaseFileName    = LandClass_AutoWeightedMajority
DestFileType        = BGL
UseSourceDimensions = 1

shot in the dark.
 
Is this an example or do you actually have brackets in these lines? Don't have my FSX SDK but P3D has

Code:
[Source]
Type                = GeoTIFF
SourceDir           = "SourceData"
SourceFile          = "ModifiedGlccSubset2.tif"
Layer               = LandClass
SamplingMethod      = Majority
MajorityMode        = Weighted

[Destination]
DestDir             = "Output"
DestBaseFileName    = LandClass_AutoWeightedMajority
DestFileType        = BGL
UseSourceDimensions = 1

shot in the dark.
No, I don't have the brackets in the actual inf file and setting the layer to "imagery" starts the normal process (with a nonsense result of course)

It must have something to do with the 4 channel image and the value redirection.
 
Can you run gdalinfo on your geotiff file to see the file structure? Is it 4 channels? did you convert this file from something else?
 
I made the image myself (RGBA) and rasterized some shapefiles using gdal_rasterize.
I thought 'Channel_Value = 1.0' would fix the multichannel thing. :confused:
 
Is it just a very big file and is taking a long time to process? I'm not at my dev machine and it's been a while doing terrain stuff.

What about the NullValue parameter?
 
As I said it processes without problems when compiled as imagery (I did this as a test, the result does not make sense of course)
but when I set the layer entry back to LandClass the processing line won't even appear on the console, not even after hours.
I don't think it's the image's size as I already processed even larger images without any problem.
 
Hi Dave,

it might be the format. If it's an RGB saved as TIFF it should be 24-bit (8 bits per Channel) with source Type=TIFF. Make sure that the class values are the same in each band: 1/1/1, 2/2/2, etc. If you only have them in the red band then copy that band into Green and Blue as well (Layers menu).

Alternatively, use Indexed mode and save the file in .RAW format and change the .inf to Type=RAW.

Cheers, Holger
 
It was an RGB image with alpha channel.
now I managed to convert it to 8 bit grayscale and removed the channel redirection, still same result :confused:
 
Hi Dave,

something else to consider might be the image resolution. If it's a lot finer than the landclass-native QMID15 (xDim = 0.0146484375, yDim = 0.010986328125) then maybe the interpolation process gets overwhelmed. This wouldn't come into play when compiling as an image.

Cheers, Holger
 
Hi Dave,

something else to consider might be the image resolution. If it's a lot finer than the landclass-native QMID15 (xDim = 0.0146484375, yDim = 0.010986328125) then maybe the interpolation process gets overwhelmed. This wouldn't come into play when compiling as an image.

Cheers, Holger
Thanks for the tip, I'll try a lower one.
 
It worked now but I must have missed that LC can't go past level 5.
This makes it useless again for my purpose. :(

I tried to do LC as an alternative to hydro polygons because I can't get 3d vertices.
I described the problem here.
 
Back
Top