Add quick start Notebook

This commit is contained in:
Florent Guiotte 2018-09-28 13:27:41 +02:00
parent 7ec65323d9
commit 92771dd4c3
4 changed files with 735 additions and 1 deletions

44
Readme.md Normal file
View File

@ -0,0 +1,44 @@
TRISKELE -- Unofficial Python wrapper
===========
This work is based on
[TRISKELE](https://sourcesup.renater.fr/projects/triskele/) from OBELIX. It's a
a dumb, raw, work in progress prototype. In early access. Brace yourself.
Dependencies
------
- TRISKELE: make, gcc, boost-libs, intel-tbb, gdal
- Python wrapper: python-pip, python-gdal
Setup
-----
First, clone the project.
```sh
git clone https://git.normalized.xyz/Florent/Triskele.git
```
Then compile TRISKELE to get the apGenerator binary.
```sh
cd Triskele
make -f MakefileNoOTB -j8 apGenerator
```
Finally, install triskele python in develop mode.
```sh
cd python
pip install -e .
```
Usage
----
```python
import triskele
```
See example in this linked [Notebook](./Triskele-demo.ipynb).

345
Triskele-demo.ipynb Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -15,7 +15,7 @@ import numpy as np
from .CreaTIFF import read, write
class Triskele:
def __init__(self, raster, dtype=np.uint8, normalize_to_dtype=True, cache_dir='/tmp', verbose=True):
def __init__(self, raster, dtype=np.uint8, normalize_to_dtype=True, cache_dir='/tmp', verbose=False):
self.verbose = verbose
self.triskele_bin = Path(os.path.dirname(os.path.realpath(__file__))\