• 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 batch processing

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
34,521
Country
netherlands
When you want to process bigger quantities of data with scenProc the graphical user interface is not always the easiest way to do this. In that case it is much easier if you can call scenProc from a script, for example a batch file. This is already possible for a while, but yesterday I have made some changes to make this mode of running scenProc even more powerful.

Let’s just start with some details on how to run scenProc from the command prompt. Below you see the syntax. The first argument you provide is the configuration file you want to use. The /run argument tells scenProc to directly run the configuration after opening, so that you don’t have to press any buttons to start it. This will also ensure that scenProc automatically closes when it is finished. The /log is optional, but when you provide it the messages from the event log are written to the indicated file when the processing is done. This allows you to check what happened later on.

scenProc myfile.spc /run /log mylog.txt

So far for the batch options that were already available (only the argument to generate the log has changed). What I have added now is that you can also pass additional variables into the scenProc configuration. This makes it possible to use one template scenProc configuration and customize using the variables exactly what will happen.

Let’s give an example. Let’s assume you have a folder with different shp files and you all want to process them with the same scenProc configuration. Then you should call scenProc each time with a different filename as variable. For example:

scenProc myfile.spc /run /log mylog.txt input13.shp

In your configuration file you will also have to make a change. Your configuration file would become like this:

# @0@= test.shp
#
IMPORTOGR|@0@|*|*|NOREPROJ
#
SPLITGRID|AGN
CREATEAGNPOLYVEG|FTYPE=POLYGON|{guid}
WRITEAGNFILES|FSX|texture

As you see in the IMPORTOGR step we don’t provide a filename, but the user variable number surrounded by @. You should always start counting from zero and the number is the order in which you provide the variable from the command prompt. While running scenProc will substitute this special code with the value you passed.

As you can also see I put a special comment at the top of the file. In this comment I also assign a value to the special batch variable. This value in the comment is only used if you run from the GUI, so that way you can still test your configuration. But when running from the command prompt it is ignored.

But of course you can use this to pass other things than file names. You could also use this to process your data in parts. Let’s take this configuration file as example:

IMPORTOGR|country.osm|@0@;@1@;@2@;@3@|*|NORPROJ
#
SPLITGRID|AGN
CREATEAGNPOLYVEG|FTYPE=POLYGON|{guid}
WRITEAGNFILES|FSX|texture

In this case the user variables are used to specify a different bounding box for the data to read. So you can specify different extends every time you call scenProc and thereby process a big area in pieces, without having to preprocess all your data.

I hope this feature is useful and I’m sure some of you will come up with even more interesting ways to use this.

Continue reading...
 
i don't know what you had for dinner last night, make sure you have it again
loving all the new additions


Chris
 
Hehe, those posts are from the blog. So they are actually from the last few weeks. I have now setup a way to post them here on the forum as well. Easier for people to see them. So it's kind of catching up now.
 
Hi Arno,

I'm still trying to sort out doing my AGN files in batches. I've tried splitting them into LOD grids, but I'm still ending up with gaps between data cells. I saw somewhere you found the best solution was to importAGN to fill in those gaps but I couldn't quite figure out how I'd do that.

Example: I have one file that has a massive amount of buildings and vegetation, if I export based on LOD split grids then I end up with a gap for approximately 1/2 an LOD cell. I'm still trying to get my head around how to do this stage, as the dataset is so large that when I hit my physical RAM limit the whole process stops as soon as the pagefile starts getting used. I'm wondering if perhaps scenproc can maybe write out chunks of AGN files as it goes along, rather than processing the whole source dataset before writing out the AGN files. Or would that not be possible. One thought is if scenproc parsed the whole lot of source data, and created metadata files containing AGN tile extents then runs a process on each of those AGN tiles in a batch process one by one.
 
Hi Dean,

I'll post my configuration tonight when I get home.
 
As you see I forgot it yesterday :). And now I'm not behind my pc, I don't have the configuration file here on the ipad. So tomorrow (if i don't forget).
 
Hi Dean,

Here is the skeleton of my configuration file:

Code:
IMPORTOGR|02_oost.gml|*|typeLandgebruik;typeInrichtingselement;hoogteklasse|NOREPROJ
##
SPLITGRID|AGN|FLAYER=Gebouw
#
IMPORTAGN|texture|EXISTINGCELLSONLY
#
# Create new objects here
#
EXPORTAGN|FSX|texture

I used this in a batch process where I looped over the different files. These files were not adjusted to the autogen LOD grid, they were organised as the real paper maps are organised.

The main trick is to put the IMPORTAGN command after you used SPLITGRID on your data. With the EXISTINGCELLSONLY option it will load any existing autogen objects that overlap with the data currently loaded (else it would load all autogen in the folder and that is a potential overhead that will slow down things).

You can then create new autogen objects as normal. When exporting the AGN both the existing and the new objects are saved to disk again.
 
Back
Top