voxcity.geoprocessor.raster.canopy ================================== .. py:module:: voxcity.geoprocessor.raster.canopy Functions --------- .. autoapisummary:: voxcity.geoprocessor.raster.canopy.create_vegetation_height_grid_from_gdf_polygon voxcity.geoprocessor.raster.canopy.create_dem_grid_from_gdf_polygon voxcity.geoprocessor.raster.canopy.create_canopy_grids_from_tree_gdf Module Contents --------------- .. py:function:: create_vegetation_height_grid_from_gdf_polygon(veg_gdf, mesh_size, polygon) Create a vegetation height grid from a GeoDataFrame of vegetation polygons/objects. Cells with vegetation take the max height of intersecting features. Returns uv_m/SOUTH_UP grid (axis 0 = u/north, row 0 = southern origin edge). Uses :func:`compute_cell_center_coords` so rotated rectangles are handled correctly. .. py:function:: create_dem_grid_from_gdf_polygon(terrain_gdf, mesh_size, polygon) Create a height grid from a terrain GeoDataFrame using nearest-neighbor sampling. Returns uv_m/SOUTH_UP grid (axis 0 = u/north, row 0 = southern origin edge). Uses :func:`compute_cell_center_coords` so rotated rectangles are handled correctly. .. py:function:: create_canopy_grids_from_tree_gdf(tree_gdf, meshsize, rectangle_vertices) Create canopy top and bottom height grids from a tree GeoDataFrame. Supports both Point geometries (individual trees with ellipsoid crowns) and Polygon geometries (forest/wood areas with flat canopy). :param tree_gdf: GeoDataFrame with columns: - geometry: Point or Polygon/MultiPolygon - top_height: Height to canopy top (meters) - bottom_height: Height to canopy bottom (meters) - crown_diameter: Crown diameter (meters, used for Point geometries) - geometry_type (optional): 'point' or 'polygon' to distinguish geometry types :param meshsize: Grid cell size in meters :param rectangle_vertices: List of (lon, lat) tuples defining the area :returns: (canopy_height_grid, canopy_bottom_height_grid) :rtype: tuple