{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# 25 Creating Orientations from Isolines on Maps\n", "\n", "Orientations can be calculated from LineStrings representing the highest gradient between two or more isolines of a surface. \n", "\n", "\n", "\n", "\n", "Source: Geologie im Münsterland (1995) by Günter Drozdzewski, Martin Hiss, Franziska Lehmann, Gert Michel, Klaus Skupin, Henner Staude, Arend Thiermann, Hildegard Dahm-Arens, Walter Finke. " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Set File Paths and download Tutorial Data\n", "\n", "If you downloaded the latest `GemGIS` version from the Github repository, append the path so that the package can be imported successfully. Otherwise, it is recommended to install `GemGIS` via `pip install gemgis` and import `GemGIS` using `import gemgis as gg`. In addition, the file path to the folder where the data is being stored is set. The tutorial data is downloaded using Pooch (https://www.fatiando.org/pooch/latest/index.html) and stored in the specified folder. Use `pip install pooch` if Pooch is not installed on your system yet." ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "ExecuteTime": { "end_time": "2021-03-17T11:21:22.388660Z", "start_time": "2021-03-17T11:21:20.247380Z" } }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "WARNING (theano.configdefaults): g++ not available, if using conda: `conda install m2w64-toolchain`\n", "C:\\Users\\ale93371\\Anaconda3\\envs\\test_gempy\\lib\\site-packages\\theano\\configdefaults.py:560: UserWarning: DeprecationWarning: there is no c++ compiler.This is deprecated and with Theano 0.11 a c++ compiler will be mandatory\n", " warnings.warn(\"DeprecationWarning: there is no c++ compiler.\"\n", "WARNING (theano.configdefaults): g++ not detected ! Theano will be unable to execute optimized C-implementations (for both CPU and GPU) and will default to Python implementations. Performance will be severely degraded. To remove this warning, set Theano flags cxx to an empty string.\n", "WARNING (theano.tensor.blas): Using NumPy C-API based implementation for BLAS functions.\n" ] } ], "source": [ "import gemgis as gg\n", "\n", "file_path ='data/25_creating_orientations_from_isolines_on_maps/'" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "ExecuteTime": { "end_time": "2021-03-17T11:21:22.467635Z", "start_time": "2021-03-17T11:21:22.421668Z" } }, "outputs": [], "source": [ "gg.download_gemgis_data.download_tutorial_data(filename=\"25_creating_orientations_from_isolines_on_maps.zip\", dirpath=file_path)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Loading data\n", "\n", "The data used here represents the base of the Münsterland Basin in northern Germany. \n", "\n", "The map was extracted from 'Geologie im Münsterland' (1995) by Günter Drozdzewski, Martin Hiss, Franziska Lehmann, Gert Michel, Klaus Skupin, Henner Staude, Arend Thiermann, Hildegard Dahm-Arens, Walter Finke. The orientation values were digitized in QGIS.\n" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "ExecuteTime": { "end_time": "2020-12-21T18:46:23.775029Z", "start_time": "2020-12-21T18:46:17.284449Z" } }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "WARNING (theano.configdefaults): g++ not available, if using conda: `conda install m2w64-toolchain`\n", "C:\\Users\\ale93371\\Anaconda3\\envs\\test_gempy\\lib\\site-packages\\theano\\configdefaults.py:560: UserWarning: DeprecationWarning: there is no c++ compiler.This is deprecated and with Theano 0.11 a c++ compiler will be mandatory\n", " warnings.warn(\"DeprecationWarning: there is no c++ compiler.\"\n", "WARNING (theano.configdefaults): g++ not detected ! Theano will be unable to execute optimized C-implementations (for both CPU and GPU) and will default to Python implementations. Performance will be severely degraded. To remove this warning, set Theano flags cxx to an empty string.\n", "WARNING (theano.tensor.blas): Using NumPy C-API based implementation for BLAS functions.\n" ] } ], "source": [ "import rasterio\n", "import geopandas as gpd\n", "\n", "raster = rasterio.open(file_path + 'Tiefenlage_BasisKreide_georeferenziert.tif')" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "ExecuteTime": { "end_time": "2020-12-21T18:46:23.980678Z", "start_time": "2020-12-21T18:46:23.786036Z" } }, "outputs": [ { "data": { "text/html": [ "
\n", " | id | \n", "dZ | \n", "geometry | \n", "
---|---|---|---|
0 | \n", "None | \n", "500 | \n", "LINESTRING (32478299.585 5717761.236, 32474124... | \n", "
1 | \n", "None | \n", "500 | \n", "LINESTRING (32468027.985 5716203.394, 32465662... | \n", "
2 | \n", "None | \n", "500 | \n", "LINESTRING (32457110.971 5715004.084, 32454603... | \n", "
3 | \n", "None | \n", "250 | \n", "LINESTRING (32449009.343 5713465.851, 32447984... | \n", "
4 | \n", "None | \n", "250 | \n", "LINESTRING (32439984.702 5719017.270, 32440531... | \n", "
\n", " | geometry | \n", "azimuth | \n", "dip | \n", "X | \n", "Y | \n", "polarity | \n", "
---|---|---|---|---|---|---|
0 | \n", "POINT (32476212.059 5723406.886) | \n", "339.71 | \n", "2.38 | \n", "32476212.06 | \n", "5723406.89 | \n", "1 | \n", "
1 | \n", "POINT (32466845.216 5721529.592) | \n", "347.48 | \n", "2.62 | \n", "32466845.22 | \n", "5721529.59 | \n", "1 | \n", "
2 | \n", "POINT (32455857.358 5719760.010) | \n", "345.23 | \n", "2.91 | \n", "32455857.36 | \n", "5719760.01 | \n", "1 | \n", "
3 | \n", "POINT (32448496.843 5716069.354) | \n", "348.86 | \n", "2.70 | \n", "32448496.84 | \n", "5716069.35 | \n", "1 | \n", "
4 | \n", "POINT (32440258.151 5721545.726) | \n", "6.17 | \n", "2.81 | \n", "32440258.15 | \n", "5721545.73 | \n", "1 | \n", "
... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "
201 | \n", "POINT (32397115.154 5766347.158) | \n", "337.75 | \n", "5.77 | \n", "32397115.15 | \n", "5766347.16 | \n", "1 | \n", "
202 | \n", "POINT (32401900.665 5768063.700) | \n", "21.43 | \n", "3.24 | \n", "32401900.67 | \n", "5768063.70 | \n", "1 | \n", "
203 | \n", "POINT (32406348.070 5764968.723) | \n", "52.21 | \n", "2.44 | \n", "32406348.07 | \n", "5764968.72 | \n", "1 | \n", "
204 | \n", "POINT (32397999.433 5753733.174) | \n", "271.12 | \n", "1.79 | \n", "32397999.43 | \n", "5753733.17 | \n", "1 | \n", "
205 | \n", "POINT (32377335.907 5782940.399) | \n", "105.95 | \n", "7.91 | \n", "32377335.91 | \n", "5782940.40 | \n", "1 | \n", "
206 rows × 6 columns
\n", "