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

ImportOGR introduces uncommanded split polygons in source data

I'm working testing my buildings categorisation only, without splitting complex polys using ReplacePolygonByBuildingRectangles yet.

The attached image shows just one building polygon, in red is the source data poly, in colour below that is the polygon exported back to shp file AFTER only running multiple AddAttribute commands to categorise the building polygons. (The different colours represent different building categories applied using AddAttribute.) I was expecting the whole poly to come back as a single poly with a single BUILDTYPE attribute.

It appears that something (I believe the internal courtyard areas?) is causing the complex poly to be split up in an uncommanded fashion. Closer inspection of more data shows that ANY building poly with an internal courtyard area exhibits these splits being made from two vertices belonging to each internal courtyard, each going to an apparently random point on a poly line.

The splits DO NOT go to the nearest vertex on a nearby poly side, nor do they take the shortest distance between an internal courtyard vertex and an external poly line. It looks to me from their positioning as though there is some logic behind their placement in that a number follow the same 'radial' and are definitely not random.

It doesn't appear to me that I can exert any control over where or how these splits take place. The positioning of these splits makes a complete dogs breakfast of any attempts to split sub-elements of complex buildings using ReplacePolygonByBuildingRectangles and categorise the resulting parts though!

I deduce from the fact that different split components of the poly have different BUILDTYPE attributes, that the splits in the polygons must have been introduced prior to the AddAttribute commands in my script. The only process before that is the ImportOGR step, hence these splits must be introduced somehow during that step. So...

Q:Has anyone encountered this before?
Q:Is this introduced by Scenproc?
Q:If so, is this intentional?
Q:If so, why?
Q:If not, does anyone know a way it can be prevented/avoided please? :p

Thanks Kevin :)
 

Attachments

  • Uncommanded building polygon split.jpg
    Uncommanded building polygon split.jpg
    48.1 KB · Views: 332

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Hi,

Yes, this is by design. Since FS doesn't support holes in polygons scenproc removes the holes on import. And this can split the polygon.

There is an option to not process holes, in that case only the outer ring is read.

I have an update in development with better support for holes. In that case they are only removed just before writing the agn files.
 
Thanks Arno,
I have read that part of the manual repeatedly :banghead: Advice to self... RTFM again!
I wanted to use the holes if at all possible, so don't want to not process them unless its unavoidable. I suppose cleaner building splits (sans courtyards) are a better solution than weird splits that cause unrepresentative autogen in FS. Thanks again for Scenproc, it's a fascinating utility once you start nosing around in it :)
Cheers K
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
The autogen buildings can't handle such holes very well, since they always have to be rectangular. So I guess you get better results if you leave them out.

But I'm sure there will be polygons that look unrealistic without the holes as well :)
 
Top