to_vertices#
- to_vertices(sids, wrap_lon=True)#
Converts a (collection of) sid(s) into vertices. Vertices are a tuple of:
the latitudes of the corners
the longitudes of the corners
the latitudes of the centers
the longitudes of the centers
The longitudes and latitudes of the corners are serialized i.e. they are 3 times the length of the length of sids
- Parameters
- sids: int or collection of ints
sids to covert to vertices
- wrap_lon: bool
toggle if vertices should be wraped around antimeridian. If true: lon = ((lon + 180.0) % 360.0) - 180.0
- Returns
- vertices: (list of) tuple(s)
(Collection of) trixel corner vertices; Three corner points per trixel.
Examples
>>> import starepandas >>> import numpy >>> sids = numpy.array([3]) >>> starepandas.to_vertices(sids) (array([-29.9999996 , -38.92792794, -23.13179401]), array([ 9.73560999, 18.06057651, 19.71049975]), array([-30.75902492]), array([15.84277554]))