crs=ocgis.crs.Spherical() required to subset with RequestDataset
rokuingh opened this issue · 1 comments
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.iter_collections():
File "/Users/ryan/miniconda3/envs/ocgis/lib/python3.6/site-packages/ocgis/ops/engine.py", line 125, in iter_collections
for coll in self.process_subsettables(rds):
File "/Users/ryan/miniconda3/envs/ocgis/lib/python3.6/site-packages/ocgis/ops/engine.py", line 278, in process_subsettables
for coll in self.process_geometries(itr, field, alias):
File "/Users/ryan/miniconda3/envs/ocgis/lib/python3.6/site-packages/ocgis/ops/engine.py", line 339, in process_geometries
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?