Skip to main content

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

Hi @jonnasemail 

Please, could you share us your source data?


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.


Hi @jonnasemail 

Please, could you share us your source data?

Hi, here’s the source data attached.


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.


Reply