Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Daniel Scheffler
arosics
Commits
6a1e38a3
Commit
6a1e38a3
authored
Aug 14, 2018
by
Daniel Scheffler
Browse files
Added folium and geojson to requirements. Fixed view_CoRegPoints_folium().
parent
dfac3abc
Pipeline
#3141
canceled with stages
in 1 minute and 44 seconds
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
arosics/CoReg.py
View file @
6a1e38a3
...
...
@@ -450,14 +450,8 @@ class COREG(object):
# TODO different colors for polygons
assert
self
.
overlap_poly
,
'Please calculate the overlap polygon first.'
try
:
import
folium
import
geojson
except
ImportError
:
folium
,
geojson
=
None
,
None
if
not
folium
or
not
geojson
:
raise
ImportError
(
"This method requires the libraries 'folium' and 'geojson'. They can be installed with "
"the shell command 'pip install folium geojson'."
)
import
folium
import
geojson
refPoly
=
reproject_shapelyGeometry
(
self
.
ref
.
poly
,
self
.
ref
.
epsg
,
4326
)
shiftPoly
=
reproject_shapelyGeometry
(
self
.
shift
.
poly
,
self
.
shift
.
epsg
,
4326
)
...
...
arosics/CoReg_local.py
View file @
6a1e38a3
...
...
@@ -501,13 +501,9 @@ class COREG_LOCAL(object):
warnings
.
warn
(
UserWarning
(
'This function is still under construction and may not work as expected!'
))
assert
self
.
CoRegPoints_table
is
not
None
,
'Calculate tie point grid first!'
if
not
all
([
util
.
find_spec
(
'folium'
),
util
.
find_spec
(
'geojson'
)]):
raise
ImportError
(
"This method requires the libraries 'folium' and 'geojson'. They can be installed with "
"the shell command 'pip install folium geojson'."
)
import
folium
import
geojson
from
folium
import
plugins
from
folium
.raster_layers
import
ImageOverlay
lon_min
,
lat_min
,
lon_max
,
lat_max
=
\
reproject_shapelyGeometry
(
self
.
im2shift
.
box
.
mapPoly
,
self
.
im2shift
.
projection
,
4326
).
bounds
...
...
@@ -525,7 +521,7 @@ class COREG_LOCAL(object):
# create map
map_osm
=
folium
.
Map
(
location
=
[
center_lat
,
center_lon
])
# ,zoom_start=3)
# import matplotlib
plugins
.
ImageOverlay
(
ImageOverlay
(
colormap
=
lambda
x
:
(
1
,
0
,
0
,
x
),
# TODO a colormap must be given
# colormap=matplotlib.cm.gray, # does not work
image
=
image2plot
,
bounds
=
[[
lat_min
,
lon_min
],
[
lat_max
,
lon_max
]],
...
...
requirements.txt
View file @
6a1e38a3
...
...
@@ -9,3 +9,5 @@ matplotlib
geopandas
plotly
six
folium
>=0.6.0
geojson
requirements_pip.txt
View file @
6a1e38a3
cmocean
plotly
six
folium>=0.6.0
geojson
setup.py
View file @
6a1e38a3
...
...
@@ -18,7 +18,7 @@ with open("arosics/version.py") as version_file:
exec
(
version_file
.
read
(),
version
)
requirements
=
[
'numpy'
,
'gdal'
,
'shapely'
,
'scikit-image'
,
'matplotlib'
,
'geopandas'
,
'geoarray>=0.8.0'
,
'py_tools_ds>=0.12.1'
,
'plotly'
,
'cmocean'
,
'six'
,
'py_tools_ds>=0.12.1'
,
'plotly'
,
'cmocean'
,
'six'
,
'folium>=0.6.0'
,
'geojson'
# 'pykrige' # conda install --yes -c conda-forge pykrige
# 'pyfftw', # conda install --yes -c conda-forge pyfftw=0.10.4 ; \
# 'basemap', # conda install --yes -c conda-forge basemap; \
...
...
tests/CI_docker/context/environment_arosics.yml
View file @
6a1e38a3
...
...
@@ -34,6 +34,8 @@ dependencies:
-
sphinx-argparse
-
six
-
spectral
-
folium>=0.6.0
-
geojson
-
flake8
-
pycodestyle<2.4.0
# fixes ImportError: module 'pycodestyle' has no attribute 'break_around_binary_operator'
-
pylint
...
...
Write
Preview
Supports
Markdown
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