cover_from_ring#

cover_from_ring(lat, lon, level)#

Converts ring vertices to a trixel cover.

Interprets a set of latitudes and longitudes as ring vertices. Then tesselates the ring with trixels and returns the according SIDs. The ordering of the vertices is relevant and has to be counterclockwise! However, the ring does not have to be closed and will impicitly be closed.

Parameters:
lat: 1D array-like

latitudes of ring vertices. Has to be same length as lon

lon: 1D array-like

longitudes of ring 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 ring

Examples

>>> 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_ring(lat, lon, 5)
array([4254212798004854789, 4255901647865118725, 4256464597818540037,
       4257027547771961349, 4257590497725382661, 4258153447678803973,
       4271664246560915461, 4280671445815656453, 4281234395769077765,
       4282360295675920389, 4284049145536184325, 4285175045443026949,
       4541880224203145221, 4553139223271571461, 4571153621781053445])