cover_from_hull#
- cover_from_hull(lat, lon, level)#
Converts a set of hull vertices to a trixel cover.
Interprets a set of latitudes and longitudes as ring vertices. Then converts the ring into a convex hull. The ordering of the vertices thus is irrelevant. Then tesselates the ring with trixels and returns the according SIDs.
- Parameters:
- lat: 1D array-like
latitudes of hull vertices. Has to be same length as lon
- lon: 1D array-like
longitudes of hull vertices. Has to be same length as lat
- level: int
Maximum level of trixels of the cover.
- Returns:
- range_indices: 1D array-like
SIDs of trixel cover of the hull
Examples
>>> import pystare >>> lat = [53.75702912049104, 54.98310415304803, 53.69393219666267, 50.128051662794235, 49.01778351500333, 47.62058197691181, 47.467645575544, 50.266337795607285, 51.10667409932158, 53.75702912049104] >>> lon = [14.119686313542559, 9.921906365609118, 7.100424838905269, 6.043073357781111, 8.099278598674744, 7.466759067422231, 12.932626987365948, 12.240111118222558, 15.01699588385867, 14.119686313542559] >>> pystare.cover_from_hull(lat, lon, 3) array([4251398048237748227, 4269412446747230211, 4278419646001971203, 4539628424389459971, 4548635623644200963, 4566650022153682947])