uwacan.positional.Coordinates#
- class Coordinates(coordinates=None, /, latitude=None, longitude=None)[source]#
Bases:
DatasetWrapContainer for latitude and longitude.
This class has a number of useful methods to perform computations on coordinates.
- Parameters:
- coordinates
xarray.Dataset Dataset with at least “latitude” and “longitude”
- latitudefloat
A latitude value to store.
- longitudefloat
A longitude value to store.
- coordinates
Methods
bearing_to(other)Calculate the bearing to another coordinate.
distance_to(other)Calculate the distance to another coordinate.
How many nautical miles one longitude minute is.
make_figure([lat, lon, extent])Create a plotly figure, styled for this data.
plot([use_minutes, include_time, name, ...])Create a plotly trace for the coordinates.
shift_position(distance, bearing)Shift this coordinate by a distance in a certain bearing.
Inherited methods
from_dataset(dataset, **kwargs)Instantiate the class from a dataset.
groupby(group)isel([indexers, drop, missing_dims, drop_allnan])Select a subset of the data from the coordinate indices.
load(path[, lookup_class])Load data from a Zarr file and optionally restore the original class.
save(path[, append_dim])Save the data to a Zarr file at the specified path.
sel([indexers, method, tolerance, drop, ...])Select a subset of the data from the coordinate labels.
where(cond[, other, drop])Filter elements from this object according to a condition.
Attributes
attrsAttributes stored in the data.
coordinatesThe latitude and longitude for this coordinate, as
Dataset.coordsThe coordinate (dimension) arrays for this data.
dataThe contained data.
dimsThe dimensions of this data.
latitudeThe latitude for coordinate, as
DataArray.longitudeThe longitude for coordinate, as
DataArray.sizesMapping from dimension names to lengths.