how to find values within a radius from a central position of latitude and longitude value
问题 I am trying to calculate all the values contained within a particular radius from a central lat lon position.The code which I am using is as given: import numpy as np import matplotlib.pylab as pl import netCDF4 as nc import haversine f = nc.Dataset('air_temp.nc') def haversine(lon1, lat1, lon2, lat2): # convert decimal degrees to radians lon1 = np.deg2rad(lon1) lon2 = np.deg2rad(lon2) lat1 = np.deg2rad(lat1) lat2 = np.deg2rad(lat2) # haversine formula dlon = lon2 - lon1 dlat = lat2 - lat1 a