windkit.map_conversion.poly2lines(poly_gdf, background_lc_id=None, atol=0, complete_polys=False)[source]

Convert a geodataframe of polygons to a geodataframe of lines.

  • poly_gdf (GeoDataFrame) – A geodataframe including the columns geometry filled with Polygons and id filled with integers or float.

  • background_lc_id (int or None, optional. Default: None) – When not None, all empty area of the polygon map will be filled with this value. This will be used to create change lines between polygons and empty space.

  • atol (float, optional. Default: 0) – maximum to distance to consider that two points are at the same place.

  • complete_polys (bool, optional. Default: False) – Do not rely on the assumptions that neighbour polygons vertices match. Recommended for raster objects. Only has an effect when atol is >0.