Skip to main content
Question

Input on how to make lines inside of building footprints


jonnasemail
Contributor
Forum|alt.badge.img+4

Hi,

 

I’m working on a script that takes building footprints and outputs different lines inside them (crosses, diagonals, centerlines) depending on the type of building. I have achieved good results for square buildings and buildings that only require a centerline. See picture below.

But when it comes to buildings with more complicated shapes it doesn’t work as well. Some buildings turn out acceptable, like these ones below:

But some shapes turn out pretty bad, like the ones below:

 

I’d rather that they would look something like this:

I guess I would have to make the buildings into separate polygons to achieve these results, if it’s even achieveable. Does anyone have any ideas? I’ll attach a copy of my script

4 replies

danilo_fme
Evangelist
Forum|alt.badge.img+45
  • Evangelist
  • May 26, 2024

Hi @jonnasemail 

Please, could you share us your source data?


nielsgerrits
VIP
Forum|alt.badge.img+54

For most pieces, I would just use an oriented boundingbox (boundingboxreplacer). But for the L shaped polygons you’ll need to come up with something different.


jonnasemail
Contributor
Forum|alt.badge.img+4
  • Author
  • Contributor
  • June 3, 2024
danilo_fme wrote:

Hi @jonnasemail 

Please, could you share us your source data?

Hi, here’s the source data attached.


jonnasemail
Contributor
Forum|alt.badge.img+4
  • Author
  • Contributor
  • June 3, 2024
nielsgerrits wrote:

For most pieces, I would just use an oriented boundingbox (boundingboxreplacer). But for the L shaped polygons you’ll need to come up with something different.

Exactly, if they were more or less square a bounding box works great. But when there’s indents and more angles it does not work as great because then the crosses will get cut weird.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings