resqpy.olio.simple_lines.polygon_line
- resqpy.olio.simple_lines.polygon_line(line, tolerance=0.001)[source]
Returns a copy of the line with the last vertex stripped off if it is close to the first vertex.
- Parameters:
line (
numpy arrayoffloats) – representation of a poly-line which might be closed (last vertex matches first vertex)tolerance (
float, default= 0.001) – the maximum Manhatten distance between two points for them to be treated as coincident
- Returns:
numpy array of floats which is either a copy of line, or a copy of line with the last point removed