pylineament 0.1.1__tar.gz → 0.1.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pylineament-0.1.2/LICENSE +21 -0
- pylineament-0.1.2/PKG-INFO +143 -0
- pylineament-0.1.2/README.md +101 -0
- {pylineament-0.1.1 → pylineament-0.1.2}/pylineament/pylineament.py +3 -3
- {pylineament-0.1.1 → pylineament-0.1.2}/pylineament/pylineament_ui.py +4 -31
- pylineament-0.1.2/pylineament.egg-info/PKG-INFO +143 -0
- {pylineament-0.1.1 → pylineament-0.1.2}/pylineament.egg-info/SOURCES.txt +1 -0
- {pylineament-0.1.1 → pylineament-0.1.2}/pyproject.toml +2 -1
- pylineament-0.1.1/PKG-INFO +0 -39
- pylineament-0.1.1/README.md +0 -0
- pylineament-0.1.1/pylineament.egg-info/PKG-INFO +0 -39
- {pylineament-0.1.1 → pylineament-0.1.2}/pylineament/__init__.py +0 -0
- {pylineament-0.1.1 → pylineament-0.1.2}/pylineament.egg-info/dependency_links.txt +0 -0
- {pylineament-0.1.1 → pylineament-0.1.2}/pylineament.egg-info/entry_points.txt +0 -0
- {pylineament-0.1.1 → pylineament-0.1.2}/pylineament.egg-info/requires.txt +0 -0
- {pylineament-0.1.1 → pylineament-0.1.2}/pylineament.egg-info/top_level.txt +0 -0
- {pylineament-0.1.1 → pylineament-0.1.2}/setup.cfg +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 epokus
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pylineament
|
|
3
|
+
Version: 0.1.2
|
|
4
|
+
Summary: Python Geological Lineament extraction package
|
|
5
|
+
Author-email: Epo Kusumah <epo.pk@universiaspertamina.ac.id>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/epokus/pylineament
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Requires-Dist: affine==2.4.0
|
|
11
|
+
Requires-Dist: attrs==25.4.0
|
|
12
|
+
Requires-Dist: certifi==2025.10.5
|
|
13
|
+
Requires-Dist: click==8.3.0
|
|
14
|
+
Requires-Dist: click-plugins==1.1.1.2
|
|
15
|
+
Requires-Dist: cligj==0.7.2
|
|
16
|
+
Requires-Dist: colorama==0.4.6
|
|
17
|
+
Requires-Dist: fiona==1.10.1
|
|
18
|
+
Requires-Dist: imageio==2.37.0
|
|
19
|
+
Requires-Dist: joblib==1.5.2
|
|
20
|
+
Requires-Dist: lazy_loader==0.4
|
|
21
|
+
Requires-Dist: networkx==3.4.2
|
|
22
|
+
Requires-Dist: numpy==2.2.6
|
|
23
|
+
Requires-Dist: packaging==25.0
|
|
24
|
+
Requires-Dist: pandas==2.3.3
|
|
25
|
+
Requires-Dist: pillow==12.0.0
|
|
26
|
+
Requires-Dist: pyparsing==3.2.5
|
|
27
|
+
Requires-Dist: PyQt5==5.15.11
|
|
28
|
+
Requires-Dist: PyQt5-Qt5==5.15.2
|
|
29
|
+
Requires-Dist: PyQt5_sip==12.17.1
|
|
30
|
+
Requires-Dist: pyqtgraph==0.13.7
|
|
31
|
+
Requires-Dist: python-dateutil==2.9.0.post0
|
|
32
|
+
Requires-Dist: pytz==2025.2
|
|
33
|
+
Requires-Dist: rasterio==1.4.3
|
|
34
|
+
Requires-Dist: scikit-image==0.25.2
|
|
35
|
+
Requires-Dist: scikit-learn==1.7.2
|
|
36
|
+
Requires-Dist: scipy==1.15.3
|
|
37
|
+
Requires-Dist: six==1.17.0
|
|
38
|
+
Requires-Dist: threadpoolctl==3.6.0
|
|
39
|
+
Requires-Dist: tifffile==2025.5.10
|
|
40
|
+
Requires-Dist: tzdata==2025.2
|
|
41
|
+
Dynamic: license-file
|
|
42
|
+
|
|
43
|
+
# PyLineament
|
|
44
|
+
|
|
45
|
+
**PyLineament** is a Python-based, open-source toolkit for **automatic and regional-scale lineament extraction** from Digital Elevation Models (DEMs) and remote sensing imagery.
|
|
46
|
+
|
|
47
|
+
It is designed for geological and geomorphological analysis — providing a **fully automated, reproducible**, and **scalable** workflow for extracting, reducing, and mapping lineaments across local to regional scales.
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Installation
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
pip install pylineament
|
|
55
|
+
```
|
|
56
|
+
Or from source:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
git clone https://github.com/epokus/pylineament.git
|
|
60
|
+
cd pylineament
|
|
61
|
+
pip install -e .
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Quick Start (Command Line)
|
|
65
|
+
|
|
66
|
+
Once installed, simply open your terminal or command prompt and run:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
pylineament
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Key Features
|
|
73
|
+
- Interactive UI — Run `pylineament` in the terminal to open the GUI.
|
|
74
|
+
- Automated Workflow — Full end-to-end lineament extraction.
|
|
75
|
+
- Customizable Parameters — Control edge detection thresholds, segment length, and merging distance.
|
|
76
|
+
- Multi-Resolution Support — Works with various DEM/image resolutions.
|
|
77
|
+
- Scalable — Efficient for large-area or regional-scale mapping.
|
|
78
|
+
- Reproducible — Transparent parameters and open-source implementation.
|
|
79
|
+
|
|
80
|
+
## Core Functions
|
|
81
|
+
| Function | Description |
|
|
82
|
+
| ---------------------------- | ------------------------------------------------------------ |
|
|
83
|
+
| `read_raster()` | Reads and preprocesses a raster (DEM or image). |
|
|
84
|
+
| `extract_lineament_points()` | Detects lineament-like edge points using gradient filters. |
|
|
85
|
+
| `convert_points_to_line()` | Converts clustered edge points into connected line segments. |
|
|
86
|
+
| `reduce_lines()` | Simplifies and merges overlapping or redundant lineaments. |
|
|
87
|
+
| `hillshade()` | Generates a hillshade image for visualization. |
|
|
88
|
+
| `dem_to_line()` | Extracts lineaments directly from a DEM file. |
|
|
89
|
+
| `dem_to_shp()` | Full workflow: extract + merge + export to shapefile. |
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
## Example Workflow
|
|
93
|
+
- Input your DEM or satellite image.
|
|
94
|
+
- Optionally apply hillshade() or downscale for efficiency.
|
|
95
|
+
- Extract edge points using extract_lineament_points().
|
|
96
|
+
- Convert points to lines and merge them with reduce_lines().
|
|
97
|
+
- Save as shapefile using dem_to_shp() or merge_lines_csv_to_shp().
|
|
98
|
+
|
|
99
|
+
## example how to use this Library with CLI or python
|
|
100
|
+
|
|
101
|
+
```python
|
|
102
|
+
from pylineament import dem_to_shp
|
|
103
|
+
dem_to_shp("data/srtm_sample.tif", shp_name= "lineamentsExtract")
|
|
104
|
+
```
|
|
105
|
+
shp file will be saved in "lineamentsExtract" folder.
|
|
106
|
+
see more examples in example folder
|
|
107
|
+

|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
## Parameters Overview
|
|
111
|
+
| Parameter | Description | Typical Range |
|
|
112
|
+
| ------------ | ------------------------------------- | ----------------- |
|
|
113
|
+
| `eps` | Edge detection sensitivity | 0.8 – 2.0 |
|
|
114
|
+
| `thresh` | Edge detection threshold | 20 – 80 |
|
|
115
|
+
| `z_multip` | Vertical exaggeration factor | 0.5 – 2.0 |
|
|
116
|
+
| `min_dist` | Minimum distance between merged lines | 5 – 20 pixels |
|
|
117
|
+
| `seg_len` | Minimum segment length | 5 – 20 pixels |
|
|
118
|
+
| `split_size` | DEM/image tile size for processing | 250 – 1000 pixels |
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
## Why PyLineament?
|
|
123
|
+
Typical “automatic” lineament extraction tools are limited by:
|
|
124
|
+
- Fixed image resolution and poor scalability,
|
|
125
|
+
- Heavy preprocessing requirements,
|
|
126
|
+
- Loss of geological meaning across scales,
|
|
127
|
+
- Slow performance in large regions.
|
|
128
|
+
|
|
129
|
+
## PyLineament addresses these by providing:
|
|
130
|
+
- Automated but parameter-controllable extraction,
|
|
131
|
+
- Multi-resolution and downscaling support,
|
|
132
|
+
- Robust reduction and merging algorithms,
|
|
133
|
+
- Compatibility with both small-area (detailed) and large-area datasets (regional mapping).
|
|
134
|
+
|
|
135
|
+
## Citation
|
|
136
|
+
If you use PyLineament in your research, please cite:
|
|
137
|
+
Prasetya Kusumah, E. (2025). PyLineament: A Python Toolkit for Regional-Scale Lineament Extraction.
|
|
138
|
+
Version 1.0. https://github.com/epokus/pylineament
|
|
139
|
+
|
|
140
|
+
## License
|
|
141
|
+
This project is licensed under the MIT License — see the LICENSE
|
|
142
|
+
file for details.
|
|
143
|
+
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# PyLineament
|
|
2
|
+
|
|
3
|
+
**PyLineament** is a Python-based, open-source toolkit for **automatic and regional-scale lineament extraction** from Digital Elevation Models (DEMs) and remote sensing imagery.
|
|
4
|
+
|
|
5
|
+
It is designed for geological and geomorphological analysis — providing a **fully automated, reproducible**, and **scalable** workflow for extracting, reducing, and mapping lineaments across local to regional scales.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
pip install pylineament
|
|
13
|
+
```
|
|
14
|
+
Or from source:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
git clone https://github.com/epokus/pylineament.git
|
|
18
|
+
cd pylineament
|
|
19
|
+
pip install -e .
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Quick Start (Command Line)
|
|
23
|
+
|
|
24
|
+
Once installed, simply open your terminal or command prompt and run:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
pylineament
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Key Features
|
|
31
|
+
- Interactive UI — Run `pylineament` in the terminal to open the GUI.
|
|
32
|
+
- Automated Workflow — Full end-to-end lineament extraction.
|
|
33
|
+
- Customizable Parameters — Control edge detection thresholds, segment length, and merging distance.
|
|
34
|
+
- Multi-Resolution Support — Works with various DEM/image resolutions.
|
|
35
|
+
- Scalable — Efficient for large-area or regional-scale mapping.
|
|
36
|
+
- Reproducible — Transparent parameters and open-source implementation.
|
|
37
|
+
|
|
38
|
+
## Core Functions
|
|
39
|
+
| Function | Description |
|
|
40
|
+
| ---------------------------- | ------------------------------------------------------------ |
|
|
41
|
+
| `read_raster()` | Reads and preprocesses a raster (DEM or image). |
|
|
42
|
+
| `extract_lineament_points()` | Detects lineament-like edge points using gradient filters. |
|
|
43
|
+
| `convert_points_to_line()` | Converts clustered edge points into connected line segments. |
|
|
44
|
+
| `reduce_lines()` | Simplifies and merges overlapping or redundant lineaments. |
|
|
45
|
+
| `hillshade()` | Generates a hillshade image for visualization. |
|
|
46
|
+
| `dem_to_line()` | Extracts lineaments directly from a DEM file. |
|
|
47
|
+
| `dem_to_shp()` | Full workflow: extract + merge + export to shapefile. |
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
## Example Workflow
|
|
51
|
+
- Input your DEM or satellite image.
|
|
52
|
+
- Optionally apply hillshade() or downscale for efficiency.
|
|
53
|
+
- Extract edge points using extract_lineament_points().
|
|
54
|
+
- Convert points to lines and merge them with reduce_lines().
|
|
55
|
+
- Save as shapefile using dem_to_shp() or merge_lines_csv_to_shp().
|
|
56
|
+
|
|
57
|
+
## example how to use this Library with CLI or python
|
|
58
|
+
|
|
59
|
+
```python
|
|
60
|
+
from pylineament import dem_to_shp
|
|
61
|
+
dem_to_shp("data/srtm_sample.tif", shp_name= "lineamentsExtract")
|
|
62
|
+
```
|
|
63
|
+
shp file will be saved in "lineamentsExtract" folder.
|
|
64
|
+
see more examples in example folder
|
|
65
|
+

