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

Convert National Land Cover data to Landclass

Messages
496
Country
us-missouri
I thought that instead of doing woodland and wetland polygon scenery for 50 states, I might be better off using the 2016 Land Cover data from MRLC (https://www.mrlc.gov/data?f[0]=category:land cover). Instead of the vectors and shapefiles I am used to working with, it is a raster image and I am stumped on how I can - or whether I can - import this highly accurate data into the sim. After an extensive search here and elsewhere, it seems that converting the different pixels to something that the scenery design tools can recognize and assign properly. But how to convert this data to WGS84 projection and then what to do afterwards is way above my paygrade.

Any thoughts or suggestions are greatly appreciated!
 
Messages
1,510
Country
unitedstates
I downloaded one of those this morning and had a play with it. I was able to reproject a chunk of it to WGS84 and clip it to precisely fit two LOD5 cells with OSGeo4.

In Sbuilder you can do what they call a "class map" and I was able to import the reprojected class_map.tif into Sbuilder. From there you define which LC values you want associated with which colors on the map. For each color you can define three different LC values and Sbuilder will use the first one 60% of the time, the 2nd 25%, and the 3rd 15% which would give you some variation. ...or if you don't want variation just define the same LC value three times. There's a color legend on the site you linked that will help you decide which LC values should be used with each color on the class map. Also see lands.txt in the SBuilderX315\Tools folder to get the LC values you'll want to use.

I've done this exactly one time and it was a long time ago so I'm still working on defining the LC values for today's project but in the past it worked well and SBuilder filled up the state of Maine with "better than default" landclass in about 1/2 a second flat.
 
Messages
496
Country
us-missouri
This is spectacular news and I can't wait to dive in! The level of detail in this file is massive, despite covering an entire country, so this could revolutionize how the scenery looks.

Thanks,
 
Messages
1,510
Country
unitedstates
SBuilderX is giving me fits with this, it seems if the zoom level drops below about 6 the display goes wonky, you can't center the map, and when you try to zoom in or out it either doesn't work or the map goes off the viewing area, sometimes a combination of both. I'm playing with editing an .sbx in a text editor with some limited success. I can start Sbuilder and open the .sbx, generate some LC and compile it however so I think in the end it will be possible, but you might as well forget about adding the map and going from there within the program, especially if you were to try to bring in the whole CONUS map in one shot. I've got one going right now made up of 4 LOD5 cells and apparently that's already too large. It'll need to be piece mealed in smaller chunks I think and then the .raw files will need to be gathered up and pulled together in a multi-source .inf to come up with a final product. Still better than click, click, click though! :)
 
Messages
496
Country
us-missouri
Interesting. I wonder if it's possible to clip out smaller areas, such as 10-degree lat/long tiles. After converting to WGS84 I tried clipping out (using Save As, then editing coordinates in map extent, which will be terrible if I can't go bigger). I was able to export a black-and-white TIF, but that obviously isn't very helpful.
 
Last edited:
Messages
1,510
Country
unitedstates
I wonder if it's possible to clip out smaller areas, such as 10-degree lat/long tiles

That's what I've been doing. A landclass .raw file covers an LOD5 cell so what I did in SBuilder was turn on QMID 7 grids (same size as an LOD5 cell), make a polygon, and right click > fill to QMID 7. Then I got the coords from the upper right and lower left corners of the polygon and used them in my gdalwarp command to trim out a chunk I can import into SBuilderX. I did 4 LOD5 cells at once on this last one I tried, I'm not sure if the SBuilderX zoom issue has anything to do with the size of the map, I think it does though. Four LOD5 cells is something like 620 km horizontally and 620 km vertically so it's a big area. I'm playing with the state of Idaho and it looks like I can do the whole state with ten LOD5 cells, with a little overlap into the neighboring states.

My OSGeo command looks like this:

Code:
::                                                                                     -te <xmin  ymin    xmax   ymax>
::                                                                                          West  South   East   North
gdalwarp -of GTiff -co "INTERLEAVE=PIXEL" -t_srs "+proj=latlong +datum=WGS84" -r cubic -te -120.0 42.1875 -112.5 47.8125 "%remote%\NLCD_2016_Land_Cover_L48_20190424.img" "%remote%\class_map_McCall__WGS84_clipped.tif"

...where %remote% is the full path to the folder I'm working out of. I got a warning from gdalwarp about the file (basically being indexed color) and suggesting I convert it to 24 or 32 bit first but it doesn't seem to affect using it as a class map in SbuilderX.
 
