pyguymer3.geo.find_middle_of_locs¶
- pyguymer3.geo.find_middle_of_locs(lons, lats, /, *, angConv=0.1, conv=1000.0, debug=True, eps=1e-12, method='GeodesicBox', midLat=None, midLon=None, nAng=9, nIter=100, nRefine=1, pad=10000.0, useSciPy=False)[source]¶
Find the middle of some locations
This function finds the middle of some locations such that the Geodesic distances to the West/East extremities are equalised and the Geodesic distances to the South/North extremities are equalised.
- Parameters:
lons (numpy.ndarray) – the longitudes (in degrees)
lats (numpy.ndarray) – the latitudes (in degrees)
angConv (float, optional) – the angle change which classifies as converged (in degrees)
conv (float, optional) – the distance that defines the middle as being converged (in degrees or metres)
debug (bool, optional) – print debug messages
eps (float, optional) – the tolerance of the Vincenty formula iterations
method (str, optional) – the method for finding the middle of the locations
nAng (int, optional) – the number of angles around the middle location to search over
nIter (int, optional) – the maximum number of iterations (particularly the Vincenty formula)
nRefine (int, optional) – the number of refinements to make (each refinement halves the “conv” distance)
pad (float, optional) – the padding to add to the maximum distance from the middle to the most extreme location (in degrees or metres)
useSciPy (bool, optional) – use “scipy.optimize.minimize” or my own minimizer
- Returns:
midLon (float) – the middle longitude (in degrees)
midLat (float) – the middle latitude (in degrees)
maxDist (float) – the maximum Geodesic distance from the middle to the most extreme location (in metres)
Notes
Copyright 2017 Thomas Guymer [1]
References