from_latlon#

from_latlon(lat, lon, level)#

Converts latitudes and longitudes to SIDs at the given level.

Latitudes and longitudes have to be array-like.

Parameters:
lat: 1D array-like

latitudes. Has to have same length as lon

lon: 1D array-like

longitudes. Has to have same length as lat

level: int (0<=level<=27)

level/resolution of the SIDs

Returns:
sids: numpy 1D array

stare index values

Examples

>>> import pystare
>>> lats = [34.4]
>>> lons = [-119.7]
>>> pystare.from_latlon(lat=lats, lon=lons, level=7)
array([3331783833575763399])