pvdeg.geospatial.apply_bounding_box#

pvdeg.geospatial.apply_bounding_box(meta_df: DataFrame, coord_1=None, coord_2=None, coords=None) array[source]#

Apply latitude-longitude rectangular bounding box to geospatial metadata.

Parameters:#

meta_dfpd.DataFrame

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

coord_1list, tuple

Top left corner of bounding box as lat-long coordinate pair as list or tuple.

coord_2list, tuple

Bottom right corner of bounding box as lat-long coordinate pair in list or tuple.

coordsnp.array

2d tall numpy array of [lat, long] pairs. Bounding box around the most extreme entries of the array. Alternative to providing top left and bottom right box corners. Could be used to select amongst a subset of data points. ex) Given all points for the planet, downselect based on the most extreme coordinates for the United States coastline information.

Returns:#

gidsnp.array

Array of gids associated with NSRDB entries inside the bounding box.