foxes.utils.geopandas_helpers.read_shp_polygons

foxes.utils.geopandas_helpers.read_shp_polygons(fname, names=None, name_col='Name', geom_col='geometry', to_utm=True, ret_utm_zone=False, **kwargs)[source]

Reads the polygon points from a shp file.

Parameters:
  • fname (str) – Path to the .shp file

  • names (list: of str, optinal) – The names of the polygons to be extracted. All by default

  • name_col (int) – Column that contains the area names

  • geom_col (str) – The geometry column

  • to_utm (bool or str, optional) – Convert to UTM coordinates. If str, then UTM zone plus letter, e.g. “32U”

  • ret_utm_zone (bool) – Return UTM zone plus letter as str

  • kwargs (dict, optional) – Additional parameters for geopandas.read_shp()

Returns:

  • point_dict_exterior (dict) – Dict with list of array of points. Key: area name, Value: list:np.ndarray, shape of latter: (n_points, 2)

  • point_dict_interior (dict) – Dict with list of array of points. Key: area name, Value: list:np.ndarray, shape of latter: (n_points, 2)

  • utm_zone_str (str, optional) – The utem zone plus letter as str, e.g. “32U”