Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Climax
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
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
earth_observation_public
Climax
Commits
9bd2192b
Commit
9bd2192b
authored
3 years ago
by
Frisinghelli Daniel
Browse files
Options
Downloads
Patches
Plain Diff
Remove scaling of DEM.
parent
cf4769df
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
climax/core/dataset.py
+4
-2
4 additions, 2 deletions
climax/core/dataset.py
with
4 additions
and
2 deletions
climax/core/dataset.py
+
4
−
2
View file @
9bd2192b
...
...
@@ -19,7 +19,7 @@ import dask.array as da
from
climax.core.constants
import
(
ERA5_VARIABLES
,
ERA5_PRESSURE_LEVELS
,
ERA5_P_VARIABLE_NAME
,
ERA5_S_VARIABLE_NAME
,
PROJECTION
)
from
pysegcnn.core.utils
import
search_files
from
pysegcnn.core.utils
import
search_files
,
img2np
from
pysegcnn.core.trainer
import
LogConfig
# module level logger
...
...
@@ -127,7 +127,6 @@ class EoDataset(torch.utils.data.Dataset):
@staticmethod
def
dem_features
(
dem
,
add_coord
=
None
):
# read digital elevation model
LogConfig
.
init_log
(
'
Reading digital elevation model: {}
'
.
format
(
dem
))
# compute slope
...
...
@@ -142,6 +141,9 @@ class EoDataset(torch.utils.data.Dataset):
''
,
str
(
dem
),
'
aspect
'
,
format
=
'
MEM
'
,
computeEdges
=
True
,
alg
=
'
Horn
'
).
ReadAsArray
().
astype
(
np
.
float32
)
# read digital elevation model
dem
=
img2np
(
dem
).
astype
(
np
.
float32
)
# digital elevation model features: elevation, slope and aspect
dem_vars
=
{
'
elevation
'
:
EoDataset
.
add_coordinates
(
dem
,
(
'
y
'
,
'
x
'
)),
...
...
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