Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Basemap
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Simon Dreutter
Basemap
Commits
874680c4
Commit
874680c4
authored
4 years ago
by
Simon Dreutter
Browse files
Options
Downloads
Patches
Plain Diff
Delete 1_process_add_backup1.py
parent
a817fb17
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
process/1_process_add_backup1.py
+0
-77
0 additions, 77 deletions
process/1_process_add_backup1.py
with
0 additions
and
77 deletions
process/1_process_add_backup1.py
deleted
100644 → 0
+
0
−
77
View file @
a817fb17
# -*- coding: utf-8 -*-
"""
####################################################################
# #
# AWI Basemap #
# PROCESS ANTARCTIC DIGITAL DATANASE DATA #
# #
####################################################################
This script is processing the Antarctic Digital Database (ADD) input
for the AWI Basemap. Input layers are the ADD coastlines and the ADD
rock outcrops. Both layers are reprojected to a global CRS
(EPSG_WORLD), coastlines are separated by shelf ice and ice sheet,
and the rock outcrop geometries are fixed.
"""
#=============================================================================
# SCRIPT INFO
#=============================================================================
__author__
=
'
Simon Dreutter
'
__version__
=
'
0.1
'
__date__
=
'
2020-12-17
'
__email__
=
'
simon.dreutter@awi.de
'
__status__
=
'
Developement
'
#=============================================================================
# IMPORT
#=============================================================================
# import AWI Basemap configuration
from
config
import
*
#=============================================================================
# PROCESS
#=============================================================================
EPSG_ADD
=
'
EPSG:3031
'
msg
=
'
Reprojecting and extracting land mask from ADD coastlines...
'
cmd
=
f
'
ogr2ogr -s_srs
{
EPSG_ADD
}
-t_srs
{
EPSG_WORLD
}
-nln
"
add_coastline_land
"
-where
"
\"
surface
\"
=
\'
land
\'
"
-wrapdateline -f GPKG
{
ADD_COASTLINE_LAND
}
{
ADD_COASTLINE_IN
}
'
run
(
msg
,
cmd
)
msg
=
'
Reprojecting and extracting ice mask from ADD coastlines...
'
cmd
=
f
'
ogr2ogr -s_srs
{
EPSG_ADD
}
-t_srs
{
EPSG_WORLD
}
-nln
"
add_coastline_ice
"
-where
"
\"
surface
\"
=
\'
ice shelf
\'
OR
\"
surface
\"
=
\'
rumple
\'
OR
\"
surface
\"
=
\'
ocean
\'
OR
\"
surface
\"
=
\'
ice tongue
\'
"
-wrapdateline -f GPKG
{
ADD_SHELF_ICE
}
{
ADD_COASTLINE_IN
}
'
run
(
msg
,
cmd
)
msg
=
'
Reprojecting ADD rock outcrops...
'
cmd
=
f
'
ogr2ogr -s_srs
{
EPSG_ADD
}
-t_srs
{
EPSG_WORLD
}
-nln
"
add_rock_outcrop
"
-wrapdateline -f GPKG
{
ADD_ROCK_OUTCROP
}
{
ADD_ROCK_OUTCROP_IN
}
'
run
(
msg
,
cmd
)
msg
=
'
Fixing ADD rock outcrops geometries...
'
cmd
=
f
'
ogr2ogr -dialect sqlite -sql
"
SELECT ST_Buffer(geom, 0.0) AS geom,* FROM
\"
add_rock_outcrop
\"
"
-nln
"
add_rock_outcrop_fixed
"
-f GPKG
{
ADD_ROCK_OUTCROP_FIXED
}
{
ADD_ROCK_OUTCROP
}
'
run
(
msg
,
cmd
)
print
()
print
(
'
ADD done!
'
)
print
()
print
(
'
Now do not forget to manually cut the rock outcrops from the ADD land layer!
'
)
print
()
input
(
'
Press Enter to exit!
'
)
print
()
#=============================================================================
# TODO
#=============================================================================
"""
- find a scripted solution for
'
Difference
'
- once found, add cleanup
"""
\ 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