cfdm.core.AuxiliaryCoordinate.del_geometry

AuxiliaryCoordinate.del_geometry(default=ValueError())[source]

Remove the geometry type.

New in version (cfdm): 1.8.0

Parameters
default: optional

Return the value of the default parameter if the geometry type has not been set.

If set to an Exception instance then it will be raised instead.

Returns
str

The removed geometry type.

Examples

>>> f = cfdm.core.read('file.nc')[0]
>>> c = f.construct('axis=X')
>>> c.has_geometry()
True
>>> c.get_geometry()
'line'
>>> b = c.del_geometry()
>>> c.has_geometry()
False
>>> print(c.get_geometry(None))
None
>>> c.set_geometry(b)
>>> c.has_geometry()
True