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:
or even more simple
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
--------------------
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!
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!


