Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
landschapsmonitor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Roelofsen, Hans
landschapsmonitor
Commits
ee5c212b
Commit
ee5c212b
authored
3 years ago
by
Roelofsen, Hans
Browse files
Options
Downloads
Patches
Plain Diff
timestamp in batch script
parent
a8980b22
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
sample/geslotenheid/prep_opgaande_elementen.bat
+8
-6
8 additions, 6 deletions
sample/geslotenheid/prep_opgaande_elementen.bat
with
8 additions
and
6 deletions
sample/geslotenheid/prep_opgaande_elementen.bat
+
8
−
6
View file @
ee5c212b
...
...
@@ -7,7 +7,7 @@ call c:\Users\roelo008\Miniconda3\Scripts\activate.bat
call
conda
activate
mrt
REM OUTPUTS
SET
jaar
=
201
9
SET
jaar
=
201
8
SET
og_vlak_out
=
OG
%jaar%
_vlak_250cm.tif
SET
og_lijn_out
=
OG
%jaar%
_lijn_250cm.tif
SET
BBOut
=
BB
%jaar%
_250cm.tif
...
...
@@ -26,6 +26,8 @@ REM minimum aantal 2.5m cellen in een 25m cel voor kwalificatie als gesloten
SET
drempelwaarde_vlakken
=
30
SET
drempelwaarde_lijnen
=
8
SET
timestamp
=
%date
:
~
0
,
4
%%date
:
~
5
,
2
%%date
:
~
8
,
2
%t%
time
:
~
0
,
2
%%time
:
~
3
,
2
%%time
:
~
6
,
2
%
REM Opgaand Groen
gdal_rasterize
-at -l
Vlakken
-of
GTiff
-te
10000
300000
280000
625000
-tr
2
.5
2
.5
-ts
108000
130000
-ot
Byte
-a
_srs
epsg
:28992
-co
COMPRESS
=
LZW
-burn
1
%OGDir%
/MonitoringsbronOpgaandGroen
_0101
%jaar%
.gdb
%scratch_dir%
/
%og_vlak_out%
gdal_rasterize
-at -l
Lijnen
-of
GTiff
-te
10000
300000
280000
625000
-tr
2
.5
2
.5
-ts
108000
130000
-ot
Byte
-a
_srs
epsg
:28992
-co
COMPRESS
=
LZW
-burn
1
%OGDir%
/MonitoringsbronOpgaandGroen
_0101
%jaar%
.gdb
%scratch_dir%
/
%og_lijn_out%
...
...
@@ -42,20 +44,20 @@ ogr2ogr -sql "SELECT * FROM INRICHTINGSELEMENT_LIJN WHERE TYPEINRICHTINGSELEMENT
gdal_rasterize
-at -of
GTiff
-te
10000
300000
280000
625000
-tr
2
.5
2
.5
-ts
108000
130000
-ot
Byte
-a
_srs
epsg
:28992
-co
COMPRESS
=
LZW
-burn
1
%scratch_dir%
/
%T1
0
LOut
%
.shp
%scratch_dir%
/
%T1
0
LOut
%
.tif
REM Add vlakvormige bronrasters together
python
"
%gdal_dir%
/gdal_calc.py"
-co
COMPRESS
=
LZW
-A
%scratch_dir%
/
%og_vlak_out%
-B
%scratch_dir%
/
%BBOut%
-C
%scratch_dir%
/
%T1
0
VOut
%
.tif
--outfile
=
%scratch_dir%
/vlakken
_
%jaar%
_combi.tif
--calc
=
"numpy.where((A+B+C)>=1, 1, 0)"
python
"
%gdal_dir%
/gdal_calc.py"
-
-co
COMPRESS
=
LZW
-A
%scratch_dir%
/
%og_vlak_out%
-B
%scratch_dir%
/
%BBOut%
-C
%scratch_dir%
/
%T1
0
VOut
%
.tif
--outfile
=
%scratch_dir%
/vlakken
_
%jaar%
_combi.tif
--calc
=
"numpy.where((A+B+C)>=1, 1, 0)"
REM Add lijnvormige bronrasters together
python
"
%gdal_dir%
/gdal_calc.py"
-co
COMPRESS
=
LZW
-A
%scratch_dir%
/
%og_lijn_out%
-B
%scratch_dir%
/
%T1
0
LOut
%
.tif
--outfile
=
%scratch_dir%
/lijnen
_
%jaar%
_combi.tif
--calc
=
"numpy.where((A+B)>=1, 1, 0)"
python
"
%gdal_dir%
/gdal_calc.py"
-
-co
COMPRESS
=
LZW
-A
%scratch_dir%
/
%og_lijn_out%
-B
%scratch_dir%
/
%T1
0
LOut
%
.tif
--outfile
=
%scratch_dir%
/lijnen
_
%jaar%
_combi.tif
--calc
=
"numpy.where((A+B)>=1, 1, 0)"
REM Aggregate lijnen and vlakken to 25m with SUM aggregation method
gdalwarp
-co
COMPRESS
=
LZW
-tr
25
25
-te
10000
300000
280000
625000
-r
sum
%scratch_dir%
/vlakken
_
%jaar%
_combi.tif
%scratch_dir%
/vlakken
_combi_
%jaar%
_25m.tif
gdalwarp
-co
COMPRESS
=
LZW
-tr
25
25
-te
10000
300000
280000
625000
-r
sum
%scratch_dir%
/lijnen
_
%jaar%
_combi.tif
%scratch_dir%
/lijnen
_combi_
%jaar%
_25m.tif
REM Apply treshold
python
"
%gdal_dir%
/gdal_calc.py"
-co
COMPRESS
=
LZW
-A
%scratch_dir%
/vlakken
_combi_
%jaar%
_25m.tif
--outfile
=
%scratch_dir%
/vlakken
_
%jaar%
_gte_th.tif
--calc
=
"numpy.where(A >=
%drempelwaarde_vlakken%
, 1, 0)"
python
"
%gdal_dir%
/gdal_calc.py"
-co
COMPRESS
=
LZW
-A
%scratch_dir%
/lijnen
_combi_
%jaar%
_25m.tif
--outfile
=
%scratch_dir%
/lijnen
_
%jaar%
_gte_th.tif
--calc
=
"numpy.where(A >=
%drempelwaarde_lijnen%
, 1, 0)"
python
"
%gdal_dir%
/gdal_calc.py"
-
-co
COMPRESS
=
LZW
-A
%scratch_dir%
/vlakken
_combi_
%jaar%
_25m.tif
--outfile
=
%scratch_dir%
/vlakken
_
%jaar%
_gte_th.tif
--calc
=
"numpy.where(A >=
%drempelwaarde_vlakken%
, 1, 0)"
python
"
%gdal_dir%
/gdal_calc.py"
-
-co
COMPRESS
=
LZW
-A
%scratch_dir%
/lijnen
_combi_
%jaar%
_25m.tif
--outfile
=
%scratch_dir%
/lijnen
_
%jaar%
_gte_th.tif
--calc
=
"numpy.where(A >=
%drempelwaarde_lijnen%
, 1, 0)"
REM Combine. Output pxl value 2 means 'gesloten' 1 means 'open'.
python
"
%gdal_dir%
/gdal_calc.py"
-co
COMPRESS
=
LZW
--format
EHdr
--type
Float32
-A
%scratch_dir%
/vlakken
_
%jaar%
_gte_th.tif
-B
%scratch_dir%
/lijnen
_
%jaar%
_gte_th.tif
--outfile
=
%OutDir%
/opgaande
_elementen_
%jaar%
.flt
--calc
=
"numpy.where((A+B) >=1, 2, 1)"
python
"
%gdal_dir%
/gdal_calc.py"
-
-co
COMPRESS
=
LZW
--format
EHdr
--type
Float32
-A
%scratch_dir%
/vlakken
_
%jaar%
_gte_th.tif
-B
%scratch_dir%
/lijnen
_
%jaar%
_gte_th.tif
--outfile
=
%OutDir%
/opgaande
_elementen_
%jaar%
_
%timestamp%
.flt
--calc
=
"numpy.where((A+B) >=1, 2, 1)"
pause
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment