cf.DimensionCoordinate.has_geometry¶
-
DimensionCoordinate.
has_geometry
()[source]¶ True if there is a geometry type.
New in version (cfdm): 1.8.0
See also
- Returns
bool
Whether or not there is a geometry type.
Examples:
>>> f = cf.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