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 intonumpyfunctions 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.
map(op)Apply function to x and y and return new XY value.
shrink2()Attributes
aspectAspect ratio (X/Y).
latAccess Latitude value (Y).
latlonConvert to tuple in Latitude,Longitude order.
lonAccess Longitude value (X).
lonlatConvert to tuple in Longitude,Latitude order.
shapeInterpret as
shape(Y, X) order.whInterpret as
width, height, (X, Y) order.xAccess X value.
xyConvert to tuple in X,Y order.
yAccess Y value.
yxConvert to tuple in Y,X order.