Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
measprocess
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Lukas Eller
measprocess
Commits
06cdb625
Commit
06cdb625
authored
Apr 26, 2021
by
Lukas Eller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changed name to plot_locations_osm
parent
3af62942
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
13 deletions
+11
-13
__init__.py
measprocess/__init__.py
+2
-2
geospatial.py
measprocess/geospatial.py
+3
-5
plotting.py
measprocess/plotting.py
+2
-2
plotting_test.py
tests/plotting_test.py
+4
-4
No files found.
measprocess/__init__.py
View file @
06cdb625
...
@@ -14,7 +14,7 @@ from .geospatial import (
...
@@ -14,7 +14,7 @@ from .geospatial import (
pull_from_geodatenviewer_meas
pull_from_geodatenviewer_meas
)
)
from
.plotting
import
(
from
.plotting
import
(
plot_
serie
s_osm
,
plot_
location
s_osm
,
plot_street_nodes
plot_street_nodes
)
)
from
.preprocess
import
(
from
.preprocess
import
(
...
...
measprocess/geospatial.py
View file @
06cdb625
...
@@ -36,7 +36,7 @@ def get_geoseries_streets(
...
@@ -36,7 +36,7 @@ def get_geoseries_streets(
"""
"""
Obtain the street shapes in the area spanned by the measurement_coords.
Obtain the street shapes in the area spanned by the measurement_coords.
:param measurement_coords: A geopandas geoseries of Points(lon, lat) representing the measurement positions in a
e
:4326 projection
:param measurement_coords: A geopandas geoseries of Points(lon, lat) representing the measurement positions in a
EPSG
:4326 projection
:param retries: Number of retries for overpy requests, default:5
:param retries: Number of retries for overpy requests, default:5
:param crop: Set to True if the returned geoseries should be fixed to bounding box determined by measurement_coords, default: False
:param crop: Set to True if the returned geoseries should be fixed to bounding box determined by measurement_coords, default: False
...
@@ -399,5 +399,3 @@ def pull_from_geodatenviewer_meas(measurement_coords: gpd.GeoSeries) -> gpd.GeoD
...
@@ -399,5 +399,3 @@ def pull_from_geodatenviewer_meas(measurement_coords: gpd.GeoSeries) -> gpd.GeoD
return_gdf
=
pull_from_geodatenviewer_list
(
polygonID_list
)
return_gdf
=
pull_from_geodatenviewer_list
(
polygonID_list
)
return
return_gdf
return
return_gdf
measprocess/plotting.py
View file @
06cdb625
...
@@ -5,7 +5,7 @@ import matplotlib.pyplot as plt
...
@@ -5,7 +5,7 @@ import matplotlib.pyplot as plt
import
numpy
as
np
import
numpy
as
np
from
typing
import
Tuple
from
typing
import
Tuple
def
plot_
serie
s_osm
(
def
plot_
location
s_osm
(
gps_series
:
gpd
.
GeoSeries
,
gps_series
:
gpd
.
GeoSeries
,
c_series
:
np
.
ndarray
=
None
,
c_series
:
np
.
ndarray
=
None
,
zoom_level
:
int
=
10
,
zoom_level
:
int
=
10
,
...
...
tests/plotting_test.py
View file @
06cdb625
...
@@ -20,22 +20,22 @@ class TestPlottingOSM(unittest.TestCase):
...
@@ -20,22 +20,22 @@ class TestPlottingOSM(unittest.TestCase):
def
test_basic
(
self
):
def
test_basic
(
self
):
#Check if no exception comes up
#Check if no exception comes up
series
=
self
.
_gps_series
.
set_crs
(
"EPSG:4326"
)
series
=
self
.
_gps_series
.
set_crs
(
"EPSG:4326"
)
mpc
.
plotting
.
plot_
serie
s_osm
(
series
,
show
=
False
)
mpc
.
plotting
.
plot_
location
s_osm
(
series
,
show
=
False
)
def
test_exception_epsg
(
self
):
def
test_exception_epsg
(
self
):
with
self
.
assertRaises
(
ValueError
):
with
self
.
assertRaises
(
ValueError
):
series
=
self
.
_gps_series
#.set_crs("EPSG:4326")
series
=
self
.
_gps_series
#.set_crs("EPSG:4326")
mpc
.
plotting
.
plot_
serie
s_osm
(
series
,
show
=
False
)
mpc
.
plotting
.
plot_
location
s_osm
(
series
,
show
=
False
)
def
test_kwargs_basic
(
self
):
def
test_kwargs_basic
(
self
):
series
=
self
.
_gps_series
.
set_crs
(
"EPSG:4326"
)
series
=
self
.
_gps_series
.
set_crs
(
"EPSG:4326"
)
mpc
.
plotting
.
plot_
serie
s_osm
(
series
,
show
=
False
,
color
=
"red"
)
mpc
.
plotting
.
plot_
location
s_osm
(
series
,
show
=
False
,
color
=
"red"
)
def
test_kwargs_double
(
self
):
def
test_kwargs_double
(
self
):
#s is based twice here
#s is based twice here
with
self
.
assertRaises
(
TypeError
):
with
self
.
assertRaises
(
TypeError
):
series
=
self
.
_gps_series
.
set_crs
(
"EPSG:4326"
)
series
=
self
.
_gps_series
.
set_crs
(
"EPSG:4326"
)
mpc
.
plotting
.
plot_
serie
s_osm
(
series
,
show
=
False
,
s
=
100
,
color
=
"red"
)
mpc
.
plotting
.
plot_
location
s_osm
(
series
,
show
=
False
,
s
=
100
,
color
=
"red"
)
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
unittest
.
main
()
unittest
.
main
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment