Symptoms

How to create the right hull around your input features without internal gaps.

Resolution

"The Concave Hull is a tool that can be used to compute the envelope of a set of points in the plane, by generating convex or non-convex polygons that represent the area occupied by the given points.

For certain applications, the convex hull does not represent well the boundaries of a given set of points. For example if you had a crescent of trees in an area shaped like a 'C', concave hull would capture the entire area around it in a shape like an O. In this case, where the points could represent trees in a forest, the region defined by the convex hull does not represent the region occupied by the trees. With the Concave Hull algorithm, the region occupied by the trees can be calculated and represented by a non-convex polygon. By adjusting one single parameter of the algorithm (k), the user can choose the level of smoothness of the computed polygon."


So, first you need to decide if you want a concave or convex hull. Choose convex hull if you just want a boundary around all your points like that which would be formed by a rubber band around your outermost points. However, if you want more detail and retain some of the larger inward gaps, then consider trying the concave hull. For example, if you have points in the shape of a 'G', do you want the hull to generate something like a 'O' (convex) or a '6' (concave)?


In FME, the k value is called 'alpha'. This controls smoothness and also tolerance. For example, alpha controls whether or not vertices are linked into the same concave polygon. With one alpha setting, a shape like a 'G' might become a 6, and with another larger setting, G might become O.

See the attached example to see how this works.

What if your resulting polygon has holes in it?     The reason for this is that your alpha value is not high enough. For example, if there are gaps that are large relative to the alpha value, the concave hull algorithm picks up these as holes. To avoid this you need to choose a larger alpha value. However, too big an alpha and the concavehull will look like a convexhull, so you will need to experiment a bit.