|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
## Parameters Overview
|
|
69
|
+
| Parameter | Description | Typical Range |
|
|
70
|
+
| ------------ | ------------------------------------- | ----------------- |
|
|
71
|
+
| `eps` | Edge detection sensitivity | 0.8 – 2.0 |
|
|
72
|
+
| `thresh` | Edge detection threshold | 20 – 80 |
|
|
73
|
+
| `z_multip` | Vertical exaggeration factor | 0.5 – 2.0 |
|
|
74
|
+
| `min_dist` | Minimum distance between merged lines | 5 – 20 pixels |
|
|
75
|
+
| `seg_len` | Minimum segment length | 5 – 20 pixels |
|
|
76
|
+
| `split_size` | DEM/image tile size for processing | 250 – 1000 pixels |
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
## Why PyLineament?
|
|
81
|
+
Typical “automatic” lineament extraction tools are limited by:
|
|
82
|
+
- Fixed image resolution and poor scalability,
|
|
83
|
+
- Heavy preprocessing requirements,
|
|
84
|
+
- Loss of geological meaning across scales,
|
|
85
|
+
- Slow performance in large regions.
|
|
86
|
+
|
|
87
|
+
## PyLineament addresses these by providing:
|
|
88
|
+
- Automated but parameter-controllable extraction,
|
|
89
|
+
- Multi-resolution and downscaling support,
|
|
90
|
+
- Robust reduction and merging algorithms,
|
|
91
|
+
- Compatibility with both small-area (detailed) and large-area datasets (regional mapping).
|
|
92
|
+
|
|
93
|
+
## Citation
|
|
94
|
+
If you use PyLineament in your research, please cite:
|
|
95
|
+
Prasetya Kusumah, E. (2025). PyLineament: A Python Toolkit for Regional-Scale Lineament Extraction.
|
|
96
|
+
Version 1.0. https://github.com/epokus/pylineament
|
|
97
|
+
|
|
98
|
+
## License
|
|
99
|
+
This project is licensed under the MIT License — see the LICENSE
|
|
100
|
+
file for details.
|
|
101
|
+
|
|
@@ -764,8 +764,8 @@ def dem_to_shp(im_path,
|
|
|
764
764
|
downscale = 1,
|
|
765
765
|
shp_name = None,
|
|
766
766
|
save_to_file=True,
|
|
767
|
-
|
|
768
|
-
|
|
767
|
+
|
|
768
|
+
keep_intermediate_file = False):
|
|
769
769
|
"""
|
|
770
770
|
Extract lineaments from a (large) DEM and export results as a shapefile.
|
|
771
771
|
This will involve image splitting, and the use of parallel computing to achieve calculation efficiency.
|
|
@@ -829,7 +829,7 @@ def dem_to_shp(im_path,
|
|
|
829
829
|
[True]*len(flist))).values
|
|
830
830
|
|
|
831
831
|
from joblib import Parallel, delayed
|
|
832
|
-
Parallel(n_jobs
|
|
832
|
+
Parallel(n_jobs=-1)(delayed(dem_to_line)(*c) for c in cases)
|
|
833
833
|
|
|
834
834
|
fname = im_path.split('\\')[-1].split('.')[0]
|
|
835
835
|
csv_name = f'{tempfolder}\\{fname}.csv'
|
|
@@ -13,8 +13,7 @@ from PyQt5.QtWidgets import (QApplication,
|
|
|
13
13
|
QLabel,
|
|
14
14
|
QComboBox,
|
|
15
15
|
QCheckBox,
|
|
16
|
-
QSplitter
|
|
17
|
-
QMessageBox )
|
|
16
|
+
QSplitter )
|
|
18
17
|
|
|
19
18
|
from PyQt5.QtCore import QThreadPool, QRunnable
|
|
20
19
|
|
|
@@ -100,8 +99,6 @@ class MainWindow(QMainWindow):
|
|
|
100
99
|
self.previewRegen.clicked.connect(self.previewRegenActionAndSmallCalc)
|
|
101
100
|
self.extractButon.clicked.connect(self.extractLineamentAction)
|
|
102
101
|
|
|
103
|
-
self.aboutButton.clicked.connect(self.aboutAction)
|
|
104
|
-
|
|
105
102
|
self.previewImageOverlaySelector.currentIndexChanged.connect(self.previewRegenAction)
|
|
106
103
|
self.previewRegionSelector.currentIndexChanged.connect(self.previewRegenAction)
|
|
107
104
|
self.hillshadeAngleSelector.currentIndexChanged.connect(self.previewRegenAction)
|
|
@@ -151,9 +148,6 @@ class MainWindow(QMainWindow):
|
|
|
151
148
|
|
|
152
149
|
self.resetButton = QPushButton('Reset to Default')
|
|
153
150
|
self.previewRegen = QPushButton('Regenerate Preview')
|
|
154
|
-
self.aboutButton = QPushButton('?')
|
|
155
|
-
self.aboutButton.setMaximumWidth(20)
|
|
156
|
-
|
|
157
151
|
self.extractButon = QPushButton('Extract Lineament')
|
|
158
152
|
|
|
159
153
|
self.subsetSideSlider, subsetSideLabel, subsetSideLayout = self.add_slider("Image Subset size", 500, 100, 2000, 50)
|
|
@@ -261,7 +255,6 @@ class MainWindow(QMainWindow):
|
|
|
261
255
|
leftLayout.addWidget(self.resetButton)
|
|
262
256
|
# leftLayout.addWidget(self.previewRegen)
|
|
263
257
|
leftLayout.addStretch()
|
|
264
|
-
leftLayout.addWidget(self.aboutButton)
|
|
265
258
|
leftLayout.addWidget(self.extractButon)
|
|
266
259
|
|
|
267
260
|
|
|
@@ -450,6 +443,7 @@ class MainWindow(QMainWindow):
|
|
|
450
443
|
hs = hs.replace(' ', '').split('-')
|
|
451
444
|
avgAng = (float(hs[0]) + float(hs[1])) /2
|
|
452
445
|
|
|
446
|
+
|
|
453
447
|
if overlay == 'original image':
|
|
454
448
|
img = self.demSubset
|
|
455
449
|
|
|
@@ -781,29 +775,6 @@ class MainWindow(QMainWindow):
|
|
|
781
775
|
os.removedirs(tempfolder)
|
|
782
776
|
|
|
783
777
|
|
|
784
|
-
def aboutAction(self):
|
|
785
|
-
msg = QMessageBox(self)
|
|
786
|
-
msg.setWindowTitle("About PyLineament")
|
|
787
|
-
msg.setTextFormat(Qt.RichText) # enable HTML formatting
|
|
788
|
-
msg.setTextInteractionFlags(Qt.TextSelectableByMouse | Qt.LinksAccessibleByMouse)
|
|
789
|
-
msg.setStandardButtons(QMessageBox.Ok)
|
|
790
|
-
msg.setText(
|
|
791
|
-
"""<b>PyLineament</b><br><br>
|
|
792
|
-
PyLineament is an open-source Python toolkit for
|
|
793
|
-
<b>automatic and regional-scale lineament extraction</b>
|
|
794
|
-
from DEMs and remote sensing imagery.<br><br>
|
|
795
|
-
Version: 1.0.0<br>
|
|
796
|
-
Author: Epo Prasetya Kusumah - Universitas Pertamina<br>
|
|
797
|
-
License: MIT<br>
|
|
798
|
-
GitHub: <a href='https://github.com/epokus/pylineament'>github.com/epokus/pylineament</a><br><br>
|
|
799
|
-
<b>How to cite:</b><br>
|
|
800
|
-
Kusumah, E. P., (2025). <i>PyLineament: A Python Toolkit for Regional-Scale Lineament Extraction</i>.
|
|
801
|
-
Version 1.0. <a href='https://github.com/epokus/pylineament'>https://github.com/epokus/pylineament</a><br><br>
|
|
802
|
-
© 2025 PyLineament Developers
|
|
803
|
-
"""
|
|
804
|
-
)
|
|
805
|
-
msg.exec_()
|
|
806
|
-
|
|
807
778
|
def main():
|
|
808
779
|
app = QApplication(sys.argv)
|
|
809
780
|
window = MainWindow()
|
|
@@ -813,3 +784,5 @@ def main():
|
|
|
813
784
|
|
|
814
785
|
if __name__ == "__main__":
|
|
815
786
|
main()
|
|
787
|
+
|
|
788
|
+
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pylineament
|
|
3
|
+
Version: 0.1.2
|
|
4
|
+
Summary: Python Geological Lineament extraction package
|
|
5
|
+
Author-email: Epo Kusumah <epo.pk@universiaspertamina.ac.id>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/epokus/pylineament
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Requires-Dist: affine==2.4.0
|
|
11
|
+
Requires-Dist: attrs==25.4.0
|
|
12
|
+
Requires-Dist: certifi==2025.10.5
|
|
13
|
+
Requires-Dist: click==8.3.0
|
|
14
|
+
Requires-Dist: click-plugins==1.1.1.2
|
|
15
|
+
Requires-Dist: cligj==0.7.2
|
|
16
|
+
Requires-Dist: colorama==0.4.6
|
|
17
|
+
Requires-Dist: fiona==1.10.1
|
|
18
|
+
Requires-Dist: imageio==2.37.0
|
|
19
|
+
Requires-Dist: joblib==1.5.2
|
|
20
|
+
Requires-Dist: lazy_loader==0.4
|
|
21
|
+
Requires-Dist: networkx==3.4.2
|
|
22
|
+
Requires-Dist: numpy==2.2.6
|
|
23
|
+
Requires-Dist: packaging==25.0
|
|
24
|
+
Requires-Dist: pandas==2.3.3
|
|
25
|
+
Requires-Dist: pillow==12.0.0
|
|
26
|
+
Requires-Dist: pyparsing==3.2.5
|
|
27
|
+
Requires-Dist: PyQt5==5.15.11
|
|
28
|
+
Requires-Dist: PyQt5-Qt5==5.15.2
|
|
29
|
+
Requires-Dist: PyQt5_sip==12.17.1
|
|
30
|
+
Requires-Dist: pyqtgraph==0.13.7
|
|
31
|
+
Requires-Dist: python-dateutil==2.9.0.post0
|
|
32
|
+
Requires-Dist: pytz==2025.2
|
|
33
|
+
Requires-Dist: rasterio==1.4.3
|
|
34
|
+
Requires-Dist: scikit-image==0.25.2
|
|
35
|
+
Requires-Dist: scikit-learn==1.7.2
|
|
36
|
+
Requires-Dist: scipy==1.15.3
|
|
37
|
+
Requires-Dist: six==1.17.0
|
|
38
|
+
Requires-Dist: threadpoolctl==3.6.0
|
|
39
|
+
Requires-Dist: tifffile==2025.5.10
|
|
40
|
+
Requires-Dist: tzdata==2025.2
|
|
41
|
+
Dynamic: license-file
|
|
42
|
+
|
|
43
|
+
# PyLineament
|
|
44
|
+
|
|
45
|
+
**PyLineament** is a Python-based, open-source toolkit for **automatic and regional-scale lineament extraction** from Digital Elevation Models (DEMs) and remote sensing imagery.
|
|
46
|
+
|
|
47
|
+
It is designed for geological and geomorphological analysis — providing a **fully automated, reproducible**, and **scalable** workflow for extracting, reducing, and mapping lineaments across local to regional scales.
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Installation
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
pip install pylineament
|
|
55
|
+
```
|
|
56
|
+
Or from source:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
git clone https://github.com/epokus/pylineament.git
|
|
60
|
+
cd pylineament
|
|
61
|
+
pip install -e .
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Quick Start (Command Line)
|
|
65
|
+
|
|
66
|
+
Once installed, simply open your terminal or command prompt and run:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
pylineament
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Key Features
|
|
73
|
+
- Interactive UI — Run `pylineament` in the terminal to open the GUI.
|
|
74
|
+
- Automated Workflow — Full end-to-end lineament extraction.
|
|
75
|
+
- Customizable Parameters — Control edge detection thresholds, segment length, and merging distance.
|
|
76
|
+
- Multi-Resolution Support — Works with various DEM/image resolutions.
|
|
77
|
+
- Scalable — Efficient for large-area or regional-scale mapping.
|
|
78
|
+
- Reproducible — Transparent parameters and open-source implementation.
|
|
79
|
+
|
|
80
|
+
## Core Functions
|
|
81
|
+
| Function | Description |
|
|
82
|
+
| ---------------------------- | ------------------------------------------------------------ |
|
|
83
|
+
| `read_raster()` | Reads and preprocesses a raster (DEM or image). |
|
|
84
|
+
| `extract_lineament_points()` | Detects lineament-like edge points using gradient filters. |
|
|
85
|
+
| `convert_points_to_line()` | Converts clustered edge points into connected line segments. |
|
|
86
|
+
| `reduce_lines()` | Simplifies and merges overlapping or redundant lineaments. |
|
|
87
|
+
| `hillshade()` | Generates a hillshade image for visualization. |
|
|
88
|
+
| `dem_to_line()` | Extracts lineaments directly from a DEM file. |
|
|
89
|
+
| `dem_to_shp()` | Full workflow: extract + merge + export to shapefile. |
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
## Example Workflow
|
|
93
|
+
- Input your DEM or satellite image.
|
|
94
|
+
- Optionally apply hillshade() or downscale for efficiency.
|
|
95
|
+
- Extract edge points using extract_lineament_points().
|
|
96
|
+
- Convert points to lines and merge them with reduce_lines().
|
|
97
|
+
- Save as shapefile using dem_to_shp() or merge_lines_csv_to_shp().
|
|
98
|
+
|
|
99
|
+
## example how to use this Library with CLI or python
|
|
100
|
+
|
|
101
|
+
```python
|
|
102
|
+
from pylineament import dem_to_shp
|
|
103
|
+
dem_to_shp("data/srtm_sample.tif", shp_name= "lineamentsExtract")
|
|
104
|
+
```
|
|
105
|
+
shp file will be saved in "lineamentsExtract" folder.
|
|
106
|
+
see more examples in example folder
|
|
107
|
+

|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
## Parameters Overview
|
|
111
|
+
| Parameter | Description | Typical Range |
|
|
112
|
+
| ------------ | ------------------------------------- | ----------------- |
|
|
113
|
+
| `eps` | Edge detection sensitivity | 0.8 – 2.0 |
|
|
114
|
+
| `thresh` | Edge detection threshold | 20 – 80 |
|
|
115
|
+
| `z_multip` | Vertical exaggeration factor | 0.5 – 2.0 |
|
|
116
|
+
| `min_dist` | Minimum distance between merged lines | 5 – 20 pixels |
|
|
117
|
+
| `seg_len` | Minimum segment length | 5 – 20 pixels |
|
|
118
|
+
| `split_size` | DEM/image tile size for processing | 250 – 1000 pixels |
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
## Why PyLineament?
|
|
123
|
+
Typical “automatic” lineament extraction tools are limited by:
|
|
124
|
+
- Fixed image resolution and poor scalability,
|
|
125
|
+
- Heavy preprocessing requirements,
|
|
126
|
+
- Loss of geological meaning across scales,
|
|
127
|
+
- Slow performance in large regions.
|
|
128
|
+
|
|
129
|
+
## PyLineament addresses these by providing:
|
|
130
|
+
- Automated but parameter-controllable extraction,
|
|
131
|
+
- Multi-resolution and downscaling support,
|
|
132
|
+
- Robust reduction and merging algorithms,
|
|
133
|
+
- Compatibility with both small-area (detailed) and large-area datasets (regional mapping).
|
|
134
|
+
|
|
135
|
+
## Citation
|
|
136
|
+
If you use PyLineament in your research, please cite:
|
|
137
|
+
Prasetya Kusumah, E. (2025). PyLineament: A Python Toolkit for Regional-Scale Lineament Extraction.
|
|
138
|
+
Version 1.0. https://github.com/epokus/pylineament
|
|
139
|
+
|
|
140
|
+
## License
|
|
141
|
+
This project is licensed under the MIT License — see the LICENSE
|
|
142
|
+
file for details.
|
|
143
|
+
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "pylineament"
|
|
7
|
-
version = "0.1.
|
|
7
|
+
version = "0.1.2"
|
|
8
8
|
description = "Python Geological Lineament extraction package"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
authors = [{ name="Epo Kusumah", email="epo.pk@universiaspertamina.ac.id" }]
|
|
@@ -50,3 +50,4 @@ Homepage = "https://github.com/epokus/pylineament"
|
|
|
50
50
|
pylineament = "pylineament.pylineament_ui:main"
|
|
51
51
|
|
|
52
52
|
|
|
53
|
+
|
pylineament-0.1.1/PKG-INFO
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: pylineament
|
|
3
|
-
Version: 0.1.1
|
|
4
|
-
Summary: Python Geological Lineament extraction package
|
|
5
|
-
Author-email: Epo Kusumah <epo.pk@universiaspertamina.ac.id>
|
|
6
|
-
License-Expression: MIT
|
|
7
|
-
Project-URL: Homepage, https://github.com/epokus/pylineament
|
|
8
|
-
Description-Content-Type: text/markdown
|
|
9
|
-
Requires-Dist: affine==2.4.0
|
|
10
|
-
Requires-Dist: attrs==25.4.0
|
|
11
|
-
Requires-Dist: certifi==2025.10.5
|
|
12
|
-
Requires-Dist: click==8.3.0
|
|
13
|
-
Requires-Dist: click-plugins==1.1.1.2
|
|
14
|
-
Requires-Dist: cligj==0.7.2
|
|
15
|
-
Requires-Dist: colorama==0.4.6
|
|
16
|
-
Requires-Dist: fiona==1.10.1
|
|
17
|
-
Requires-Dist: imageio==2.37.0
|
|
18
|
-
Requires-Dist: joblib==1.5.2
|
|
19
|
-
Requires-Dist: lazy_loader==0.4
|
|
20
|
-
Requires-Dist: networkx==3.4.2
|
|
21
|
-
Requires-Dist: numpy==2.2.6
|
|
22
|
-
Requires-Dist: packaging==25.0
|
|
23
|
-
Requires-Dist: pandas==2.3.3
|
|
24
|
-
Requires-Dist: pillow==12.0.0
|
|
25
|
-
Requires-Dist: pyparsing==3.2.5
|
|
26
|
-
Requires-Dist: PyQt5==5.15.11
|
|
27
|
-
Requires-Dist: PyQt5-Qt5==5.15.2
|
|
28
|
-
Requires-Dist: PyQt5_sip==12.17.1
|
|
29
|
-
Requires-Dist: pyqtgraph==0.13.7
|
|
30
|
-
Requires-Dist: python-dateutil==2.9.0.post0
|
|
31
|
-
Requires-Dist: pytz==2025.2
|
|
32
|
-
Requires-Dist: rasterio==1.4.3
|
|
33
|
-
Requires-Dist: scikit-image==0.25.2
|
|
34
|
-
Requires-Dist: scikit-learn==1.7.2
|
|
35
|
-
Requires-Dist: scipy==1.15.3
|
|
36
|
-
Requires-Dist: six==1.17.0
|
|
37
|
-
Requires-Dist: threadpoolctl==3.6.0
|
|
38
|
-
Requires-Dist: tifffile==2025.5.10
|
|
39
|
-
Requires-Dist: tzdata==2025.2
|
pylineament-0.1.1/README.md
DELETED
|
File without changes
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: pylineament
|
|
3
|
-
Version: 0.1.1
|
|
4
|
-
Summary: Python Geological Lineament extraction package
|
|
5
|
-
Author-email: Epo Kusumah <epo.pk@universiaspertamina.ac.id>
|
|
6
|
-
License-Expression: MIT
|
|
7
|
-
Project-URL: Homepage, https://github.com/epokus/pylineament
|
|
8
|
-
Description-Content-Type: text/markdown
|
|
9
|
-
Requires-Dist: affine==2.4.0
|
|
10
|
-
Requires-Dist: attrs==25.4.0
|
|
11
|
-
Requires-Dist: certifi==2025.10.5
|
|
12
|
-
Requires-Dist: click==8.3.0
|
|
13
|
-
Requires-Dist: click-plugins==1.1.1.2
|
|
14
|
-
Requires-Dist: cligj==0.7.2
|
|
15
|
-
Requires-Dist: colorama==0.4.6
|
|
16
|
-
Requires-Dist: fiona==1.10.1
|
|
17
|
-
Requires-Dist: imageio==2.37.0
|
|
18
|
-
Requires-Dist: joblib==1.5.2
|
|
19
|
-
Requires-Dist: lazy_loader==0.4
|
|
20
|
-
Requires-Dist: networkx==3.4.2
|
|
21
|
-
Requires-Dist: numpy==2.2.6
|
|
22
|
-
Requires-Dist: packaging==25.0
|
|
23
|
-
Requires-Dist: pandas==2.3.3
|
|
24
|
-
Requires-Dist: pillow==12.0.0
|
|
25
|
-
Requires-Dist: pyparsing==3.2.5
|
|
26
|
-
Requires-Dist: PyQt5==5.15.11
|
|
27
|
-
Requires-Dist: PyQt5-Qt5==5.15.2
|
|
28
|
-
Requires-Dist: PyQt5_sip==12.17.1
|
|
29
|
-
Requires-Dist: pyqtgraph==0.13.7
|
|
30
|
-
Requires-Dist: python-dateutil==2.9.0.post0
|
|
31
|
-
Requires-Dist: pytz==2025.2
|
|
32
|
-
Requires-Dist: rasterio==1.4.3
|
|
33
|
-
Requires-Dist: scikit-image==0.25.2
|
|
34
|
-
Requires-Dist: scikit-learn==1.7.2
|
|
35
|
-
Requires-Dist: scipy==1.15.3
|
|
36
|
-
Requires-Dist: six==1.17.0
|
|
37
|
-
Requires-Dist: threadpoolctl==3.6.0
|
|
38
|
-
Requires-Dist: tifffile==2025.5.10
|
|
39
|
-
Requires-Dist: tzdata==2025.2
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|