in3Utils.geoTrans¶
Opperations and transformations of rasters and lines
Functions
Gauss’s area formula to calculate polygon area |
|
convert from cartesian to spherical coordinates |
|
Check if two rasters overlap |
|
check that the avalanche profiles goes from top to bottom flip it if not and adjust the splitpoint in consequence |
|
compute s coordinate given a path (x, y) |
|
Find the beta point: first point under the beta value given in prepareAngleProfile. |
|
find point on dem given a direction and a z value to reach |
|
Finds the closest point in Points to the avaProfile and returns its projection on avaProfile. |
|
Find all raster cells crossed by the line line has to be entierly contained on the raster extend. |
|
Find the neighbour cells to a given cell |
|
Determines if a polygon path is mostly clockwise or counter clockwise |
|
Get x and y (2D) grid description vectors for a mesh with a given number of rows and columns, lower left center and cellSize. |
|
Create grid :Parameters: * xllc, yllc (float) – x and y coordinate of the lower left center * csz (float) – cell size * ncols, nrows (int) – number of columns and rows |
|
Creates a domain (irregular raster) along a path, given the path xyPath, a domain width and a raster cellsize |
|
Prepare inputs for findAngleProfile function Read profile (s, z), compute the slope Angle look for points for which the slope is under the given Beta value and that are located downstream of the splitPoint |
|
Resample and project line on dem 1- Resample the avapath line with a max intervall of distance=10m between points (projected distance on the horizontal plane). |
|
Projects Z onto points (x,y) using a bilinear or nearest interpolation and returns the z coord |
|
Projects Points on raster using a bilinear or nearest interpolation and returns the z coord (no for loop) |
|
change DEM cell size by reprojecting on a new grid - first check if remeshed DEM available |
|
compute raster data on a new mesh with cellSize using the specified remeshOption. |
|
Reproject raster on a grid of shape rasterRef |
|
rotate a vector provided as start and end point with theta angle rotation counter-clockwise |
|
rotate clockwise a raster arround (0, 0) with theta angle |
|
search if remeshed DEM with correct name and cell size already available |