Skip to main content
Question

Creating polygon from unsorted points of a building

  • September 6, 2013
  • 6 replies
  • 41 views

geolassi
Contributor
Forum|alt.badge.img+5
Hello! I have a floor plan of a building in points. The points are unsorted and in 0.5m distance from each other http://imgur.com/AVGbNFE

 

 

I would need to create a polygon from the points. Transformers I've tried:

 

 

- PointConnector: How can I sort the points using only x and y?

 

- HullAccumulator: I can't find an alpha value, which would work for this. I've tried 0.2-8. If alpha is small, I don't get the whole area geometry. If alpha is big, the area is too generalized.

 

- SurfaceModeller: Problem is that, the surface boundary forms a convex hull.

6 replies

david_r
Celebrity
  • September 6, 2013
Hi,

 

 

how about first using the HullAccumulator to create a generalized polygon, then using the AnchoredSnapper with the input points as anchor to snap the polygon boundary to the original points.

 

 

You might need to use the Densifier with something like a 0.5m distance to create vertices on the polygons first. If so, you could use a Generalizer later to simplify the polygon again.

 

 

David

 

 

 


fmelizard
Safer
Forum|alt.badge.img+19
  • Safer
  • September 6, 2013
Hi Lassi,

 

 

You can try the following approach:

 

  1. Buffer the points (buffer setting dependant on distance between points)
  2. Dissolve to create a singel donut polygon
  3. Extract donut hole
  4. Coerce to polyline
  5. Generalize (generalizing algorithms) for a smoother line
I find the results most of the times usable depending on the accuracy and usage of the end product.

 

 

Itay

fmelizard
Safer
Forum|alt.badge.img+19
  • Safer
  • September 6, 2013
You can skip the last two steps for a polygon.....

fmelizard
Safer
Forum|alt.badge.img+19
  • Safer
  • September 6, 2013
or buffer the generalized line to compensate for the distance to the original points

 


gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • September 9, 2013
U can extract a centrepoint.

 

Then use goniometry to Calculate the order of the points.

 

The overshooots pose a challenge tho..

 

 

i do that often to like order labels for easy reading/finding

geolassi
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • September 10, 2013
David: Thanks for suggestion, but AnchoredSnapper is hard to get working: http://www.imgy.eu/i/56c25f77q95l.png

 

 

Itay: Thanks! With your suggestion, I got closest to the result. You're right, the usability of the result depends on the accuracy and usage of the end product.

 

 

Gio: Thank you for the clever suggestion! I didn't quite get it working. If I use azimuth to the centrepoint as the order, when the wall goes inside the building, the order is messed up: http://www.imgy.eu/i/88s90y9213uo.png.

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