Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhelpful error message re virtual product #1435

Open
pindge opened this issue Apr 13, 2023 · 1 comment
Open

Unhelpful error message re virtual product #1435

pindge opened this issue Apr 13, 2023 · 1 comment

Comments

@pindge
Copy link
Contributor

pindge commented Apr 13, 2023

The following query on virtual product raises an unhelpful error:

query = {
         'x': (minx, maxx),
         'y': (miny, maxy),
         'time': ("2015-03-01", "2015-03-30"),
         'crs': "EPSG:3577"
        }

VP definition:

spec = yaml.safe_load("""     
            transform: apply_mask
            mask_measurement_name: water
            input:
                juxtapose:
                    - product: ga_ls_fc_3
                      group_by: solar_day
                    - transform: make_mask
                      input:
                          product: ga_ls_wo_3
                          group_by: solar_day
                          fuse_func: plugins.wo_utils.wo_fusefunc
                      flags:
                          cloud: false
                          cloud_shadow: false
                          noncontiguous: false
                          nodata: false
                          water_observed: false
                      mask_measurement_name: water""")

product = construct(**spec)
bag = product.load(dc, **query)

Expected behaviour

except the error to suggest code to define resolution

Actual behaviour

File /usr/local/lib/python3.8/dist-packages/datacube/utils/geometry/_base.py:1215, in bounding_box_in_pixel_domain(geobox, reference)
   1212 tol = 1.e-8
   1214 if reference.crs != geobox.crs:
-> 1215     raise ValueError("Cannot combine geoboxes in different CRSs")
   1217 a, b, c, d, e, f, *_ = ~reference.affine * geobox.affine  # type: ignore[misc]
   1219 if not (numpy.isclose(a, 1) and numpy.isclose(b, 0) and is_almost_int(c, tol)        # type: ignore[has-type]
   1220         and numpy.isclose(d, 0) and numpy.isclose(e, 1) and is_almost_int(f, tol)):  # type: ignore[has-type]
ValueError: Cannot combine geoboxes in different CRSs

Environment information

  • This was run in prod sandbox.
  • Datacube version: 1.8.12

Note: Stale issues will be automatically closed after a period of six months with no activity.
To ensure critical issues are not closed, tag them with the Github pinned tag.
If you are a community member and not a maintainer please escalate this issue to maintainers via
GIS StackExchange or Slack.

@pindge pindge changed the title ambiguous error message unhelpful error message re virtual product Apr 13, 2023
@tebadi tebadi changed the title unhelpful error message re virtual product Unhelpful error message re virtual product Apr 14, 2023
@tebadi
Copy link
Contributor

tebadi commented Apr 14, 2023

It seems that the products go through reprojection and given both of them were derived from the same LS scenes, this shouldn't have happend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants