odc.geo.Shape2d
- class odc.geo.Shape2d(x, y)[source]
2d shape.
Unlike other XY types, Shape2d does have canonical order:
Y,X
. This class implements Mapping interfaces, so it can be used as input intonumpy
functions that accept shape parameter. It can also be compared directly to a tuple form. It can be concatenated with a tuple.Methods
__init__
(x, y)count
(value)index
(value, [start, [stop]])Raises ValueError if the value is not present.
Attributes
lat
Access Latitude value (Y).
latlon
Convert to tuple in Latitude,Longitude order.
lon
Access Longitude value (X).
lonlat
Convert to tuple in Longitude,Latitude order.
shape
Interpret as
shape
(Y, X) order.wh
Interpret as
width, height
, (X, Y) order.x
Access X value.
xy
Convert to tuple in X,Y order.
y
Access Y value.
yx
Convert to tuple in Y,X order.