quickpaver.extract_tiling_vertices#

quickpaver.extract_tiling_vertices(polygons: MultiPolygon | Iterable[Polygon], n_decimals: int = 2) Tuple[ndarray[tuple[Any, ...], dtype[float64]], Dict[int, List[int]], ndarray[tuple[Any, ...], dtype[int64]]][source]#

Extract the vertices of all polygons (without duplicates).

Parameters:
  • polygons (Union[shapely.MultiPolygon, Iterable[shapely.Polygon]]) – Polygons for which vertices are extracted.

  • n_decimals (int, optional) – Number of decimals to use for the duplicate removal (it relies on hashing), by default 2.

Returns:

  • 2D Array of vertices coordinates with shape (n, 2), n being the number of vertices extracted.

  • Dict with vertice id ad key and list of associated polygon id as values. This is because duplicated vertices are merged.

Return type:

Tuple[NDArrayFloat, Dict[int, List[int]], NDArrayInt]