Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _determine_method(lon, lat):
""" find method to be used -> prefers faster methods"""
if equally_spaced(lon, lat):
return "rasterize"
if _equally_spaced_on_split_lon(lon) and equally_spaced(lat):
split_point = _find_splitpoint(lon)
flipped_lon = np.hstack((lon[split_point:], lon[:split_point]))
if equally_spaced(flipped_lon):
return "rasterize_flip"
else:
return "rasterize_split"
return "shapely"