- Messages
- 150
- Country

Hey Arno! Thanks for the great tools and info you gave and constantly give, as first 
By the way, I've been using ScenProc lately from about 1 week (never had a clue about what scenproc was or the way it works, so i had to start from scratch).
I've been watching
this video.
Done everything and sorted it out trying to figure out how to make it work with *.shp shapefiles instead of OSM datafiles.
This is my first try:
BUT it resulted in 0 attributes applied and 0 AutoGen created.
After that not working I've been talking on an Italian forum with his admin, and also a FSDeveloper User, Anto80.
Talking, and trying to solve it, has been useful somehow, since we sorted out how to make it partially work.
So we ended up with this code (Thanks to Anto80, again, you gotta be proud of your users dehee!):
BUT as you can see, giving attributes now work, but it doesn't take them in consideration when creating the autogen.
And also, creating categories has made the script totally not working, so we're kinda both in a stall situation.
What I am asking now is, can you give me a working code and maybe an explanation of what was wrong with the previously mentioned script? (knowing the result without knowing where the mistakes were has no use if you want to learn something XD)
Best regards dude, and go on this way, you made "World" (and it ain't a way to say
) easier, to be created eheheheh!
Much respect, from Italy
By the way, I've been using ScenProc lately from about 1 week (never had a clue about what scenproc was or the way it works, so i had to start from scratch).
I've been watching
Done everything and sorted it out trying to figure out how to make it work with *.shp shapefiles instead of OSM datafiles.
This is my first try:
Code:
CODICE
# Ossola_Autogen
IMPORTOGR|E:\Gamez\MFSX\Scenari\Ossola_autogens\Ossola_lago\buildings.shp|*|*|NOREPROJ
IMPORTOGR|E:\Gamez\MFSX\Scenari\Ossola_autogens\Ossola_lago\landuse.shp|*|*|NOREPROJ
IMPORTOGR|E:\Gamez\MFSX\Scenari\Ossola_autogens\Ossola_lago\roads.shp|*|*|NOREPROJ
SPLITGRID|AGN|buildings=*
#ATTRIBUTI
# 1- Rettangolari
# 2- Quasi rettangolari
# 3- Forme Regolari
# 4- Convessi
# 5- Concavi
ADDATTRIBUTE|FTYPE=POLYGON;buildings=*;FNUMVERT=4;FNUMPERPANG=4|BUILDTYPE|1
ADDATTRIBUTE|BUILDTYPE!1;FTYPE=POLYGON;buildings=*;FAREARAT=0.70|BUILDTYPE|2
ADDATTRIBUTE|BUILDTYPE!1;BUILDTYPE!2;FTYPE=POLYGON;buildings=*;FNUMPERPANG>3;FNUMNOTPAR<2;FNUMVERT<10|BUILDTYPE|3
ADDATTRIBUTE|BUILDTYPE!1;BUILDTYPE!2;BUILDTYPE!3;FTYPE=POLYGON;buildings=*;FCONVEX=1|BUILDTYPE|4
ADDATTRIBUTE|BUILDTYPE!1;BUILDTYPE!2;BUILDTYPE!3;BUILDTYPE!4;FTYPE=POLYGON;buildings=*|BUILDTYPE|5
#
#Aggiungi attributi in base alla tipologia di edificio
# 1- Rurale
# 2- Residenziale
# 3- Industriale
ADDATTRIBUTE|FTYPE=POLYGON;buildings=*|BUILDCAT|1
ADDATTRIBUTEIFINSIDE|FTYPE=POLYGON;buildings=*|FTYPE=POLYGON;landuse=residential|BUILDCAT|2
ADDATTRIBUTEIFINSIDE|FTYPE=POLYGON;buildings=*|FTYPE=POLYGON;landuse=industrial|BUILDCAT|3
#
#Crea nuove caratteristiche
REPLACEPOLYGONBYBUILDINGRECTANGLES|BUILDTYPE=3
#
PLACEPOINTSALONGLINE|FTYPE=LINE;roads=secondary|150;150|5;5|type|light|hdg
#
#Proprietà
SETAGNBUILDINGHEIGHT|*|0,7;0,3;0,0;0,0
#
#Edifici
CREATEAGNGENBUILD|BUILDCAT=1;BUILDTYPE<3|{5ae04eb6-934c-4f63-bb48-5e7dee601212}
CREATEAGNGENBUILD|BUILDCAT=2;BUILDTYPE<3;FWIDTH<20|{5ae04eb6-934c-4f63-bb48-5e7dee601212}|MAXRATIO=2
CREATEAGNGENBUILD|BUILDCAT=2;BUILDTYPE<3;FWIDTH>20|{311de8c7-e596-4e28-a94d-da09d0252ce4}
CREATEAGNGENBUILD|BUILDCAT=3;BUILDTYPE<3|{4eb68be7-2f1f-4cd2-920e-becfa2d8c888}
#
#Library Obj.
CREATEAGNLIBOBJ|FTYPE=POINT;type=light|{0017a263-464f-14fd-f77f-2996fed44864}|hdg|0|8;8
#
#SALVA
EXPORTAGN|FSX|E:\Gamez\MFSX\Scenari\Ossola_autogens\Results
BUT it resulted in 0 attributes applied and 0 AutoGen created.
After that not working I've been talking on an Italian forum with his admin, and also a FSDeveloper User, Anto80.
Talking, and trying to solve it, has been useful somehow, since we sorted out how to make it partially work.
So we ended up with this code (Thanks to Anto80, again, you gotta be proud of your users dehee!):
Code:
# Ossola_Autogen
IMPORTOGR|buildings.shp|*|*|NOREPROJ
SPLITGRID|AGN
#ATTRIBUTI
# 1- Rettangolari
# 2- Quasi rettangolari
# 3- Forme Regolari
# 4- Convessi
# 5- Concavi
ADDATTRIBUTE|FTYPE=POLYGON;FROMFILE=buildings.shp;FNUMVERT=4;FNUMPERPANG=4|BUILDTYPE|1
ADDATTRIBUTE|BUILDTYPE!1;FROMFILE=buildings.shp;FTYPE=POLYGON;FAREARAT=0.70|BUILDTYPE|2
ADDATTRIBUTE|BUILDTYPE!1;BUILDTYPE!2;FROMFILE=buildings.shp;FTYPE=POLYGON;FNUMPERPANG>3;FNUMNOTPAR<2;FNUMVERT<10|BUILDTYPE|3
ADDATTRIBUTE|BUILDTYPE!1;BUILDTYPE!2;BUILDTYPE!3;FROMFILE=buildings.shp;FTYPE=POLYGON;FCONVEX=1|BUILDTYPE|4
ADDATTRIBUTE|BUILDTYPE!1;BUILDTYPE!2;BUILDTYPE!3;BUILDTYPE!4;FTYPE=POLYGON;FROMFILE=buildings.shp|BUILDTYPE|5
#
#Aggiungi attributi in base alla tipologia di edificio
# 1- Rurale
# 2- Residenziale
# 3- Industriale
ADDATTRIBUTE|FROMFILE=buildings.shp;FTYPE=POLYGON;buildings=*|BUILDCAT|1
#ADDATTRIBUTEIFINSIDE|FROMFILE=buildings.shp;FTYPE=POLYGON;buildings=*|FTYPE=POLYGON;landuse=residential|BUILDCAT|2
#ADDATTRIBUTEIFINSIDE|FROMFILE=buildings.shp;FTYPE=POLYGON;buildings=*|FTYPE=POLYGON;landuse=industrial|BUILDCAT|3
#
#Crea nuove caratteristiche
#REPLACEPOLYGONBYBUILDINGRECTANGLES|BUILDTYPE=3
#
#PLACEPOINTSALONGLINE|FTYPE=LINE;roads=secondary|150;150|5;5|type|light|hdg
#
#Proprietà
SETAGNBUILDINGHEIGHT|*|0.7;0.3;0.0;0.0
#
#Edifici
CREATEAGNGENBUILD|FROMFILE=buildings.shp;FWIDTH<20|{5ae04eb6-934c-4f63-bb48-5e7dee601212}|MAXRATIO=2
CREATEAGNGENBUILD|FROMFILE=buildings.shp;FWIDTH>20|{311de8c7-e596-4e28-a94d-da09d0252ce4}
#
#
#SALVA
EXPORTAGN|FSX|D:\aa\domodossola\texture
BUT as you can see, giving attributes now work, but it doesn't take them in consideration when creating the autogen.
And also, creating categories has made the script totally not working, so we're kinda both in a stall situation.
What I am asking now is, can you give me a working code and maybe an explanation of what was wrong with the previously mentioned script? (knowing the result without knowing where the mistakes were has no use if you want to learn something XD)
Best regards dude, and go on this way, you made "World" (and it ain't a way to say
Much respect, from Italy


