Skip to main content
Question

Input on how to make lines inside of building footprints

  • May 23, 2024
  • 4 replies
  • 143 views

jonnasemail
Contributor
Forum|alt.badge.img+7

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
Celebrity
Forum|alt.badge.img+52
  • Celebrity
  • May 26, 2024

Hi @jonnasemail 

Please, could you share us your source data?


nielsgerrits
VIP
Forum|alt.badge.img+62

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+7
  • Author
  • Contributor
  • June 3, 2024

Hi @jonnasemail 

Please, could you share us your source data?

Hi, here’s the source data attached.


jonnasemail
Contributor
Forum|alt.badge.img+7
  • Author
  • Contributor
  • June 3, 2024

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.