geofabrics.geometry =================== .. py:module:: geofabrics.geometry .. autoapi-nested-parse:: This module contains classes associated with manipulating vector data. Classes ------- .. autoapisummary:: geofabrics.geometry.CatchmentGeometry geofabrics.geometry.BathymetryContours geofabrics.geometry.OceanPoints geofabrics.geometry.ElevationPoints geofabrics.geometry.ElevationContours geofabrics.geometry.TileInfo geofabrics.geometry.RiverMouthFan Module Contents --------------- .. py:class:: CatchmentGeometry(catchment_file, crs, resolution, foreshore_buffer = 2) A class defining revelant catchment regions by polygons. The CRS is a dictionary containing the EPSG code for a 'horizontal' and 'vertical' datum. Specifically, this defines polygon regions like 'land', 'foreshore', 'offshore', and ensures all regions are defined in the same CRS. The 'land', 'foreshore' and 'offshore' regions are clipped within the 'catchment', but do not overlap. The 'land' is polygon is defined by a specified polygon which is clipped within the 'catchment'. The 'foreshore' is defined as a 'foreshore_buffer' x 'resolution' outward buffer from the 'land' and within the 'catchment' extents. The 'offshore' region is any remaining region within the 'catchment' and outside the 'land' and 'foreshore' polygons. It also supports functions for determining how much of a region is outside an exclusion zone. I.E. is outside `lidar_extents` see class method land_and_foreshore_without_lidar for an example. It is initalised with the catchment. The land must be added before the other regions (i.e. land, offshore, foreshore, etc) can be accessed. .. py:property:: catchment Return the catchment region .. py:property:: land Return the catchment land region .. py:property:: full_land Return the full land region .. py:property:: foreshore Return the catchment foreshore region .. py:property:: land_and_foreshore Return the catchment land and foreshore region .. py:property:: foreshore_and_offshore Return the catchment foreshore and offshore region .. py:property:: offshore Return the catchment offshore region .. py:method:: land_and_foreshore_without_lidar(dense_extents) Return the land and foreshore region without LiDAR .. py:method:: offshore_without_lidar(dense_extents) Return the offshore region without LiDAR .. py:method:: offshore_dense_data_edge(dense_extents) Return the offshore edge of where there is 'dense data' i.e. LiDAR or reference DEM .. py:method:: offshore_no_dense_data(lidar_extents) Return the offshore area where there is no 'dense data' i.e. LiDAR .. py:class:: BathymetryContours(contour_file, catchment_geometry, z_label=None, exclusion_extent=None) A class for sampling from bathymetry contours. Assumes contours to be sampled to the catchment_geometry resolution .. py:method:: sample_contours(resolution) Sample the contours at the specified resolution. .. py:class:: OceanPoints(points_file, catchment_geometry, is_depth = False, z_label = None) A class for accesing marine bathymetry points. These can be used as depths to interpolate elevations offshore. .. py:property:: boundary Return the bounding box containing data .. py:property:: points Return the points .. py:property:: x The x values .. py:property:: y The y values .. py:property:: z The z values .. py:method:: sample() Return points - rename in future. .. py:class:: ElevationPoints(points_files, polygon_files, catchment_geometry, filter_osm_ids = [], z_labels = None) A class for accessing estimated or measured river, mouth and waterway elevations as points. Paired elevation and polygon files are expected. The elevations are used to interpolate elevations within the polygons. .. py:property:: polygons :type: geopandas.GeoDataFrame Return the polygons. .. py:property:: points_array :type: numpy.ndarray Return the points as a single array. .. py:property:: points Return the points .. py:method:: bank_heights_exist() Return true if the bank heights are defined in array .. py:method:: bank_height_points() Return the points with 'Z' being the estimated bank height as a single array. .. py:property:: x The x values .. py:property:: y The y values .. py:property:: z The z values .. py:class:: ElevationContours(points_files, polygon_files, catchment_geometry, z_labels = None) Bases: :py:obj:`ElevationPoints` Resample at spatial resolution at points .. py:method:: sample_contours(resolution) Sample the contours at the specified resolution. .. py:class:: TileInfo(tile_file, catchment_geometry) A class for working with tiling information. .. py:property:: tile_names Return the names of all tiles within the catchment .. py:class:: RiverMouthFan(aligned_channel_file, river_bathymetry_file, river_polygon_file, ocean_contour_file, ocean_points_file, crs, cross_section_spacing, elevation_labels, ocean_contour_depth_label = None) A class for creating an appropiate river mouth fan to transition from river depth estimates to the ocean bathymetry values. This fan region defines a transition from river to coast within a fan shaped polygon (15 degrees on each side). The fan begins with the most downstream river width estimate, and ends with the first contour of either more than 2x the depth of the mouth. This aims to ensure their is a defined fan that is slightly deeper than the surrounding during the transition. A fan is caculated for both river bed elevation approach. TODO In future,it may move to defining the width as 10x the mouth width. If no width at mouth - move back to where there is a valid width .. attribute:: crs The horizontal CRS to be used. i.e. EPSG 2193 .. attribute:: cross_section_spacing The spacing in :type: m .. attribute:: aligned_channel_file Thefile name for the aligned river channel file. .. attribute:: river_bathymetry_file The file name for the river bathymetry values. .. attribute:: ocean_contour_file The file name for the ocean contours. Depths are positive .. attribute:: ocean_points_file The file name for the ocean points. Elevations are negative. .. attribute:: ocean_contour_depth_label The column label for the depth values. .. py:method:: polygon_and_bathymetry() Calculate and return the fan polygon values. Perform calculations for both rive bed estimation approaches, so both have a smooth transition to offshore bathyemtry.