Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
FACT Land Use Land Cover
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Container Registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FACT
FACT Data Services
FACT Land Use Land Cover
Commits
4c823b26
Commit
4c823b26
authored
1 year ago
by
Riccardo Boero
Browse files
Options
Downloads
Patches
Plain Diff
Added temporary directory suffix for reprojections.
parent
5512604c
No related branches found
Branches containing commit
Tags
v0.2
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
other/fix_geotiffs.py
+4
-2
4 additions, 2 deletions
other/fix_geotiffs.py
other/fix_projections.sh
+1
-1
1 addition, 1 deletion
other/fix_projections.sh
with
5 additions
and
3 deletions
other/fix_geotiffs.py
+
4
−
2
View file @
4c823b26
...
...
@@ -8,7 +8,9 @@ def main(zip_path):
if
__name__
==
"
__main__
"
:
parser
=
argparse
.
ArgumentParser
(
description
=
'
Reproject GeoTIFF files in a ZIP archive to EPSG:4326.
'
)
parser
.
add_argument
(
'
zip_path
'
,
type
=
str
,
help
=
'
Path to the ZIP file containing GeoTIFFs.
'
)
parser
.
add_argument
(
'
--suffix
'
,
type
=
str
,
help
=
'
User-defined suffix for the temporary directory.
'
,
default
=
'
default_suffix
'
)
args
=
parser
.
parse_args
()
print
(
"
Processing file at path:
"
,
args
.
zip_path
)
# Debug print
main
(
args
.
zip_path
)
print
(
"
Processing file at path:
"
,
args
.
zip_path
,
"
with temporary directory suffix:
"
,
args
.
suffix
)
main
(
args
.
zip_path
,
args
.
suffix
)
This diff is collapsed.
Click to expand it.
other/fix_projections.sh
+
1
−
1
View file @
4c823b26
...
...
@@ -8,7 +8,7 @@ pip install git+https://FACT_token:glpat-1zG-TQx___xLsPjj2vsG@git.nilu.no/fact/u
for
y
in
{
2017..2021
}
do
echo
"Starting processing year
${
y
}
"
python fix_geotiffs.py ../geodata/data/lulc
${
y
}
.zip
>
proj
${
y
}
.txt 2>&1 &
python fix_geotiffs.py ../geodata/data/lulc
${
y
}
.zip
--suffix
${
y
}
>
proj
${
y
}
.txt 2>&1 &
done
wait
echo
"*** All years concluded!!!"
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