Skip to content

Commit f7a7784

Browse files
Edits
1 parent 5beb306 commit f7a7784

File tree

6 files changed

+64
-23
lines changed

6 files changed

+64
-23
lines changed

docs/getting_started/tutorial/65_displaying_seismic_horizons_and_faults.ipynb

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2211,6 +2211,7 @@
22112211
}
22122212
],
22132213
"metadata": {
2214+
"hide_input": false,
22142215
"kernelspec": {
22152216
"display_name": "Python 3 (ipykernel)",
22162217
"language": "python",
@@ -2226,7 +2227,36 @@
22262227
"name": "python",
22272228
"nbconvert_exporter": "python",
22282229
"pygments_lexer": "ipython3",
2229-
"version": "3.10.11"
2230+
"version": "3.8.5"
2231+
},
2232+
"varInspector": {
2233+
"cols": {
2234+
"lenName": 16,
2235+
"lenType": 16,
2236+
"lenVar": 40
2237+
},
2238+
"kernels_config": {
2239+
"python": {
2240+
"delete_cmd_postfix": "",
2241+
"delete_cmd_prefix": "del ",
2242+
"library": "var_list.py",
2243+
"varRefreshCmd": "print(var_dic_list())"
2244+
},
2245+
"r": {
2246+
"delete_cmd_postfix": ") ",
2247+
"delete_cmd_prefix": "rm(",
2248+
"library": "var_list.r",
2249+
"varRefreshCmd": "cat(var_dic_list()) "
2250+
}
2251+
},
2252+
"types_to_exclude": [
2253+
"module",
2254+
"function",
2255+
"builtin_function_or_method",
2256+
"instance",
2257+
"_Feature"
2258+
],
2259+
"window_display": false
22302260
}
22312261
},
22322262
"nbformat": 4,

environment_dev.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,4 @@ dependencies:
4343
- sphinx_automodapi
4444
- sphinx_numfig
4545
- numpydoc
46+
- build

gemgis/download_gemgis_data.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,17 @@ def create_pooch(storage_url: str,
3535
Base URL for the remote data source.
3636
files : List[str]
3737
A record of the files that are managed by this Pooch.
38-
target : str, default: ''
38+
target : str, default: ``''``
3939
The path to the local data storage folder, e.g. ``target='Documents/gemgis/'``.
4040
4141
Returns
4242
_______
4343
pooch.core.Pooch
4444
Pooch class.
45+
46+
See also
47+
________
48+
download_tutorial_data: Download the GemGIS data for each tutorial.
4549
"""
4650
try:
4751
import pooch
@@ -67,11 +71,15 @@ def download_tutorial_data(filename: str,
6771
__________
6872
filename : str
6973
File name to be downloaded by pooch, e.g. ``filename='file.zip'``.
70-
dirpath : str, default: ''
74+
dirpath : str, default: ``''``
7175
Path to the directory where the data is being stored, default to the directory where the notebook is
7276
located, e.g. ``dirpath='Documents/gemgis/'``.
7377
storage_url : str, default 'https://rwth-aachen.sciebo.de/s/AfXRsZywYDbUF34/download?path=%2F'
7478
URL to the GemGIS data storage, default is the RWTH Aachen University Sciebo Cloud Storage.
79+
80+
See also
81+
________
82+
create_pooch : Create pooch class to fetch files from a website.
7583
"""
7684
try:
7785
import pooch

gemgis/misc.py

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Contributors: Alexander Jüstel, Arthur Endlein Correia, Florian Wellmann, Marius Pischke
2+
Contributors: Alexander Jüstel, Arthur Endlein Correia, Florian Wellmann, Marius Pischke.
33
44
GemGIS is a Python-based, open-source spatial data processing library.
55
It is capable of preprocessing spatial data such as vector data
@@ -33,23 +33,21 @@
3333

3434
def load_pdf(path: str,
3535
save_as_txt: bool = True) -> str:
36-
"""Function to load pdf containing borehole data
36+
"""
37+
Load PDF file containing borehole data.
3738
3839
Parameters
3940
__________
40-
4141
path : str
42-
Name of the PDF file, e.g. ``path='file.pdf'``
43-
44-
save_as_txt : bool
42+
Name of the PDF file, e.g. ``path='file.pdf'``.
43+
save_as_txt : bool, default: ``True``
4544
Variable to save the extracted data as txt file.
46-
Options include: ``True`` or ``False``, default set to ``True``
45+
Options include: ``True`` or ``False``.
4746
4847
Returns
4948
_______
50-
51-
page_content : str
52-
Extracted page content from borehole data
49+
str
50+
Extracted page content from borehole data.
5351
5452
.. versionadded:: 1.0.x
5553
@@ -66,14 +64,11 @@ def load_pdf(path: str,
6664
6765
See Also
6866
________
69-
70-
get_meta_data : Getting the meta data of a well
71-
get_meta_data_df : Getting the meta data of wells as DataFrame
72-
get_stratigraphic_data : Getting the stratigraphic data of a well
73-
get_stratigraphic_data_df : Getting the stratigraphic data of wells as DataFrame
74-
67+
get_meta_data : Get the meta data of a well.
68+
get_meta_data_df : Get the meta data of wells as DataFrame.
69+
get_stratigraphic_data : Get the stratigraphic data of a well.
70+
get_stratigraphic_data_df : Get the stratigraphic data of wells as DataFrame.
7571
"""
76-
7772
# Trying to import PyPDF2 but returning error if tqdm is not installed
7873
try:
7974
import PyPDF2

gemgis/raster.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2716,7 +2716,8 @@ def extract_contour_lines_from_raster(raster: Union[rasterio.io.DatasetReader, n
27162716
def read_raster_gdb(path: str,
27172717
crs: Union[str,
27182718
pyproj.crs.crs.CRS,
2719-
rasterio.crs.CRS] = None):
2719+
rasterio.crs.CRS] = None,
2720+
path_out: str = ''):
27202721
"""Read Raster from OpenFileGDB.
27212722
27222723
Parameters
@@ -2725,6 +2726,8 @@ def read_raster_gdb(path: str,
27252726
Path to the OpenFileGDB.
27262727
crs : str, pyproj.crs.crs.CRS, rasterio.crs.CRS
27272728
Coordinate Reference System of the dataset.
2729+
path_out : str
2730+
Output folder path
27282731
27292732
.. versionadded:: 1.1.1
27302733
@@ -2739,6 +2742,10 @@ def read_raster_gdb(path: str,
27392742
if not isinstance(path, str):
27402743
raise TypeError('Path to the OpenFileGDB must be provided as string')
27412744

2745+
# Checking that the output path is of type string
2746+
if not isinstance(path_out, str):
2747+
raise TypeError('Output path must be provided as string')
2748+
27422749
# Opening Database
27432750
ds = gdal.Open(path)
27442751

@@ -2768,7 +2775,7 @@ def read_raster_gdb(path: str,
27682775

27692776
# Saving raster to file
27702777
with rasterio.open(
2771-
ds.GetSubDatasets()[i][1].replace(' ', '') + '.tif',
2778+
path_out + ds.GetSubDatasets()[i][1].replace(' ', '') + '.tif',
27722779
'w',
27732780
driver='GTiff',
27742781
height=raster.shape[0],

gemgis/vector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,7 @@ def extract_xy(gdf: gpd.geodataframe.GeoDataFrame,
623623
624624
.. versionchanged:: 1.1
625625
If a GeoDataFrame contains LineStrings and MultiLineStrings, the index of the exploded GeoDataFrame will now
626-
be reset. Not resetting the index will cause index errors later on.
626+
be reset. Not resetting the index will cause index errors later on.
627627
628628
Example
629629
_______

0 commit comments

Comments
 (0)