remove_spikes

Removes any spikes from a geometry.

A spike is defined to be three consecutive points (A, B, C) such that:

For each such spike, the vertex B will be removed.

Parameter 1 - any geometry.

Parameter 2 (Optional) - the maximum value for the sine of the angle in the spike. If omitted, this defaults to the sine of 1 degree.

Parameter 3 (Optional) - the maximum length of the spike.

Returns: the resulting geometry with spikes removed or null if parameter 1 is not a geometry.

Note: This function does not fully support 3D geometries. Any 3D geometries will be projected down to 2 dimensions.