map2loop.m2l_geometry
- map2loop.m2l_geometry.create_orientations(config: Config, map_data: MapData, workflow: dict)
[Find those series that don’t have any orientation or contact point data and add some random data]
- Args:
path_in ([str]): [path to input directory] path_out ([str]): [path to output directory] dtm ([rasterio grid]): [digital terrain model] dtb ([rasterio grid]): [depth to basement model] dtb_null ([float]): [null dtb value] cover_map ([boolean]): [availability of cover map] geology ([geopandas DataFrame]): [geology polygons] structures ([geopandas DataFrame]): [point structural oberservations] c_l ([dict]): [field names]
- map2loop.m2l_geometry.extract_poly_coords(geom, i)
[Convert polygons with holes into distinct poygons]
- Args:
geom ([shapely geometry]): [geology polygon or multipolygon] i ([int]): [master index of polygon coordinates]
- Raises:
ValueError: [geometry type if not a polygon or multipolygon]
- Returns:
[dict]: [exterior and interior coordinates]
- map2loop.m2l_geometry.lmn_from_line_dip(x1, y1, z1, x2, y2, z2, dip)
- [Calculate direction cosines of a plane defined by a 3D line defined by the local contact orientationa and a known dip]
[returns direction cosines of 2 possible planes or -999s if no solution possible]
- Args:
x1 ([float]): [x position of start of contact 3D line segment] y1 ([float]): [y position of start of contact 3D line segment] z1 ([float]): [z position of start of contact 3D line segment] x2 ([float]): [x position of start of contact 3D line segment] y2 ([float]): [y position of start of contact 3D line segment] z2 ([float]): [z position of start of contact 3D line segment] dip ([float]): [estimated dip of plane]
- Returns:
l1 ([float]): [solution 1 of l direction cosine of plane that contains 3D line segment and has a dip of dip with horizontal] m1 ([float]): [solution 1 of m direction cosine of plane that contains 3D line segment and has a dip of dip with horizontal] n1 ([float]): [solution 1 of n direction cosine of plane that contains 3D line segment and has a dip of dip with horizontal] l2 ([float]): [solution 2 of l direction cosine of plane that contains 3D line segment and has a dip of dip with horizontal] m2 ([float]): [solution 2 of m direction cosine of plane that contains 3D line segment and has a dip of dip with horizontal] n2 ([float]): [solution 2 of n direction cosine of plane that contains 3D line segment and has a dip of dip with horizontal]
- map2loop.m2l_geometry.save_orientations(config: Config, map_data: MapData, workflow)
[Export orientation data in csv format with heights and strat code added]
- Args:
structures ([geopandas DataFrame]): [point structural oberservations] path_out ([str]): [path to output directory] c_l ([type]): [description] orientation_decimate ([int]): [decimation factor] dtm ([rasterio grid]): [digital terrain model] dtb ([rasterio grid]): [depth to basement model] dtb_null ([float]): [null dtb value] cover_map ([boolean]): [availability of cover map]