Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • arosics arosics
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 14
    • Issues 14
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 3
    • Merge requests 3
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Daniel Scheffler
  • arosicsarosics
  • Issues
  • #59
Closed
Open
Created Jul 01, 2021 by Nathan Thomas@nmt28

argmax error when not specifying poly WKT

When using CoReg on OS X Catalina installed through conda like this:

import arosics

reference = 'spot5_IMAGERY_TOA_stack.tif'
floating = 'spot1_IMAGERY_TOA_stack.tif'


arosics.CoReg.COREG(reference, floating, path_out='/outfolder/', fmt_out='ENVI', out_crea_options=None, r_b4match=4, s_b4match=3, wp=(None, None), ws=(256, 256), max_iter=10, max_shift=50, align_grids=False, match_gsd=False, out_gsd=None, target_xyGrid=None, resamp_alg_deshift='cubic', resamp_alg_calc='cubic', footprint_poly_ref=None, footprint_poly_tgt=None, data_corners_ref=None, data_corners_tgt=None, nodata=(0, 0), calc_corners=True, binary_ws=True, mask_baddata_ref=None, mask_baddata_tgt=None, CPUs=None, force_quadratic_win=True, progress=True, v=False, path_verbose_out=None, q=False, ignore_errors=False)

it produces the error:

sys:1: UserWarning: 
First attempt to check if functionality of co-registration failed. Check your input data and parameters. The following error occurred:
Traceback (most recent call last):
  File "registration.py", line 11, in <module>
    arosics.CoReg_local.COREG_LOCAL(reference, floating, 1, max_points=None, window_size=(256, 256), path_out='/Users/nmthoma1/Desktop/', fmt_out='ENVI', out_crea_options=None, projectDir=None, r_b4match=4, s_b4match=3, max_iter=10, max_shift=5, tieP_filter_level=3, min_reliability=60, rs_max_outlier=10, rs_tolerance=2.5, align_grids=True, match_gsd=False, out_gsd=None, target_xyGrid=None, resamp_alg_deshift='cubic', resamp_alg_calc='cubic', footprint_poly_ref=None, footprint_poly_tgt=None, data_corners_ref=None, data_corners_tgt=None, outFillVal=- 9999, nodata=(None, None), calc_corners=True, binary_ws=True, force_quadratic_win=True, mask_baddata_ref=None, mask_baddata_tgt=None, CPUs=None, progress=True, v=False, q=False, ignore_errors=True)
  File "/Users/nmthoma1/miniconda/envs/RSGISLib/lib/python3.8/site-packages/arosics/CoReg_local.py", line 236, in __init__
    self.COREG_obj = COREG(self.imref, self.im2shift,
  File "/Users/nmthoma1/miniconda/envs/RSGISLib/lib/python3.8/site-packages/arosics/CoReg.py", line 309, in __init__
    self._get_image_params()
  File "/Users/nmthoma1/miniconda/envs/RSGISLib/lib/python3.8/site-packages/arosics/CoReg.py", line 441, in _get_image_params
    self.ref = GeoArray_CoReg(self.params, 'ref')
  File "/Users/nmthoma1/miniconda/envs/RSGISLib/lib/python3.8/site-packages/arosics/CoReg.py", line 121, in __init__
    if not self.footprint_poly.is_valid:
  File "/Users/nmthoma1/miniconda/envs/RSGISLib/lib/python3.8/site-packages/geoarray/baseclasses.py", line 496, in footprint_poly
    self._footprint_poly = fill_holes_within_poly(multipolygon)
  File "/Users/nmthoma1/miniconda/envs/RSGISLib/lib/python3.8/site-packages/py_tools_ds/geo/vector/topology.py", line 184, in fill_holes_within_poly
    largest_poly_filled = gdf.loc[gdf['area_filled'].idxmax()]['geometry']
  File "/Users/nmthoma1/miniconda/envs/RSGISLib/lib/python3.8/site-packages/pandas/core/series.py", line 2168, in idxmax
    i = nanops.nanargmax(self._values, skipna=skipna)
  File "/Users/nmthoma1/miniconda/envs/RSGISLib/lib/python3.8/site-packages/pandas/core/nanops.py", line 66, in _f
    raise TypeError(
TypeError: reduction operation 'argmax' not allowed for this dtype

when I specify footprint_poly_ref and footprint_poly_tgt, the error does not appear

Thanks

Edited Jul 01, 2021 by Daniel Scheffler
Assignee
Assign to
Time tracking