Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
u4py
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Rudolf, Michael
u4py
Commits
f11387fb
Commit
f11387fb
authored
4 weeks ago
by
Rudolf, Michael
Browse files
Options
Downloads
Patches
Plain Diff
Added typed dict
parent
c3c665a8
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
u4py/scripts/gis_workflows/Create_Masks_For_Machine_Learning.py
+5
-4
5 additions, 4 deletions
...cripts/gis_workflows/Create_Masks_For_Machine_Learning.py
with
5 additions
and
4 deletions
u4py/scripts/gis_workflows/Create_Masks_For_Machine_Learning.py
+
5
−
4
View file @
f11387fb
...
@@ -18,6 +18,7 @@ import u4py.io.sql as u4sql
...
@@ -18,6 +18,7 @@ import u4py.io.sql as u4sql
import
u4py.io.tiff
as
u4tiff
import
u4py.io.tiff
as
u4tiff
import
u4py.utils.config
as
u4config
import
u4py.utils.config
as
u4config
import
u4py.utils.projects
as
u4proj
import
u4py.utils.projects
as
u4proj
from
u4py.utils.types
import
ShapeCfgDict
def
main
():
def
main
():
...
@@ -84,7 +85,7 @@ def get_masking_features(
...
@@ -84,7 +85,7 @@ def get_masking_features(
shapes_path
:
os
.
PathLike
,
shapes_path
:
os
.
PathLike
,
anomaly_path
:
os
.
PathLike
,
anomaly_path
:
os
.
PathLike
,
raster_file
:
os
.
PathLike
,
raster_file
:
os
.
PathLike
,
shp_cfg
:
d
ict
,
shp_cfg
:
ShapeCfgD
ict
,
)
->
gp
.
GeoDataFrame
:
)
->
gp
.
GeoDataFrame
:
"""
"""
Combines the shapes in the area of the `raster_file` from `shapes_path`
Combines the shapes in the area of the `raster_file` from `shapes_path`
...
@@ -98,7 +99,7 @@ def get_masking_features(
...
@@ -98,7 +99,7 @@ def get_masking_features(
:param raster_file: The path to the raster file.
:param raster_file: The path to the raster file.
:type raster_file: os.PathLike
:type raster_file: os.PathLike
:param shp_cfg: The shape configuration
:param shp_cfg: The shape configuration
:type shp_cfg:
d
ict
:type shp_cfg:
ShapeCfgD
ict
:return: The merged shapes for masking.
:return: The merged shapes for masking.
:rtype: gp.GeoDataFrame
:rtype: gp.GeoDataFrame
"""
"""
...
@@ -195,7 +196,7 @@ def raster_features(
...
@@ -195,7 +196,7 @@ def raster_features(
def
create_feature_index
(
def
create_feature_index
(
shp_cfg
:
d
ict
,
shp_cfg
:
ShapeCfgD
ict
,
shapes_path
:
os
.
PathLike
,
shapes_path
:
os
.
PathLike
,
anomaly_path
:
os
.
PathLike
,
anomaly_path
:
os
.
PathLike
,
out_path
:
os
.
PathLike
,
out_path
:
os
.
PathLike
,
...
@@ -205,7 +206,7 @@ def create_feature_index(
...
@@ -205,7 +206,7 @@ def create_feature_index(
the mask with the feature classes.
the mask with the feature classes.
:param shp_cfg: The shape config
:param shp_cfg: The shape config
:type shp_cfg:
d
ict
:type shp_cfg:
ShapeCfgD
ict
:param shapes_path: The path to the osm shape file.
:param shapes_path: The path to the osm shape file.
:type shapes_path: os.PathLike
:type shapes_path: os.PathLike
:param anomaly_path: The path to the classified anomalies shape file.
:param anomaly_path: The path to the classified anomalies shape 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