to_corners#

to_corners(sids, wrap_lon=True)#

Converts a (collection of) sid(s) into (collection of) corners in lon/lat representation.

Parameters:
sids: int or collection of ints

sids to covert to corners

wrap_lon: bool

toggle if vertices should be wraped around antimeridian. If true: lon = ((lon + 180.0) % 360.0) - 180.0

Returns:
corners: numpy.array

(Collection of) trixel corners in lon/lat representations; Three corner points per trixel. First dimension are the SIDs, second dimension the corners (1 through 3), third dimensio lon/lat.

Examples

>>> import starepandas
>>> sids = [4611263805962321926, 4611404543450677254]
>>> starepandas.to_corners(sids)
array([[[20.55604548, 22.47991609],
        [19.73607532, 24.53819039],
        [18.21460548, 22.84521749]],
        [[18.88878121, 26.59188366],
        [17.35402492, 24.89163021],
        [19.73607532, 24.53819039]]])