Commit f9472f19 authored by Daniel Scheffler's avatar Daniel Scheffler Committed by Mathias Peters
Browse files

modified docstring of calc_FullDataset_corner_positions(); added TODO to boxObj()

parent 222d8f50
......@@ -29,15 +29,16 @@ def get_corner_coordinates(gdal_ds=None, gt=None, cols=None, rows=None):
def calc_FullDataset_corner_positions(mask_1bit, assert_four_corners=True, algorithm='shapely'):
# type: (np.ndarray, bool, str) -> list
"""
Calculates the image coordinates of the true data corners for rotated datasets.
ONLY usable for entire images - no tiles!
NOTE: Algorithm calculates the corner coordinates of the convex hull of the given mask. Since the convex hull not
always reflects all of the true corner coordinates the result has a limitation in this regard.
NOTE: Algorithm 'shapely' calculates the corner coordinates of the convex hull of the given mask. Since the convex
hull not always reflects all of the true corner coordinates the result can have a limitation in this regard.
:param mask_1bit: 2D-numpy array 1bit
:param assert_four_corners:
:param algorithm: <str> 'shapely' or 'numpy'
:param assert_four_corners: <bool> whether to assert four corners or not
:param algorithm: <str> 'shapely' or 'numpy' (default: 'shapely')
:return: [UL, UR, LL, LR] as [(ULrow,ULcol),(URrow,URcol),...]
"""
......
......@@ -28,6 +28,7 @@ class boxObj(object):
- boxImYX (list): box image coordinates like [(ULy,ULx), (URy,URx), (LRy,LRx), (LLy,LLx)]
"""
# FIXME self.prj is not used
# TODO allow boxObj to be instanced with gt, prj + rows/cols
self.gt = kwargs.get('gt', (0, 1, 0, 0, 0, -1))
self.prj = kwargs.get('prj', '')
self._mapPoly = kwargs.get('mapPoly', None)
......
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