When subsetting a file with no data variables with RequestDataset, the following traceback will occur if crs=ocgis.crs.Spherical() is not set:
Traceback (most recent call last):
File "test_subset.py", line 12, in
res = oo.execute()
File "/Users/ryan/miniconda3/envs/ocgis/lib/python3.6/site-packages/ocgis/ops/core.py", line 313, in execute
return interp.execute()
File "/Users/ryan/miniconda3/envs/ocgis/lib/python3.6/site-packages/ocgis/ops/interpreter.py", line 135, in execute
ret = conv.write()
File "/Users/ryan/miniconda3/envs/ocgis/lib/python3.6/site-packages/ocgis/conv/base.py", line 171, in write
for i, coll in enumerate(self):
File "/Users/ryan/miniconda3/envs/ocgis/lib/python3.6/site-packages/ocgis/conv/base.py", line 120, in iter
for coll in self.colls:
File "/Users/ryan/miniconda3/envs/ocgis/lib/python3.6/site-packages/ocgis/ops/engine.py", line 59, in iter
for coll in self._itercollections():
File "/Users/ryan/miniconda3/envs/ocgis/lib/python3.6/site-packages/ocgis/ops/engine.py", line 125, in _itercollections
for coll in self._processsubsettables(rds):
File "/Users/ryan/miniconda3/envs/ocgis/lib/python3.6/site-packages/ocgis/ops/engine.py", line 278, in _processsubsettables
for coll in self._processgeometries(itr, field, alias):
File "/Users/ryan/miniconda3/envs/ocgis/lib/python3.6/site-packages/ocgis/ops/engine.py", line 339, in _processgeometries
subset_field.update_crs(field.crs)
File "/Users/ryan/miniconda3/envs/ocgis/lib/python3.6/site-packages/ocgis/collection/field.py", line 976, in update_crs
self.geom.update_crs(to_crs)
File "/Users/ryan/miniconda3/envs/ocgis/lib/python3.6/site-packages/ocgis/variable/geom.py", line 1062, in update_crs
super(GeometryVariable, self).update_crs(to_crs)
File "/Users/ryan/miniconda3/envs/ocgis/lib/python3.6/site-packages/ocgis/spatial/base.py", line 160, in update_crs
raise ValueError(msg)
ValueError: The destination CRS may not be None. Has the coordinate system been assigned appropriately?
When subsetting a file with no data variables with RequestDataset, the following traceback will occur if crs=ocgis.crs.Spherical() is not set:
Traceback (most recent call last): File "test_subset.py", line 12, in
res = oo.execute()
File "/Users/ryan/miniconda3/envs/ocgis/lib/python3.6/site-packages/ocgis/ops/core.py", line 313, in execute
return interp.execute()
File "/Users/ryan/miniconda3/envs/ocgis/lib/python3.6/site-packages/ocgis/ops/interpreter.py", line 135, in execute
ret = conv.write()
File "/Users/ryan/miniconda3/envs/ocgis/lib/python3.6/site-packages/ocgis/conv/base.py", line 171, in write
for i, coll in enumerate(self):
File "/Users/ryan/miniconda3/envs/ocgis/lib/python3.6/site-packages/ocgis/conv/base.py", line 120, in iter
for coll in self.colls:
File "/Users/ryan/miniconda3/envs/ocgis/lib/python3.6/site-packages/ocgis/ops/engine.py", line 59, in iter
for coll in self._itercollections():
File "/Users/ryan/miniconda3/envs/ocgis/lib/python3.6/site-packages/ocgis/ops/engine.py", line 125, in _itercollections
for coll in self._processsubsettables(rds):
File "/Users/ryan/miniconda3/envs/ocgis/lib/python3.6/site-packages/ocgis/ops/engine.py", line 278, in _processsubsettables
for coll in self._processgeometries(itr, field, alias):
File "/Users/ryan/miniconda3/envs/ocgis/lib/python3.6/site-packages/ocgis/ops/engine.py", line 339, in _processgeometries
subset_field.update_crs(field.crs)
File "/Users/ryan/miniconda3/envs/ocgis/lib/python3.6/site-packages/ocgis/collection/field.py", line 976, in update_crs
self.geom.update_crs(to_crs)
File "/Users/ryan/miniconda3/envs/ocgis/lib/python3.6/site-packages/ocgis/variable/geom.py", line 1062, in update_crs
super(GeometryVariable, self).update_crs(to_crs)
File "/Users/ryan/miniconda3/envs/ocgis/lib/python3.6/site-packages/ocgis/spatial/base.py", line 160, in update_crs
raise ValueError(msg)
ValueError: The destination CRS may not be None. Has the coordinate system been assigned appropriately?