Messages
496
Country
us-missouri
I busted out a 1-degree tile and managed to export it to SBuilderX and started the process of making the class map by matching colors and editing the values based on the legend (https://www.mrlc.gov/data/legends/national-land-cover-database-2016-nlcd2016-legend) but I'm not making any progress as far as what to do with it. Seems exporting to SBX happens, but if so, I don't know what's next. Saving and taking a break seems to be the best choice, but I know I'm so close!
 
Last edited:
Messages
496
Country
us-missouri
Sure sounds simple, but I have nothing to select; just the imported map itself. I think the editing portion of the Land Class Tool menu is squared away. Seems logical that maybe the "Make" button under "Class Map" should do something more for me than say "No Class Map Found." There is only so many moving parts to this job and I think most of them have been eliminated.
 
Last edited:
Messages
1,510
Country
unitedstates
It isn't simple really, it's actually a PITA if youve never done it before, lol.
Your class map needs to be titled "Class_"something or other, it's the "Class"part of it that matters. Do File > Properties and then hit the Class Scenery tab. It tells you a little bit about it: "The name of the map(s) should start with the word "Class".

SBX_class_map00.jpg


(I'm not finished with Shrub_scrub yet, I copied it from Pasture Hay in the .sbx, ignore the LC values there, I still need to define them properly, and all the others are subject to change as well)

Then you "add" your LC values on that same dialog choosing the three values 60%, 25% and 15%, here's a pic of the dialog that follows:

SBX_class_map01.jpg


Once you've defined all your colors, then yep, it's the "Make" button that generates the landclass. EDIT: after that Do Select > All land tiles and then hit the compile button.
 
Last edited:
Messages
496
Country
us-missouri
I had done all the hard work already (twice in fact, due to SBuilderX crashing). Looks like I just needed to rename the map. I can't get it to work as it still says no class map found. I'll try again tomorrow... I am getting closer though, thanks!
 
Messages
7,450
Country
us-illinois
Hi Chris:

Many thanks to Jim for once again sharing from his considerable insights in working with SBuilder. :)

FYI: Jim is one of my heroes in the FS Community. :wizard:


As Jim mentioned "RAW" format above, and we do not see an example *.INF in this thread yet, perhaps if you post one, we can be certain that the processing of source imagery utilizes the correct parameter values for compilation of a 'RAW' imagery graphical source file format when submitted to SDK Resample ? :scratchch



Raw Raw BIP, BIL, or BSQ file

Also see: Raw Data Source Parameters

[EDITED]

Additionally, it may help if we know which graphics application and file format output setting was used when you exported your "RAW" source file. ;)

[END_EDIT]


PS: I was able find a few Search results from Google which might shed some light on this:



Of initial note is this discussion with SBuilderX author Luis Sa':


GaryGB
 
Last edited:
Messages
1,510
Country
unitedstates
Hi Gary, thanks for the kind words. :) SBX creates the .raw files and the accompanying .infs when you hit the compile button so that pretty much eliminates user-error from the resampling part of the equation. I did eventually manage to landclass four LOD5 cells using this process (I put them in FS9 actually because my P3D and FSX are Orbx'ed to the max). It obviously changed things from default FS9 and I can't say it was hideous, but it became apparent to me the LC selections vs color definitions would require a lot more work. With OpenLC available and even a old national landclass product from FSGenesis for FS9 I couldn't see where it was worth the trouble so I packed it all away and moved on to another equally senseless project. :)

When I did this for the state of Maine I had no idea where a person could obtain land cover data or that it was even available so I opened worldLC.bgl in TMFViewer and print-screened it. Then I made the class map from that, modifying colors manually in PhotoShop and what not. The landclass tiles are really very coarse, the granularity of the land cover map exceeds the granularity of the landclass grid by 100x. In TMFViewer you see each individual tile and I think that's why it worked as well as it did for me in the past. One color = one tile basically and the auto-generated LC pretty much filled the entire map perfectly. With the land cover map it seems SBX struggled a bit over which was the dominant color for a given cell and in that case it appears it just skipped it leaving a "hole" in the landclass. My generated landclass resembled Swiss cheese somewhat with lots of holes where the default LC showed through.
 
Messages
496
Country
us-missouri
If you moved on to another "equally senseless project," I should probably bump this down on my priority list and revisit later when I know a little more about scenery design. Thank you both for all the input.
 
Top