pvdeg.geospatial.identify_mountains_radii#

pvdeg.geospatial.identify_mountains_radii(meta_df, kdtree, rad_1=12, rad_2=1, threshold_factor=1.25, elevation_floor=0, bbox_kwarg={}) array[source]#

Find mountains from elevation metadata using sklearn kdtree for fast lookup.

Compares a large area of points to a small area of points to find significant changes in elevation representing mountains. Tweak the radii to determine the sensitivity and noise. Bad radii cause the result to become unstable quickly. kdtree can be generated using pvdeg.geospatial.meta_KDTree

Parameters:#

meta_dfpd.DataFrame

Dataframe of metadata as generated by pvdeg.weather.get for geospatial

kdtreesklearn.neighbors.KDTree

kdtree containing latitude-longitude pairs for quick lookups Generate using pvdeg.geospatial.meta_KDTree

rad_1float

radius of the larger search area whose elevations are compared against the smaller search area. controls the kdtree query region.

rad_2float

radius of the smaller search area whose elevations are compared to the larger area. controls the kdtree query region.

threshold_factorfloat

change the significance level of elevation difference between small and large regions. Higher means terrain must be more extreme to register as a mountain. Small changes result in large differences here. When the left side of the expression is greater, the datapoint is classified as a mountain. local mean elevation > broad mean elevation * threshold_factor

elevation_floorint

minimum inclusive elevation in meters. If a point has smaller location it will be clipped from result.

Returns:#

gidsnp.array

numpy array of gids in the mountains.