Commit e7b8e3aa authored by  Lukas Eller's avatar Lukas Eller

changed return value of geospatial process landuseclasses

parent 85040600
...@@ -4,6 +4,7 @@ from shapely.geometry import LineString, Point, Polygon, box ...@@ -4,6 +4,7 @@ from shapely.geometry import LineString, Point, Polygon, box
from shapely.ops import unary_union from shapely.ops import unary_union
from tqdm import tqdm from tqdm import tqdm
import pandas as pd import pandas as pd
from typing import Dict
def project_onto_streets( def project_onto_streets(
point_series: gpd.GeoSeries, point_series: gpd.GeoSeries,
...@@ -211,7 +212,7 @@ def assign_landuse_classes( ...@@ -211,7 +212,7 @@ def assign_landuse_classes(
cut_polygons_by_buffer: bool = False, cut_polygons_by_buffer: bool = False,
buffer_size: int = 0, buffer_size: int = 0,
epsg: str = "EPSG:31287", epsg: str = "EPSG:31287",
) -> gpd.GeoDataFrame: ) -> Dict:
''' '''
Returns a DataFrame with the landuse class distribution in the area defined by the buffer_size around the passed locations Returns a DataFrame with the landuse class distribution in the area defined by the buffer_size around the passed locations
Landuseclasses are defined according to the Corine Land Cover Project: Landuseclasses are defined according to the Corine Land Cover Project:
...@@ -276,6 +277,4 @@ def assign_landuse_classes( ...@@ -276,6 +277,4 @@ def assign_landuse_classes(
results[i] = first5pairs results[i] = first5pairs
result_df = pd.DataFrame(results).transpose() return results
result_df.index = point_geodataframe.index
return result_df
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment