Public Member Functions | |
def | buffer (self, logger) |
Creates a buffer-shapefile out of the axisfile and the section width. | |
def | check_echo_attribute (self, odm) |
def | classify (self, buffered_odm, logger) |
Classifies points of dataset into ground- and non-ground-points. | |
def | sections (self, classified_odm, logger) |
Creates cross-sections of (ground-)points. | |
def | sections_non_ground (self, classified_odm, logger) |
Creates cross-sections of (non-ground-)points. | |
def | cse (self, outGeo) |
Extracts cross-distances, stationings and elevations of the points in each section out of outGeo. | |
def | sec_stats (self, outGeo) |
Extracts the stationing of each cross-section origin out of outGeo. | |
def | filter_secs (self, outGeo, logger=None) |
Removes sections with not enough points and with points only in one half of the section. More... | |
def | spline (self, outGeo, stepsize=1) |
Fits a spline to the points of each (ground)-section. More... | |
def | knots (self, c_sort_sec, stepsize) |
Evaluates the knots of one spline. More... | |
def | cut_to_water_surface (self, wb_spl, outGeo) |
Interpolates the water surface height for each section and restricts the spline to the water surface. More... | |
def | thalweg_points (self, wb_spl) |
Computes the thalweg point of each section as the median of the spline minima corresponding to self.smoothing. | |
def | plot_sections (self, outGeo, wb_spl, wb_th, logger, outGeoNonGround=None) |
creates section plots, each plot contains the section points, the thalweg point and the spline of one section. | |
def | section_outlines (self, outGeo, logger) |
Creates the section outlines and stores them in a shp-file. | |
def | P0P1 (self, outGeo) |
Extracts the origin and x-axis of each cross-section in global and local coordinates. | |
def | transformation_parameters (self, outGeo) |
Computes the parameters of a similarity transformation. | |
def | thalweg_en (self, outGeo, wb_th) |
Computes the global coordinates of each thalweg point. | |
def | thalweg_shapefile (self, th_en, logger) |
Creates shapefile containing the thalweg. | |
Public Attributes | |
classifyGroundPoints | |
logger | |
scriptName | |
Static Public Attributes | |
common | |
brief | |
description | |
validator | |
argument_group | |
validationErrorText | |
def cut_to_water_surface | ( | self, | |
wb_spl, | |||
outGeo | |||
) |
Interpolates the water surface height for each section and restricts the spline to the water surface.
This method takes a dictionary containing the spline-heights and spline-cross-distances of all sections. Moreover, it takes the outGeometry "outGeo" of the conducted sections. First, the variable "min_spl_length" is set, which stands for the minimum point nummer the restricted spline should have. It is used later to remove those sections whose restricted spline is too short for a reasonable Thalweg computation. As there is one spline point every 5% of the "stepsize" (see self.spline), a "min_spl_length" of x points corresponds to a spline length of (x * 0.05 * "stepsize") meters. Second, the axis-stationings with corresponding water surface heights are extracted from self.waterSurface. They are then used to interpolate the water surface height for all sections. Thirdly, starting from the section-center the splines are restricted at their first point left and right from the center which has a greater height than the water surface height of this section. At the end, restricted splines which are now too short to allow a good thalweg computation are removed.
References hydThalweg.sec_stats().
Referenced by hydThalweg.thalweg_shapefile().
def filter_secs | ( | self, | |
outGeo, | |||
logger = None |
|||
) |
Removes sections with not enough points and with points only in one half of the section.
First, this method loads the cross-distances of the conducted sections (outGeo) into a nested list. Each entry of this list is a list of cross-distances. Each list stands for one section and the cross-distances for the section points. Second, the method iterates through the sections. For each section it creates two masks. mask_neg contains True- values if cross-distances are negative, for mask_pos the opposite applies. Then, the method checks if there are any True-Values in mask_neg/mask_pos. When this is not the case, then there are no negative or no positive cross-distances in this section. Thus, there are section points in only one half of the section and this section is not usable for the thalweg computation. Therefore, it is removed. A section like that often occurs at the border of the dataset where the point cloud does not cover the whole section area. Lastly, sections whose point number is less than the variable "point_count" are removed as well. For the spline computation at least 4 points per section are necessary.
References hydThalweg.cse().
Referenced by hydThalweg.thalweg_shapefile().
def knots | ( | self, | |
c_sort_sec, | |||
stepsize | |||
) |
Evaluates the knots of one spline.
This method is executed every time the spline of a section is computed. It takes the sorted cross-distances of one section and the desired step size of the spline-knots (parameter of self.spline(), default = 1m). At the beginning, the variable "points_per_knot" is set. It states the minimum number of points which are used to compute one spline knot. It needs to be at least "2" to not violate the Schoenberg-Whitney conditions. Next, the section width is extracted from the cfg-file. After that, the sorted cross-distances of the current section are split up into lists of intervals as big as the "stepsize". If necessary, these lists are then changed (concatenated) so that every list contains at least as many points as stated by "points_per_knot". Lastly, the medians of the cross-distances in the interval-lists form the knots of the spline.
References grfApprox.scriptName, grfExport.scriptName, gmpLineModeler.scriptName, and hydThalweg.scriptName.
Referenced by hydThalweg.spline().
def spline | ( | self, | |
outGeo, | |||
stepsize = 1 |
|||
) |
Fits a spline to the points of each (ground)-section.
This method takes the conducted (ground-) sections (outGeo) and fits a spline to the cross-distances of each section. First, the cross-distances and elevations of each section are extracted out of outGeo. Next, they are sorted for ascending cross-distances. Spline-knots are created for each section. Then, with the knots and the sorted cross-distances a spline is created. It is applied on an array ranging from the first to the last knot with a stepsize of 5% x parameter 'stepsize'. This array of regular cross-distances and the resulting spline elevations are stored in a dictionary and returned.
References hydThalweg.cse(), and hydThalweg.knots().
Referenced by hydThalweg.thalweg_shapefile().
|
static |