Commit 274fe189 authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

updated import statements for GeoArray class

components.CoReg:
- added DeprecationWarning

components.CoReg_local:
- COREG_LOCAL.view_CoRegPoints(): added keywords vmin, vmax

- updated README.md

updated __version__
parent 665b46cb
......@@ -232,14 +232,15 @@ The help instructions of the console interface can be accessed like this:
```python
cd /path/to/CoReg_Sat/
python ./dsc__CoReg_Sat_FourierShiftTheorem.py -h
python ./coreg_cmd.py -h
```
Follow these instructions to run CoReg_Sat from a shell console. For example, the most simple call would be like this:
Follow these instructions to run CoReg_Sat from a shell console. For example, the most simple call for a global
co-registration would be like this:
```python
python ./dsc__CoReg_Sat_FourierShiftTheorem.py /path/to/your/ref_image.bsq /path/to/your/tgt_image.bsq
python ./coreg_cmd.py global /path/to/your/ref_image.bsq /path/to/your/tgt_image.bsq
```
......
......@@ -9,7 +9,7 @@ from .components import utilities
from .components import geometry
__author__ = 'Daniel Scheffler'
__version__= '2017-03-28_06'
__version__= '2017-04-05_01'
__all__=['COREG',
'COREG_LOCAL',
......
......@@ -22,23 +22,31 @@ except ImportError:
from shapely.geometry import Point, Polygon
from skimage.exposure import rescale_intensity
try:
import geoarray
except ImportError:
raise ImportError("Since 2017/03/31 CoReg_Sat depends on the package 'geoarray'. "
"You need an invitation to the respective GitLab repository from Daniel Scheffler. "
"Then follow the install instructions there.")
# internal modules
from .DeShifter import DESHIFTER, _dict_rspAlg_rsp_Int
from . import geometry as GEO
from . import io as IO
from . import plotting as PLT
from py_tools_ds.ptds.io.raster.GeoArray import GeoArray, alias_property
from py_tools_ds.ptds.geo.coord_calc import corner_coord_to_minmax, get_corner_coordinates
from py_tools_ds.ptds.geo.vector.topology import get_overlap_polygon, get_smallest_boxImYX_that_contains_boxMapYX
from py_tools_ds.ptds.geo.projection import prj_equal, get_proj4info
from py_tools_ds.ptds.geo.vector.geometry import boxObj, round_shapelyPoly_coords
from py_tools_ds.ptds.geo.coord_grid import move_shapelyPoly_to_image_grid
from py_tools_ds.ptds.geo.coord_trafo import pixelToMapYX, reproject_shapelyGeometry, mapXY2imXY
from geoarray import GeoArray
from py_tools_ds.ptds.convenience.object_oriented import alias_property
from py_tools_ds.ptds.geo.coord_calc import corner_coord_to_minmax, get_corner_coordinates
from py_tools_ds.ptds.geo.vector.topology import get_overlap_polygon, get_smallest_boxImYX_that_contains_boxMapYX
from py_tools_ds.ptds.geo.projection import prj_equal, get_proj4info
from py_tools_ds.ptds.geo.vector.geometry import boxObj, round_shapelyPoly_coords
from py_tools_ds.ptds.geo.coord_grid import move_shapelyPoly_to_image_grid
from py_tools_ds.ptds.geo.coord_trafo import pixelToMapYX, reproject_shapelyGeometry, mapXY2imXY
from py_tools_ds.ptds.geo.raster.reproject import warp_ndarray
from py_tools_ds.ptds.geo.map_info import geotransform2mapinfo
from py_tools_ds.ptds.numeric.vector import find_nearest
from py_tools_ds.ptds.similarity.raster import calc_ssim
from py_tools_ds.ptds.geo.map_info import geotransform2mapinfo
from py_tools_ds.ptds.numeric.vector import find_nearest
from py_tools_ds.ptds.similarity.raster import calc_ssim
......
......@@ -18,10 +18,10 @@ from matplotlib import pyplot as plt
from mpl_toolkits.axes_grid1 import make_axes_locatable
from .Tie_Point_Grid import Tie_Point_Grid
from .CoReg import COREG
from .DeShifter import DESHIFTER
from .CoReg import COREG
from .DeShifter import DESHIFTER
from py_tools_ds.ptds.geo.coord_trafo import transform_any_prj, reproject_shapelyGeometry
from py_tools_ds.ptds import GeoArray
from geoarray import GeoArray
......@@ -304,7 +304,7 @@ class COREG_LOCAL(object):
def view_CoRegPoints(self, attribute2plot='ABS_SHIFT', cmap=None, exclude_fillVals=True, backgroundIm='tgt',
hide_filtered=True, figsize=None, savefigPath='', savefigDPI=96, showFig=True,
return_map=False, zoomable=False):
vmin=None, vmax=None, return_map=False, zoomable=False):
"""Shows a map of the calculated quality grid with the target image as background.
:param attribute2plot: <str> the attribute of the quality grid to be shown (default: 'ABS_SHIFT')
......@@ -318,6 +318,8 @@ class COREG_LOCAL(object):
:param savefigPath:
:param savefigDPI:
:param showFig: <bool> whether to show or to hide the figure
:param vmin:
:param vmax:
:param return_map <bool>
:param zoomable: <bool> enable or disable zooming via mpld3
:return:
......@@ -397,10 +399,11 @@ class COREG_LOCAL(object):
# plot all points on top
if not GDF.empty:
vmin, vmax = (np.percentile(GDF[attribute2plot], 0), np.percentile(GDF[attribute2plot], 95)) \
if attribute2plot!='ANGLE' else (0, 360)
#vmin=None # TODO make this adjustable
#vmax=None
vmin_auto, vmax_auto = (np.percentile(GDF[attribute2plot], 0), np.percentile(GDF[attribute2plot], 95)) \
if attribute2plot!='ANGLE' else (0, 360)
vmin = vmin if vmin is not None else vmin_auto
vmax = vmax if vmax is not None else vmax_auto
points = plt.scatter(GDF['plt_X'],GDF['plt_Y'], c=GDF[attribute2plot], lw = 0,
cmap=palette, marker='o' if len(GDF)<10000 else '.', s=50, alpha=1.0,
vmin=vmin, vmax=vmax)
......
......@@ -12,7 +12,7 @@ except ImportError:
from osgeo import gdal
# internal modules
from py_tools_ds.ptds import GeoArray
from geoarray import GeoArray
from py_tools_ds.ptds.geo.map_info import mapinfo2geotransform, geotransform2mapinfo
from py_tools_ds.ptds.geo.coord_grid import is_coord_grid_equal
from py_tools_ds.ptds.geo.projection import prj_equal
......
......@@ -27,7 +27,7 @@ from py_tools_ds.ptds.geo.projection import isProjectedOrGeographic, ge
from py_tools_ds.ptds.io.pathgen import get_generic_outpath
from py_tools_ds.ptds.processing.progress_mon import ProgressBar
from py_tools_ds.ptds.geo.vector.conversion import points_to_raster
from py_tools_ds.ptds import GeoArray
from geoarray import GeoArray
......
......@@ -18,9 +18,9 @@ except ImportError:
from osgeo import ogr
# internal modules
from py_tools_ds.ptds.geo.coord_calc import calc_FullDataset_corner_positions
from py_tools_ds.ptds.geo.coord_trafo import pixelToMapYX, imYX2mapYX
from py_tools_ds.ptds import GeoArray
from py_tools_ds.ptds.geo.coord_calc import calc_FullDataset_corner_positions
from py_tools_ds.ptds.geo.coord_trafo import pixelToMapYX, imYX2mapYX
from geoarray import GeoArray
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment