Commit 12795750 authored by POLCHER Jan's avatar POLCHER Jan 🚴🏾
Browse files

Remove the lonlat2xyz function which we do not need anymore.

parent 2b26cd98
......@@ -4,28 +4,6 @@ import numpy as np
FillValue=np.nan
IntFillValue=999999
#
def lonlat2xyz(lon, lat):
#
if type(lon) is list :
poly=[]
for llo, lla in zip(lon,lat) :
poly.append((np.cos(np.radians(lla)) * np.cos(np.radians((llo+180.)%360)),
np.cos(np.radians(lla)) * np.sin(np.radians((llo+180.)%360)),
np.sin(np.radians(lla)) ))
elif type(lon) is np.ndarray :
jjm,iim=lon.shape
poly=np.empty((jjm,iim,3), float)
for i in range(iim) :
for j in range(jjm) :
poly[j,i,:] = (np.cos(np.radians(lat[j,i])) * np.cos(np.radians((lon[j,i]+180.)%360)),
np.cos(np.radians(lat[j,i])) * np.sin(np.radians((lon[j,i]+180.)%360)),
np.sin(np.radians(lat[j,i])))
else :
poly = (np.cos(np.radians(lat)) * np.cos(np.radians((lon+180.)%360)),
np.cos(np.radians(lat)) * np.sin(np.radians((lon+180.)%360)),
np.sin(np.radians(lat)) )
#
return poly
#
# Overlap with the the lat/lon box. The function only tests if there is a potential overlap.
# The default answer is that there is an overlap, unless we find it impossible.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment