Skip to content

Commit

Permalink
Add demo and demo data (#12)
Browse files Browse the repository at this point in the history
* add demo files and data
* regnerating with the right library (untie)
* using relative path in config.json
* launch basic demo (`tie_demo`)

---------

Co-authored-by: Monnerat Marc swisstopo <[email protected]>
  • Loading branch information
procrastinatio and ltmom authored Oct 10, 2024
1 parent 3336e57 commit 8b628d0
Show file tree
Hide file tree
Showing 21 changed files with 255 additions and 1 deletion.
5 changes: 5 additions & 0 deletions toolbox/MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,8 @@ include VERSION
include tietoolbox/scripts/symbols.tsv
include LICENSE.txt
include images/*.png
include data/swissalti3d-2.0-mosaic.tif
include data/geocover.gdb.zip
include data/config.json
include data/cache/*
include data/*
2 changes: 1 addition & 1 deletion toolbox/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.4.9
0.4.10
2 changes: 2 additions & 0 deletions toolbox/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ def read(fname):
"scripts/symbols.tsv",
"scripts/*",
],
'tietoolbox': ['data/*', 'data/cache/*'],
},
include_package_data=True,
classifiers=[
Expand All @@ -73,6 +74,7 @@ def read(fname):
"console_scripts": [
"tie_analysis = tietoolbox.scripts.tie_analysis_dask:main",
"tie_viewer = tietoolbox.scripts.tie_viewer:main",
"tie_demo = tietoolbox.scripts.tie_demo:main",
],
},
)
Binary file added toolbox/tietoolbox/data/cache/BEDrst.npy
Binary file not shown.
Binary file added toolbox/tietoolbox/data/cache/BEDrst.tif
Binary file not shown.

Large diffs are not rendered by default.

Binary file added toolbox/tietoolbox/data/cache/DEM.pkl
Binary file not shown.
166 changes: 166 additions & 0 deletions toolbox/tietoolbox/data/cache/Linear_Objects.geojson

Large diffs are not rendered by default.

Binary file added toolbox/tietoolbox/data/cache/TECrst.npy
Binary file not shown.
Binary file added toolbox/tietoolbox/data/cache/TECrst.tif
Binary file not shown.
Binary file added toolbox/tietoolbox/data/cache/cropped.tif
Binary file not shown.
7 changes: 7 additions & 0 deletions toolbox/tietoolbox/data/cache/extent.geojson
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "FeatureCollection",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs,crs:EPSG::2056,crs:EPSG::5729" } },
"features": [
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 2587200.0, 1165920.0 ], [ 2587200.0, 1166900.0 ], [ 2588800.0, 1166900.0 ], [ 2588800.0, 1165920.0 ], [ 2587200.0, 1165920.0 ] ] ] } }
]
}
Binary file added toolbox/tietoolbox/data/cache/extent.pkl
Binary file not shown.
Binary file added toolbox/tietoolbox/data/cache/faults.pkl
Binary file not shown.
Binary file added toolbox/tietoolbox/data/cache/traces.pkl
Binary file not shown.
25 changes: 25 additions & 0 deletions toolbox/tietoolbox/data/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "Stierenberg",
"Lines": {
"source": "geocover.gdb.zip",
"layer": "Linear_Objects",
"attribute": "KIND"
},
"bbox": [
2587200.0,
1165920.0,
2588800.0,
1166900.0
],
"gdb": "geocover.gdb.zip",
"Bedrock": {
"source": "geocover.gdb.zip",
"layer": "Bedrock_HARMOS_lt40000_Extract",
"attribute": "TOPGIS_GC_GC_BED_FORM_ATT_FMAT_LITSTRAT"
},
"project_dir": ".",
"DEM": {
"source": "swissalti3d-2.0-mosaic.tif",
"resolution": "2.0"
}
}
Binary file added toolbox/tietoolbox/data/geocover.gdb.zip
Binary file not shown.
1 change: 1 addition & 0 deletions toolbox/tietoolbox/data/run.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
D:\conda\envs\TIE\python.exe D:\conda\envs\TIE\Lib\site-packages\tietoolbox\scripts\tie_viewer.py --data-dir H:\code\lg-tie-toolbox\toolbox\data\cache --log-level DEBUG --config H:\code\lg-tie-toolbox\toolbox\data\config.json -p 3DTIE
Binary file not shown.
1 change: 1 addition & 0 deletions toolbox/tietoolbox/scripts/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__all__ = ["tie_viewer", "config", "tie_demo", "utils"]
18 changes: 18 additions & 0 deletions toolbox/tietoolbox/scripts/tie_demo.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# tietoolbox/scripts/demo.py
import importlib.resources
from tietoolbox.scripts import tie_viewer


def main():
data_dir = importlib.resources.files("tietoolbox").joinpath("data")

cfg_file_path = data_dir.joinpath("config.json")
cache_dir = data_dir.joinpath("cache")

predefined_args = ["--config", cfg_file_path, "-d", cache_dir]

tie_viewer.main(predefined_args)


if __name__ == "__main__":
main()

0 comments on commit 8b628d0

Please sign in to comment.