Skip to content

Commit

Permalink
check load parameters for incomapible combinations
Browse files Browse the repository at this point in the history
  • Loading branch information
v0lat1le committed Sep 5, 2016
1 parent 6ccfb0f commit e9cfa14
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions datacube/api/core.py
Expand Up @@ -281,6 +281,9 @@ def pq_fuser(dest, src):
return None if stack else xarray.Dataset()

if like:
assert output_crs is None, "'like' and 'output_crs' are not supported together"
assert resolution is None, "'like' and 'resolution' are not supported together"
assert align is None, "'like' and 'align' are not supported together"
geobox = like.geobox
else:
geobox = self._get_geobox(observations, output_crs, resolution, align=align, **query)
Expand Down
1 change: 1 addition & 0 deletions datacube/api/query.py
Expand Up @@ -69,6 +69,7 @@ def __init__(self, index=None, product=None, geopolygon=None, like=None, **kwarg
self.search.update(_values_to_search(**{key: kwargs[key]}))

if like:
assert self.geopolygon is None, "'like' with other spatial bounding parameters is not supported"
self.geopolygon = getattr(like, 'extent', self.geopolygon)

if 'time' not in self.search:
Expand Down

0 comments on commit e9cfa14

Please sign in to comment.