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

ScenProc Super Batch

Messages
219
Country
italy
Ok Arno... here's a new challenge for you. I think others will benefit from this.

PREFACE

ScenProc is a great tool but it process big areas in one shot so if you have huge areas to produce autogen for, it will need huge RAM overload which resutl in longer compiling time.
The batch function (@0@) you have implemented makes it easier but, still, it's still not enough for a work scenario liek the one explained below.

Many areas of the USA (but not only) don't have buildings footprint in OSM data so, the only way is to paint it in Photoshop.

I believe this SUPER BATCH function will make ScenProc work much faster (less RAM load) and will be appreciated by others who want to process many autogen types for large geo areas.

WORKING SCENARIO

I create vegetation types from NLCD landcover data in Photoshop. The exported files are place in separate folders (one per veg type) keeping the same filename of the original tile. (i.e.: areaname_##.tif or areaname#.tif or......)

I also create buildings from a mix (multiple TYPEs) of source, all in PSD (photoshop document) with with all the sources merged in. The saved files will all have the same filename but, like the vegetation files, all in separate dedicated folders.

So the working scenario in the end will something like:

X:\autogen\evergreen\areaname_01.tif, areaname_02.tif, areaname_02.tif, areaname_03.tif....... and so on
X:\autogen\decidious\areaname_01.tif, areaname_02.tif, areaname_02.tif, areaname_03.tif....... and so on
X:\autogen\buildingsYY\areaname_01.tif, areaname_02.tif, areaname_02.tif, areaname_03.tif....... and so on
X:\autogen\buildingsXX\areaname_01.tif, areaname_02.tif, areaname_02.tif, areaname_03.tif....... and so on

from here I create SHP files to subdirectories like:

X:\autogen\evergreen\SHP\areaname_01.SHP, areaname_02.SHP, areaname_02.SHP, areaname_03.SHP....... and so on
X:\autogen\decidious\SHP\areaname_01.SHP, areaname_02.SHP, areaname_02.SHP, areaname_03.SHP....... and so on
X:\autogen\buildingsYY\SHP\areaname_01.SHP, areaname_02.SHP, areaname_02.SHP, areaname_03.SHP....... and so on
X:\autogen\buildingsXX\SHP\areaname_01.SHP, areaname_02.SHP, areaname_02.SHP, areaname_03.SHP....... and so on

SCENPROC PHASE

At this point I have to make scenproc (spc) files, one per ## or one per autogen type (vegetation and buildings) but also for library objects, if any.
7-8 autogen types x 100 tiles = 800 spc files. Impossible job, if done by hand.

Then you need to create the bat file for the batch (one line per spc file). Another impossible job.

SUPER BATCH FEATURE

What is needed is ScenProc to either be able to read (recursing) inside the working dirs (X:\autogen) and compile all the SHP files. ScenProc should be able to do the entire compiling job within a given main directory.

The IMPORTOGR line should be something like:

Code:
IMPORTOGR|X:\autogen\*\areaname*.shp|*|*|NOREPROJ

or even more simple

Code:
IMPORTOGR|X:\autogen|*|areaname*|NOREPROJ

CREATEAGNPOLYVEG|FTYPE=POLYGON;TYPE=evergreen|{GUID} // in my case I substitute TYPE with LAYER
CREATEAGNPOLYVEG|FTYPE=POLYGON;TYPE=decidious|{GUID}
CREATEAGNGENBUILD|FTYPE=POLYGON;TYPE=buildingsYY|{GUID}
CREATEAGNGENBUILD|FTYPE=POLYGON;TYPE=buildingsYY|{GUID}

In case of the FROMFILE way instead of TYPE, maybe could specify the main dir and file mask in 2 separate lines like

WOKRINGDIR="X:\Autogen\"
FILENAME_MASKS="areaname*.tif"

and then use the values in the FROMFILE function.

Now, since we don't want ScenProc to have all the tiles of all the autogen types loaded in RAM to process everything in one shot (that would be crazy), you may implement a LOOP kind of work for SenProc to work on specific AUTOGENTYPE / TILE (i.e.: evergreen / areaname_01.tif)

The following is a Global Mapper scripting part. I think it would be helpful

Code:
GLOBAL_MAPPER_SCRIPT VERSION=1.00
UNLOAD_ALL
  
DIR_LOOP_START DIRECTORY="X:\Autogen\" FILENAME_MASKS="areaname*.tif" RECURSE_DIR=YES

  IMPORT FILENAME="%FNAME_W_DIR%"
  .
  .
// Unload the loaded data
	UNLOAD_ALL

// End the loop
  DIR_LOOP_END


--------------------

The other solution is to build a little software that creates SPC files and BAT file from all the SHP files it finds in a given main dir (same as I do with the INF file to compile my ground textures). But before I go for that solution, I wanted to see if you were able to implement such features in ScenProc which will in the end will make the entire autogen working process faster.

Thanks!
 
Hi,

I'm now about to go to work, so I'll givea more detailed reply tonight.

But I don't understand why you say you need hundreds of configuration files. I think you can do all this with the current batch mode and one configuration file.

The only thing I still need to add is a helper tool to make the bat, that's done manually now.
 
You are right.

I didn't understand the exact use of @0@.

I thought we were supposed to make one SPC file with increasing @0@, @1@, @2@ and so on in the IMPORTOGR line. I understand now how it works so I have 1 SPC file for all the autogen types and one batch file with 25 lines with the /run X increasing for all the tiles (25).

Yes the only thing that is missing is a little help in the making of the batch file and I think that's an easy job for Super Arno. ;)
 
Yes, that's on the todo list.
 
I think Gabriele said he merges the data in Photoshop and then creates the vector data from the image saved in Photoshop. I think he uses Global Mapper to make the shapefile.
 
You created buildings footprint in black and white in Photoshop, then you convert into vector using GM.

Sorry for not replying earlier but I was not notified about new posts in this thread.
 
hi
One more question, is very dificult convert photoshop into vector in GM.
I No make Ideia how can I convert it
Thanks
 
1) double click on the raster layer in the control center window
2) set the transaparency to the color you DO NOT WANT (the area to exclude)
3) click ok
4) right click on the same layer and choose "Create Area Features from Equal values in Selected Layers"

then export VECTOR

thas't it

Anyway... for help about global mapper you may want to consider posting on their forums at http://www.globalmapperforum.com/forums/forum.php
 
Last edited:
Thanks for your help. but I got it
This is a good way but GM generate alot of vertices,even with the SimplifyVertice but still worth but,The only problem was that some houses were floating in some places as in the photo below.
I'll try a few more times to see what happens
thanks
http://imageshack.com/a/img23/9687/rgz0.jpg
 
Back
Top