### Start Docker development environment Source: https://loop3d.org/map2loop/_sources/user_guide/installation.rst.txt Build and start the development environment using docker-compose. ```bash docker-compose up --build ``` -------------------------------- ### Install dependencies from dependencies.txt Source: https://loop3d.org/map2loop/user_guide/installation.html Installs map2loop and its dependencies using the dependencies.txt file from the cloned repository. ```bash conda install -c conda-forge -c loop3d --file dependencies.txt ``` -------------------------------- ### Project.get_sampler Source: https://loop3d.org/map2loop/_sources/_autosummary/map2loop.project.Project.rst.txt Gets the sampler. ```APIDOC ## Project.get_sampler ### Description Gets the sampler. ### Method Method ### Signature Project.get_sampler(...) ### Parameters No parameters documented in the source. ``` -------------------------------- ### DBSCAN clustering example Source: https://loop3d.org/map2loop/_autosummary/map2loop.interpolators.DBSCAN.html Shows how to use sklearn.cluster.DBSCAN to cluster a small dataset. The example creates a numpy array, fits a DBSCAN model with eps=3 and min_samples=2, and prints the resulting labels and the fitted estimator. ```python >>> from sklearn.cluster import DBSCAN >>> import numpy as np >>> X = np.array([[1, 2], [2, 2], [2, 3], ... [8, 7], [8, 8], [25, 80]]) >>> clustering = DBSCAN(eps=3, min_samples=2).fit(X) >>> clustering.labels_ array([ 0, 0, 0, 1, 1, -1]) >>> clustering DBSCAN(eps=3, min_samples=2) ``` -------------------------------- ### Install map2loop in editable mode Source: https://loop3d.org/map2loop/_sources/user_guide/installation.rst.txt Install map2loop in an editable environment using pip. ```bash pip install -e . ``` -------------------------------- ### Build Docker development environment Source: https://loop3d.org/map2loop/user_guide/installation.html Builds and starts the Docker containers for development, then click the Jupyter server forwarded link to access notebooks. ```bash docker-compose up --build ``` -------------------------------- ### Project.get_thickness_calculator Source: https://loop3d.org/map2loop/_sources/_autosummary/map2loop.project.Project.rst.txt Gets the thickness calculator. ```APIDOC ## Project.get_thickness_calculator ### Description Gets the thickness calculator. ### Method Method ### Signature Project.get_thickness_calculator(...) ### Parameters No parameters documented in the source. ``` -------------------------------- ### Install dependencies via conda Source: https://loop3d.org/map2loop/_sources/user_guide/installation.rst.txt Install map2loop and its dependencies using the provided dependencies.txt file. ```bash conda install -c conda-forge -c loop3d --file dependencies.txt ``` -------------------------------- ### Clone map2loop and notebooks Source: https://loop3d.org/map2loop/_sources/user_guide/installation.rst.txt Clone both the map2loop source code and the example notebooks repository. ```bash git clone https://github.com/Loop3D/map2loop.git git clone https://github.com/Loop3D/map2loop-3-notebooks ``` -------------------------------- ### Project.get_thickness_calculator Source: https://loop3d.org/map2loop/_autosummary/map2loop.Project.html Get the name of the thickness calculator being used. ```APIDOC ## Project.get_thickness_calculator ### Description Get the name of the thickness calculator being used. ### Method get_thickness_calculator() ### Parameters None ### Returns - str - The name of the thickness calculator used ``` -------------------------------- ### Generate random hex colors example Source: https://loop3d.org/map2loop/_autosummary/map2loop.mapdata.generate_random_hex_colors.html Demonstrates generating a list of 3 random hex color codes using the generate_random_hex_colors function. ```python >>> generate_random_hex_colors(3) ['#1a2b3c', '#4d5e6f', '#7f8e9d'] ``` -------------------------------- ### Define output file name and start timer Source: https://loop3d.org/map2loop/user_guide/m2l_code_template.html Generate a timestamp-based model name and define the output file path. The output file is saved as 'local_source.loop3d' inside a folder named 'insert_output_folder_name_here' in the current directory. Replace the placeholder folder name with a project-relevant name. ```python from datetime import datetime nowtime=datetime.now().isoformat(timespec='minutes') model_name=nowtime.replace(":","-").replace("T","-") #The next line specifies the name of the output file and the folder containing all the data loop_project_filename = os.path.join("insert_output_folder_name_here", "local_source.loop3d") t0 = time.time() ``` -------------------------------- ### as_integer_ratio() example for int values Source: https://loop3d.org/map2loop/_autosummary/map2loop.m2l_enums.VerboseLevel.html Returns the integer as a ratio in lowest terms with a positive denominator. The doctest shows (10), (-10), and (0) all producing a denominator of 1. ```python >>> (10).as_integer_ratio() (10, 1) >>> (-10).as_integer_ratio() (-10, 1) >>> (0).as_integer_ratio() (0, 1) ``` -------------------------------- ### Calculate mean of fractions Source: https://loop3d.org/map2loop/_autosummary/map2loop.thickness_calculator.mean.html Example showing the calculation of the arithmetic mean using the Fraction class. ```python >>> from fractions import Fraction as F >>> mean([F(3, 7), F(1, 21), F(5, 3), F(1, 3)]) Fraction(13, 21) ``` -------------------------------- ### Project.__init__ Source: https://loop3d.org/map2loop/_sources/_autosummary/map2loop.project.Project.rst.txt Initializes a new Project instance. ```APIDOC ## Project.__init__ ### Description Initializes a new Project instance. ### Method Constructor ### Signature Project.__init__(...) ### Parameters No parameters documented in the source. ``` -------------------------------- ### Express install map2loop Source: https://loop3d.org/map2loop/_sources/user_guide/installation.rst.txt Install map2loop directly using conda with the required channels. ```bash conda install -c conda-forge -c loop3d map2loop -y ``` -------------------------------- ### Initialize Project Instance Source: https://loop3d.org/map2loop/user_guide/m2l_code_template.html Creates a new Project instance by specifying paths to input shapefiles, configuration files, and projection settings. ```python proj = Project( geology_filename = 'enter the full path of your lithology polygon shape file here', fault_filename = 'enter the full path of your linear features shape file here', fold_filename = 'enter the full path of your linear features shape file here', structure_filename = 'enter the full path of your orientation point data shape file here', dtm_filename = 'au', #if the area is in Australia you can leave this as 'au', otherwise specify full path to DTM config_filename = 'enter the full path of your hjson config file here', clut_filename = 'OPTIONAL, enter the full path of the csv file specifying unit colours', clut_file_legacy = True, verbose_level = VerboseLevel.ALL, #can set this to VerboseLevel.NONE if you don't wan't any feedback from the program tmp_path = "insert_output_folder_name_here", working_projection = "EPSG:code", bounding_box = bounding_box, loop_project_filename = os.path.join("insert_output_folder_name_here", "local_source.loop3d") ) ``` -------------------------------- ### Set up project and run all Source: https://loop3d.org/map2loop/_auto_examples/plot_hamersley.html Defines the bounding box for the Hamersley region, creates a Project with WA state data and EPSG:28350 projection, sets samplers for geology and faults, sets the sorter to SorterAlpha, and runs all with take_best=True. Note that commented lines show alternative sorters. ```python bbox_3d = { "minx": 515687.31005864, "miny": 7493446.76593407, "maxx": 562666.860106543, "maxy": 7521273.57407786, "base": -3200, "top": 3000, } # Specify minimum details (which Australian state, projection and bounding box # and output file) loop_project_filename = "wa_output.loop3d" proj = Project( use_australian_state_data="WA", working_projection="EPSG:28350", bounding_box=bbox_3d, verbose_level=VerboseLevel.NONE, loop_project_filename=loop_project_filename, overwrite_loopprojectfile=True, ) # Set the distance between sample points for arial and linestring geometry proj.set_sampler(Datatype.GEOLOGY, SamplerSpacing(200.0)) proj.set_sampler(Datatype.FAULT, SamplerSpacing(200.0)) # Choose which stratigraphic sorter to use or run_all with "take_best" flag to run them all proj.set_sorter(SorterAlpha()) # proj.set_sorter(SorterAgeBased()) # proj.set_sorter(SorterUseHint()) # proj.set_sorter(SorterUseNetworkx()) # proj.set_sorter(SorterMaximiseContacts()) # proj.set_sorter(SorterObservationProjections()) proj.run_all(take_best=True) ``` -------------------------------- ### Config.__init__ Source: https://loop3d.org/map2loop/_sources/_autosummary/map2loop.mapdata.Config.rst.txt Initializes a new instance of the Config class. ```APIDOC ## Config.__init__ ### Description Initializes the configuration object for map2loop data processing. ### Signature `Config()` ``` -------------------------------- ### ThicknessCalculatorAlpha.__init__() Source: https://loop3d.org/map2loop/_autosummary/map2loop.project.ThicknessCalculatorAlpha.html Initializer for the alpha version of the thickness calculator. ```APIDOC ## ThicknessCalculatorAlpha.__init__() ### Description Initializer for the alpha version of the thickness calculator. ### Method Constructor ### Signature __init__() ### Parameters None ### Returns None ``` -------------------------------- ### Rbf interpolation example Source: https://loop3d.org/map2loop/_autosummary/map2loop.interpolators.Rbf.html Example usage of the Rbf class from scipy.interpolate. It creates a radial basis function interpolator from random 3D scattered data and evaluates it on a grid, showing the output shape (20,). ```python >>> import numpy as np >>> from scipy.interpolate import Rbf >>> rng = np.random.default_rng() >>> x, y, z, d = rng.random((4, 50)) >>> rbfi = Rbf(x, y, z, d) # radial basis function interpolator instance >>> xi = yi = zi = np.linspace(0, 1, 20) >>> di = rbfi(xi, yi, zi) # interpolated values >>> di.shape (20,) ``` -------------------------------- ### Project.get_throw_calculator Source: https://loop3d.org/map2loop/_sources/_autosummary/map2loop.project.Project.rst.txt Gets the throw calculator. ```APIDOC ## Project.get_throw_calculator ### Description Gets the throw calculator. ### Method Method ### Signature Project.get_throw_calculator(...) ### Parameters No parameters documented in the source. ``` -------------------------------- ### SamplerDecimator.__init__ Source: https://loop3d.org/map2loop/_sources/_autosummary/map2loop.project.SamplerDecimator.rst.txt Constructor for SamplerDecimator objects. Initializes a new instance of the SamplerDecimator class. ```APIDOC ## __init__ ### Description Initializes a new instance of the SamplerDecimator class. ### Signature `SamplerDecimator.__init__(...)` ``` -------------------------------- ### VerboseLevel.__init__ Source: https://loop3d.org/map2loop/_sources/_autosummary/map2loop.mapdata.VerboseLevel.rst.txt Initializes the VerboseLevel instance. Inherited from int. ```APIDOC ## VerboseLevel.__init__ ### Description Initializes the VerboseLevel instance. Inherited from int. ### Method __init__(value) ### Parameters - **value** (int) - Required - The integer value for the VerboseLevel. ### Returns None ``` -------------------------------- ### Project.get_fault_orientation Source: https://loop3d.org/map2loop/_sources/_autosummary/map2loop.project.Project.rst.txt Gets the fault orientation. ```APIDOC ## Project.get_fault_orientation ### Description Gets the fault orientation. ### Method Method ### Signature Project.get_fault_orientation(...) ### Parameters No parameters documented in the source. ``` -------------------------------- ### Interpolator.setup_grid(bounding_box) Source: https://loop3d.org/map2loop/_autosummary/map2loop.interpolators.Interpolator.html Abstract method to set up an XY grid based on the provided bounding box dictionary. ```APIDOC ## Interpolator.setup_grid(bounding_box) ### Description Abstract method to set up an XY grid (abstract method). Takes a bounding box dictionary as input. ### Method setup_grid ### Parameters - **bounding_box** (dict) - Required - A dictionary containing the bounding box of the map data. Must comply with the following format: {"minx": value, "maxx": value, "miny": value, "maxy": value} ### Returns None ``` -------------------------------- ### Initialize map2loop Project Source: https://loop3d.org/map2loop/_static/m2l_code_template.ipynb Initializes a new Project instance with required file paths, projection, and configuration settings. Ensure file paths use double backslashes or raw strings on Windows to avoid path errors. ```python proj = Project( geology_filename = 'enter the full path of your lithology polygon shape file here', fault_filename = 'enter the full path of your linear features shape file here', fold_filename = 'enter the full path of your linear features shape file here', structure_filename = 'enter the full path of your orientation point data shape file here', dtm_filename = 'au', #if the area is in Australia you can leave this as 'au', otherwise specify full path to DTM config_filename = 'enter the full path of your hjson config file here', clut_filename = 'OPTIONAL, enter the full path of the csv file specifying unit colours', clut_file_legacy = True, verbose_level = VerboseLevel.ALL, #can set this to VerboseLevel.NONE if you don't wan't any feedback from the program tmp_path = "insert_output_folder_name_here", working_projection = "EPSG:code", bounding_box = bounding_box, loop_project_filename = os.path.join("insert_output_folder_name_here", "local_source.loop3d"), overwrite_loopprojectfile=True, ) ``` -------------------------------- ### get_working_projection() Source: https://loop3d.org/map2loop/_autosummary/map2loop.project.MapData.html Gets the working projection. ```APIDOC ## get_working_projection() ### Description Get the working projection. ### Returns - **str** – The working projection ``` -------------------------------- ### SamplerSpacing.sample() Source: https://loop3d.org/map2loop/_autosummary/map2loop.sampler.SamplerSpacing.html Executes the sample method. Takes full point data, samples the data, and returns the sampled points. ```APIDOC ## SamplerSpacing.sample() ### Description Executes the sample method. Takes full point data, samples the data, and returns the sampled points. ### Method sample ### Parameters - **spatial_data** (geopandas.GeoDataFrame) - Required - The data frame to sample (must contain column ["ID"]). - **map_data** (MapData | None) - Optional - Additional map data. ### Returns - **pandas.DataFrame** - The sampled data points. ``` -------------------------------- ### get_config_filename() Source: https://loop3d.org/map2loop/_autosummary/map2loop.project.MapData.html Gets the config filename. ```APIDOC ## get_config_filename() ### Description Get the config filename. ### Returns - **str** – The config filename ``` -------------------------------- ### StructuralPoint.__init__() Source: https://loop3d.org/map2loop/_autosummary/map2loop.thickness_calculator.StructuralPoint.html Initializes the ThicknessCalculator base class. This method is inherited and sets up the calculator instance. ```APIDOC ## `__init__()` ### Description Initialiser of for ThicknessCalculator. Called when creating a StructuralPoint instance. ``` -------------------------------- ### MapData.get_working_projection Source: https://loop3d.org/map2loop/_autosummary/map2loop.fault_orientation.MapData.html Gets the working projection. ```APIDOC ## MapData.get_working_projection ### Description Get the working projection. ### Returns - **str** - The working projection in "EPSG:" form ``` -------------------------------- ### MapData.get_config_filename Source: https://loop3d.org/map2loop/_autosummary/map2loop.fault_orientation.MapData.html Gets the config filename. ```APIDOC ## MapData.get_config_filename ### Description Get the config filename. ### Returns - **str** - The config filename ``` -------------------------------- ### BytesIO.__init__(*args, **kwargs) Source: https://loop3d.org/map2loop/_autosummary/map2loop.mapdata.BytesIO.html Initializes a new BytesIO instance. The constructor accepts an optional initial bytes object. ```APIDOC ## BytesIO.__init__(*args, **kwargs) ### Description Initializes a new BytesIO instance with an optional initial bytes object. ### Method Constructor ### Signature `__init__(*args, **kwargs)` ### Parameters - **args** (tuple) - Optional - Positional arguments passed to the constructor. - **kwargs** (dict) - Optional - Keyword arguments passed to the constructor. ### Notes - The class is defined as `map2loop.mapdata.BytesIO(_initial_bytes=b'')`. ``` -------------------------------- ### map2loop-3 JSON config file example Source: https://loop3d.org/map2loop/user_guide/config_file.html Example JSON configuration file for map2loop-3, showing the structure, geology, fault, and fold sections with column mappings and text identifiers. Use this as a reference when filling out your own config file. ```json { "structure" : { "orientation_type": "strike", "dipdir_column": "strike", "dip_column": "dip", "description_column": "feature", "bedding_text": "Bed", "overturned_column": "structypei", "overturned_text": "BEOI", "objectid_column": "geopnt_id", }, "geology" : { "unitname_column": "unitname", "alt_unitname_column": "code", "group_column": "group_", "supergroup_column": "supersuite", "description_column": "descriptn", "minage_column": "min_age_ma", "maxage_column": "max_age_ma", "rocktype_column": "rocktype1", "alt_rocktype_column": "rocktype2", "sill_text": "is a sill", "intrusive_text": "intrusive", "volcanic_text": "volcanic", "objectid_column": "objectid", "ignore_codes": ["cover"], }, "fault" : { "structtype_column": "feature", "fault_text": "Fault", "dip_null_value": "0", "dipdir_flag": "num", "dipdir_column": "dip_dir", "dip_column": "dip", "orientation_type": "dip direction", "dipestimate_column": "dip_est", "dipestimate_text": "gentle,moderate,steep", "name_column": "name", "objectid_column": "objectid", }, "fold" : { "structtype_column": "feature", "fold_text": "Fold axial trace", "description_column": "type", "synform_text": "syncline", "foldname_column": "name", "objectid_column": "objectid", } } ``` -------------------------------- ### SamplerSpacing.__init__() Source: https://loop3d.org/map2loop/_autosummary/map2loop.project.SamplerSpacing.html Initializes a SamplerSpacing instance with a given spacing distance between samples. ```APIDOC ## SamplerSpacing.__init__() ### Description Initialiser for spacing sampler. Sets the distance between samples. ### Method Constructor ### Signature __init__(spacing: float = 50.0) ### Parameters - **spacing** (float, optional) - The distance between samples. Defaults to 50.0. ### Returns None ``` -------------------------------- ### GzipFile.__init__ Source: https://loop3d.org/map2loop/_autosummary/map2loop.mapdata.GzipFile.html Constructor for the GzipFile class. Initializes a new GzipFile instance with optional filename, mode, compresslevel, fileobj, and mtime parameters. ```APIDOC ## GzipFile.__init__ ### Description Constructor for the GzipFile class. At least one of fileobj and filename must be given a non-trivial value. The new class instance is based on fileobj, which can be a regular file, an io.BytesIO object, or any other object which simulates a file. If fileobj is None, filename is opened to provide a file object. ### Method Constructor ### Signature `__init__(filename=None, mode=None, compresslevel=9, fileobj=None, mtime=None)` ### Parameters - **filename** (str or None) - Optional - The name of the file to open if fileobj is not provided. Used in the gzip header if fileobj is provided. - **mode** (str) - Optional - Can be 'r', 'rb', 'a', 'ab', 'w', 'wb', 'x', or 'xb'. Default is the mode of fileobj if discernible, otherwise 'rb'. - **compresslevel** (int) - Optional - Integer from 0 to 9 controlling compression level. 1 is fastest, 9 is slowest, 0 is no compression. Default is 9. - **fileobj** (file-like object) - Optional - A file-like object to use as the underlying stream. Defaults to None. - **mtime** (numeric timestamp) - Optional - Timestamp to write to the last modification time field when compressing. If omitted or None, current time is used. ### Notes - Only supports binary mode. For text mode, use gzip.open(). - When fileobj is not None, filename is only used for the gzip header. ``` -------------------------------- ### get_ignore_codes() Source: https://loop3d.org/map2loop/_autosummary/map2loop.project.MapData.html Gets the list of codes to ignore. ```APIDOC ## get_ignore_codes() ### Description Get the list of codes to ignore. ### Returns - **list** – The list of codes to ignore ``` -------------------------------- ### DipDipDirectionInterpolator.setup_grid() Source: https://loop3d.org/map2loop/_autosummary/map2loop.thickness_calculator.DipDipDirectionInterpolator.html Sets up the grid for interpolation based on the provided bounding box dictionary. ```APIDOC ## DipDipDirectionInterpolator.setup_grid() ### Description Sets up the grid for interpolation based on the provided bounding box dictionary. ### Method setup_grid ### Signature `setup_grid(bounding_box: dict)` ### Parameters - **bounding_box** (dict) - Required - A dictionary containing the bounding box of the map data. The dictionary should comply with the following format: { "minx": value, "maxx": value, "miny": value, "maxy": value }. ### Returns None ``` -------------------------------- ### Project.get_sorter Source: https://loop3d.org/map2loop/_autosummary/map2loop.Project.html Get the name of the sorter being used. ```APIDOC ## Project.get_sorter ### Description Get the name of the sorter being used. ### Method get_sorter() ### Parameters None ### Returns - str - The name of the sorter used ``` -------------------------------- ### Project.get_minimum_fault_length Source: https://loop3d.org/map2loop/_autosummary/map2loop.Project.html Get the cutoff length for faults. ```APIDOC ## Project.get_minimum_fault_length ### Description Get the cutoff length for faults. ### Method get_minimum_fault_length() -> float ### Parameters None ### Returns - float - The cutoff length ``` -------------------------------- ### Create map2loop Project with input file paths Source: https://loop3d.org/map2loop/_sources/user_guide/m2l_code_template.rst.txt Initializes a map2loop Project with paths to input shapefiles, a DTM, a config file, and output settings. Replace placeholder paths and the EPSG code with your study area values; set verbose_level to VerboseLevel.NONE to suppress feedback. ```python proj = Project( geology_filename = 'enter the full path of your lithology polygon shape file here', fault_filename = 'enter the full path of your linear features shape file here', fold_filename = 'enter the full path of your linear features shape file here', structure_filename = 'enter the full path of your orientation point data shape file here', dtm_filename = 'au', #if the area is in Australia you can leave this as 'au', otherwise specify full path to DTM config_filename = 'enter the full path of your hjson config file here', clut_filename = 'OPTIONAL, enter the full path of the csv file specifying unit colours', clut_file_legacy = True, verbose_level = VerboseLevel.ALL, #can set this to VerboseLevel.NONE if you don't wan't any feedback from the program tmp_path = "insert_output_folder_name_here", working_projection = "EPSG:code", bounding_box = bounding_box, loop_project_filename = os.path.join("insert_output_folder_name_here", "local_source.loop3d") ) ``` -------------------------------- ### Project.run_all Source: https://loop3d.org/map2loop/_sources/_autosummary/map2loop.project.Project.rst.txt Runs all processing steps. ```APIDOC ## Project.run_all ### Description Runs all processing steps. ### Method Method ### Signature Project.run_all(...) ### Parameters No parameters documented in the source. ``` -------------------------------- ### MapData.get_ignore_codes Source: https://loop3d.org/map2loop/_autosummary/map2loop.fault_orientation.MapData.html Gets the list of codes to ignore. ```APIDOC ## MapData.get_ignore_codes ### Description Get the list of codes to ignore. ### Returns - **list** - The list of strings to ignore ``` -------------------------------- ### MapData.get_filename Source: https://loop3d.org/map2loop/_autosummary/map2loop.fault_orientation.MapData.html Gets a filename of a specified datatype. ```APIDOC ## MapData.get_filename ### Description Get a filename of a specified datatype. ### Parameters - **datatype** (Datatype) - Required - The datatype of the filename wanted ### Returns - **string** - The filename of the datatype specified ``` -------------------------------- ### get_filename(datatype) Source: https://loop3d.org/map2loop/_autosummary/map2loop.project.MapData.html Gets a filename of a specified datatype. ```APIDOC ## get_filename(datatype) ### Description Get a filename of a specified datatype. ### Parameters - **datatype** – The datatype for which to get the filename ### Returns - **str** – The filename ``` -------------------------------- ### Project.__init__ Source: https://loop3d.org/map2loop/_autosummary/map2loop.Project.html The initialiser for the map2loop project. ```APIDOC ## Project.__init__ ### Description The initialiser for the map2loop project. ### Method Constructor ### Signature __init__(verbose_level, tmp_path, ...) ### Parameters - verbose_level (int) - Optional - Verbosity level - tmp_path (str) - Optional - Temporary path - ... - Additional parameters ### Returns Project instance ``` -------------------------------- ### Project.__init__ Source: https://loop3d.org/map2loop/_sources/_autosummary/map2loop.Project.rst.txt Constructor for the Project class. This method is listed in the Project class API documentation. ```APIDOC ## Project.__init__ ### Description Constructor for the Project class. ### Method `Project.__init__` ``` -------------------------------- ### Project.get_throw_calculator Source: https://loop3d.org/map2loop/_autosummary/map2loop.Project.html Get the name of the throw calculator being used. ```APIDOC ## Project.get_throw_calculator ### Description Get the name of the throw calculator being used. ### Method get_throw_calculator() ### Parameters None ### Returns - str - The name of the throw calculator used ``` -------------------------------- ### NormalVectorInterpolator.setup_interpolation Source: https://loop3d.org/map2loop/_sources/_autosummary/map2loop.interpolators.NormalVectorInterpolator.rst.txt Sets up the interpolation process. ```APIDOC ## NormalVectorInterpolator.setup_interpolation ### Description Sets up the interpolation process. ### Method setup_interpolation ### Signature NormalVectorInterpolator.setup_interpolation(...) ### Parameters No parameters are explicitly documented in the source. ### Returns No return value is explicitly documented in the source. ``` -------------------------------- ### Project.get_sampler Source: https://loop3d.org/map2loop/_autosummary/map2loop.Project.html Get the sampler name being used for a datatype. ```APIDOC ## Project.get_sampler ### Description Get the sampler name being used for a datatype. ### Method get_sampler(datatype: Datatype) ### Parameters - datatype (Datatype) - Required - The datatype of the sampler ### Returns - str - The name of the sampler being used on the specified datatype ``` -------------------------------- ### generate_grid(bounding_box, grid_resolution=None) Source: https://loop3d.org/map2loop/_autosummary/map2loop.interpolators.generate_grid.html Sets up the grid for interpolation. It takes a bounding box dictionary and an optional grid resolution, and returns the x and y coordinates of the grid points along with the grid resolution. ```APIDOC ## generate_grid(bounding_box, grid_resolution=None) ### Description Sets up the grid for interpolation. It takes a bounding box dictionary and an optional grid resolution, and returns the x and y coordinates of the grid points along with the grid resolution. ### Method Function ### Signature `map2loop.interpolators.generate_grid(bounding_box: dict, grid_resolution: int | None = None) -> tuple` ### Parameters - **bounding_box** (dict) - Required - A dictionary containing the bounding box of the map data. The dictionary should comply with the following format: { "minx": value, "maxx": value, "miny": value, "maxy": value } - **grid_resolution** (int, optional) - Optional - The number of grid points in the x and y directions. Defaults to None. ### Returns - **xi, yi** (numpy.ndarray, numpy.ndarray) - The x and y coordinates of the grid points. - **grid_resolution** (int) - The number of grid points in the x and y directions. ``` -------------------------------- ### SamplerDecimator.__init__() Source: https://loop3d.org/map2loop/_autosummary/map2loop.project.SamplerDecimator.html Initializer for the decimator sampler. Sets the decimation stride for sampling points. ```APIDOC ## SamplerDecimator.__init__() ### Description Initialiser for decimator sampler. Sets the stride of points to sample. ### Method Constructor ### Signature `__init__(decimation: int = 1)` ### Parameters - **decimation** (int, optional) - Stride of the points to sample. Defaults to 1. ### Returns None ``` -------------------------------- ### MapData.get_map_data Source: https://loop3d.org/map2loop/_autosummary/map2loop.fault_orientation.MapData.html Gets the data geopanda of the specified datatype. ```APIDOC ## MapData.get_map_data ### Description Get the data geopanda of the specified datatype. ### Parameters - **datatype** (Datatype) - Required - The datatype to retrieve ### Returns - **geopandas.GeoDataFrame** - The dataframe ``` -------------------------------- ### map2loop.Project.__init__ Source: https://loop3d.org/map2loop/_autosummary/map2loop.Project.html Initializes a new map2loop Project instance. Accepts numerous optional parameters to configure data sources, projection, bounding box, and processing options. ```APIDOC ## map2loop.Project.__init__ ### Description Initializes a new map2loop Project instance. Accepts numerous optional parameters to configure data sources, projection, bounding box, and processing options. ### Method Constructor ### Signature Project(verbose_level: VerboseLevel = VerboseLevel.ALL, tmp_path: str = 'm2l_data_tmp', working_projection=None, bounding_box=None, use_australian_state_data: str = '', geology_filename: str = '', structure_filename: str = '', fault_filename: str = '', fault_orientation_filename: str = '', fold_filename: str = '', dtm_filename: str = '', config_filename: Path | str = '', config_dictionary: dict = {}, clut_filename: Path | str = '', clut_file_legacy: bool = False, save_pre_checked_map_data: bool = False, loop_project_filename: str = '', overwrite_loopprojectfile: bool = False, **kwargs) ### Parameters - **verbose_level** (VerboseLevel) - Optional - How much console output is sent. Defaults to VerboseLevel.ALL. - **tmp_path** (str) - Optional - The directory for storing temporary files. Defaults to './m2l_data_tmp'. - **working_projection** (str or int) - Optional - The EPSG projection to use. Defaults to None. - **bounding_box** (list or dict) - Optional - The boundary extents of the project (m). Defaults to None. - **use_australian_state_data** (str) - Optional - Whether to use default state data and which state to use. Defaults to ''. - **geology_filename** (str) - Optional - The filename of the geology shapefile. Defaults to ''. - **structure_filename** (str) - Optional - The filename of the structure shapefile. Defaults to ''. - **fault_filename** (str) - Optional - The filename of the fault shapefile. Defaults to ''. - **fault_orientation_filename** (str) - Optional - The filename of the fault orientation shapefile. Defaults to ''. - **fold_filename** (str) - Optional - The filename of the fold shapefile. Defaults to ''. - **dtm_filename** (str) - Optional - The filename of the digital terrain map to use. Defaults to ''. - **config_filename** (Path or str) - Optional - The filename of the configuration json file to use (if not using config_dictionary). Defaults to ''. - **config_dictionary** (dict) - Optional - A dictionary version of the configuration file. Defaults to {}. - **clut_filename** (Path or str) - Optional - The filename of the colour look up table to use. Defaults to ''. - **clut_file_legacy** (bool) - Optional - A flag to indicate if the clut file is in the legacy format. Defaults to False. - **save_pre_checked_map_data** (bool) - Optional - A flag to save all map data to file before use. Defaults to False. - **loop_project_filename** (str) - Optional - The filename of the loop project file. Defaults to ''. - **overwrite_loopprojectfile** (bool) - Optional - Whether to overwrite the loop project file. Defaults to False. - **kwargs** - Optional - Additional keyword arguments. ### Raises - **TypeError** - If type of working_projection is not a str or int. - **ValueError** - If bounding_box is not length 4 or 6. - **TypeError** - If type of bounding_box is not a dict or tuple. - **ValueError** - If use_australian_state_data is not in state list ['WA', 'SA', 'QLD', 'NSW', 'TAS', 'VIC', 'ACT', 'NT']. ### Attributes - **verbose_level** (m2l_enums.VerboseLevel) - A selection that defines how much console logging is output. - **samplers** (Sampler) - A list of samplers used to extract point samples from polyonal or line segments. Indexed by m2l_enum.Dataype. - **sorter** (Sorter) - The sorting algorithm to use for calculating the stratigraphic column. - **thickness_calculator** (ThicknessCalulator) - The algorithm to use for making unit thickness estimations. - **loop_filename** (str) - The name of the loop project file used in this project. - **map_data** (MapData) - The structure that holds all map and dtm data. - **map2model** (Map2ModelWrapper) - A wrapper around the map2model module that extracts unit and fault adjacency. - **stratigraphic_column** (StratigraphicColumn) - The structure that holds the unit information and ordering. - **deformation_history** (DeformationHistory) - The structure that holds the fault and fold information and interactions. ``` -------------------------------- ### MapData.get_colour_filename Source: https://loop3d.org/map2loop/_autosummary/map2loop.fault_orientation.MapData.html Gets the colour lookup table filename. ```APIDOC ## MapData.get_colour_filename ### Description Get the colour lookup table filename. ### Returns - **str** - The colour lookup table filename ``` -------------------------------- ### DeformationHistory.get_minimum_fault_length() Source: https://loop3d.org/map2loop/_autosummary/map2loop.deformation_history.DeformationHistory.html Gets the minimum fault length for export. ```APIDOC ## DeformationHistory.get_minimum_fault_length() ### Description Gets the minimum fault length for export. ### Parameters Not specified in source. ### Returns Not specified in source. ``` -------------------------------- ### get_map_data(datatype) Source: https://loop3d.org/map2loop/_autosummary/map2loop.project.MapData.html Gets the data geopanda of the specified datatype. ```APIDOC ## get_map_data(datatype) ### Description Get the data geopanda of the specified datatype. ### Parameters - **datatype** – The datatype for which to get the map data ### Returns - **GeoDataFrame** – The map data ``` -------------------------------- ### NormalVectorInterpolator.setup_grid Source: https://loop3d.org/map2loop/_sources/_autosummary/map2loop.interpolators.NormalVectorInterpolator.rst.txt Sets up the grid for interpolation. ```APIDOC ## NormalVectorInterpolator.setup_grid ### Description Sets up the grid for interpolation. ### Method setup_grid ### Signature NormalVectorInterpolator.setup_grid(...) ### Parameters No parameters are explicitly documented in the source. ### Returns No return value is explicitly documented in the source. ``` -------------------------------- ### Initialize and Run Map2loop Project Source: https://loop3d.org/map2loop/_sources/index.rst.txt Initializes the Project object with the specified state, projection, and bounding box, then executes the processing workflow. ```python proj = Project(use_australian_state_data = "SA", working_projection = 'EPSG:28354', bounding_box = bbox_3d, loop_project_filename = "output.loop3d" ) proj.run_all() ``` -------------------------------- ### Project.get_fault_orientation Source: https://loop3d.org/map2loop/_autosummary/map2loop.Project.html Get the name of the fault orientation calculator being used. ```APIDOC ## Project.get_fault_orientation ### Description Get the name of the fault orientation calculator being used. ### Method get_fault_orientation() ### Parameters None ### Returns - str - The name of the fault orientation calculator used ``` -------------------------------- ### Configure and run the map2loop project Source: https://loop3d.org/map2loop/_sources/_auto_examples/plot_hamersley.rst.txt Defines the 3D bounding box, initializes the project with Western Australian state data, sets samplers and sorters, and executes the processing pipeline. ```Python bbox_3d = { "minx": 515687.31005864, "miny": 7493446.76593407, "maxx": 562666.860106543, "maxy": 7521273.57407786, "base": -3200, "top": 3000, } # Specify minimum details (which Australian state, projection and bounding box # and output file) loop_project_filename = "wa_output.loop3d" proj = Project( use_australian_state_data="WA", working_projection="EPSG:28350", bounding_box=bbox_3d, verbose_level=VerboseLevel.NONE, loop_project_filename=loop_project_filename, overwrite_loopprojectfile=True, ) # Set the distance between sample points for arial and linestring geometry proj.set_sampler(Datatype.GEOLOGY, SamplerSpacing(200.0)) proj.set_sampler(Datatype.FAULT, SamplerSpacing(200.0)) # Choose which stratigraphic sorter to use or run_all with "take_best" flag to run them all proj.set_sorter(SorterAlpha()) # proj.set_sorter(SorterAgeBased()) # proj.set_sorter(SorterUseHint()) # proj.set_sorter(SorterUseNetworkx()) # proj.set_sorter(SorterMaximiseContacts()) # proj.set_sorter(SorterObservationProjections()) proj.run_all(take_best=True) ``` ```none Datatype FAULT_ORIENTATION is not set and so cannot be loaded Best sorter SorterAgeBased calculated contact length of 286560.51738879026 Cannot calculate thickness between Fortescue_Group and Bunjinah_Formation Cannot calculate thickness between Bunjinah_Formation and Boolgeeda_Iron_Formation Cannot calculate thickness between Boolgeeda_Iron_Formation and Woongarra_Rhyolite Cannot calculate thickness between Woongarra_Rhyolite and Weeli_Wolli_Formation Cannot calculate thickness between Weeli_Wolli_Formation and Brockman_Iron_Formation Cannot calculate thickness between Wittenoom_Formation and Marra_Mamba_Iron_Formation Cannot calculate thickness between Marra_Mamba_Iron_Formation and Turee_Creek_Group ``` -------------------------------- ### MapData.get_value_from_raster Source: https://loop3d.org/map2loop/_autosummary/map2loop.fault_orientation.MapData.html Gets the value from a raster map at the specified point. ```APIDOC ## MapData.get_value_from_raster ### Description Get the value from a raster map at the specified point. ### Parameters - **datatype** (Datatype) - Required - The datatype of the raster map to retrieve from - **x** (float or int) - Required - The easting coordinate of the value - **y** (float or int) - Required - The northing coordinate of the value ### Returns - **float or int** - The value at the point specified ``` -------------------------------- ### MapData.get_raw_map_data Source: https://loop3d.org/map2loop/_autosummary/map2loop.fault_orientation.MapData.html Gets the raw data geopanda of the specified datatype. ```APIDOC ## MapData.get_raw_map_data ### Description Get the raw data geopanda of the specified datatype. ### Parameters - **datatype** (Datatype) - Required - The datatype to retrieve ### Returns - **geopandas.GeoDataFrame** - The raw data ``` -------------------------------- ### Project.run_all Source: https://loop3d.org/map2loop/_autosummary/map2loop.Project.html Runs the full map2loop process. ```APIDOC ## Project.run_all ### Description Runs the full map2loop process. ### Method run_all(user_defined_stratigraphic_column=None, take_best=False) ### Parameters - user_defined_stratigraphic_column (None or list) - Optional - A user fed list that overrides the stratigraphic column sorter. Defaults to None. - take_best (bool) - Optional - Whether to take the best result. Defaults to False. ### Returns None ``` -------------------------------- ### MapData.get_bounding_box Source: https://loop3d.org/map2loop/_autosummary/map2loop.fault_orientation.MapData.html Gets the bounding box in dict or polygon form. ```APIDOC ## MapData.get_bounding_box ### Description Get the bounding box in dict or polygon form. ### Parameters - **polygon** (bool, optional) - Optional - Flag to get the bounding box in polygon form. Defaults to False. ### Returns - **dict or shapely.Polygon** - The bounding box in the requested form ``` -------------------------------- ### ABC.__init__ Source: https://loop3d.org/map2loop/_sources/_autosummary/map2loop.fault_orientation.ABC.rst.txt Constructor for the ABC class. Initializes a new instance of the ABC class. ```APIDOC ## ABC.__init__ ### Description Initializes a new instance of the ABC class. ### Method Constructor ### Signature `__init__(self, ...)` ### Parameters No parameters are documented in the source. ### Returns No return value is documented. ``` -------------------------------- ### ndarray.data Source: https://loop3d.org/map2loop/_autosummary/map2loop.interpolators.ndarray.html Python buffer object pointing to the start of the array's data. ```APIDOC ## ndarray.data ### Description Python buffer object pointing to the start of the array's data. ### Returns - **buffer** - Python buffer object pointing to the start of the array's data. ``` -------------------------------- ### get_value_from_raster(datatype, x, y) Source: https://loop3d.org/map2loop/_autosummary/map2loop.project.MapData.html Gets the value from a raster map at the specified point. ```APIDOC ## get_value_from_raster(datatype, x, y) ### Description Get the value from a raster map at the specified point. ### Parameters - **datatype** – The datatype of the raster map - **x** – The x coordinate - **y** – The y coordinate ### Returns - **value** – The value from the raster at the point ``` -------------------------------- ### MapData.__init__ Source: https://loop3d.org/map2loop/_autosummary/map2loop.fault_orientation.MapData.html Initializes a new MapData instance with the given temporary file path and verbosity level. ```APIDOC ## MapData.__init__ ### Description Initializes a new MapData instance with the given temporary file path and verbosity level. ### Method Constructor ### Signature __init__(tmp_path: str = '', verbose_level: VerboseLevel = VerboseLevel.ALL) ### Parameters - **tmp_path** (str, optional) - The directory for storing temporary files. Defaults to ''. - **verbose_level** (VerboseLevel, optional) - How much console output is sent. Defaults to VerboseLevel.ALL. ### Returns None ``` -------------------------------- ### SorterAlpha.type Source: https://loop3d.org/map2loop/_sources/_autosummary/map2loop.sorter.SorterAlpha.rst.txt Method to get the type of the sorter. The exact behavior and parameters are not detailed in the source. ```APIDOC ## SorterAlpha.type ### Description Returns the type of the sorter. The specific implementation is not documented in the source. ### Method Method ### Signature SorterAlpha.type() ### Parameters None documented. ### Returns None documented. ``` -------------------------------- ### InterpolatedStructure.__init__() Source: https://loop3d.org/map2loop/_autosummary/map2loop.thickness_calculator.InterpolatedStructure.html Initialiser for the interpolated structure version of the thickness calculator. ```APIDOC ## InterpolatedStructure.__init__() ### Description Initialiser for interpolated structure version of the thickness calculator. ### Method Constructor ### Signature __init__() ### Parameters None ### Returns None ```