(LatLon)
| 52 | |
| 53 | |
| 54 | def LatLon2Pixel(LatLon): |
| 55 | h, w, _ = LatLon.shape |
| 56 | Lat = LatLon[:, :, 0] |
| 57 | Lon = LatLon[:, :, 1] |
| 58 | i = (h * (0.5 - Lat / np.pi)) % h |
| 59 | j = (w * (0.5 + Lon / (2 * np.pi))) % w |
| 60 | |
| 61 | return np.dstack((i, j)).astype('int') |
no outgoing calls
no test coverage detected