#include <gridpp.h>
Public Member Functions | |
| bool | get_box (float lat, float lon, int &Y1_out, int &X1_out, int &Y2_out, int &X2_out) const |
| ivec2 | get_closest_neighbours (float lat, float lon, int num, bool include_match=true) const |
| CoordinateType | get_coordinate_type () const |
| vec2 | get_elevs () const |
| vec2 | get_lafs () const |
| vec2 | get_lats () const |
| vec2 | get_lons () const |
| ivec | get_nearest_neighbour (float lat, float lon, bool include_match=true) const |
| ivec2 | get_neighbours (float lat, float lon, float radius, bool include_match=true) const |
| ivec2 | get_neighbours_with_distance (float lat, float lon, float radius, vec &distances, bool include_match=true) const |
| int | get_num_neighbours (float lat, float lon, float radius, bool include_match=true) const |
| Point | get_point (int y_index, int x_index) const |
| Grid () | |
| Grid (vec2 lats, vec2 lons, vec2 elevs=vec2(), vec2 lafs=vec2(), CoordinateType type=Geodetic) | |
| Initialize a new grid. More... | |
| ivec | size () const |
| Points | to_points () const |
| Convert grid to a vector of points. More... | |
Represents a 2D grid of locations and their metadata.
| gridpp::Grid::Grid | ( | ) |
| gridpp::Grid::Grid | ( | vec2 | lats, |
| vec2 | lons, | ||
| vec2 | elevs = vec2(), |
||
| vec2 | lafs = vec2(), |
||
| CoordinateType | type = Geodetic |
||
| ) |
Initialize a new grid.
| lats | 2D vector of latitudes [degrees] |
| lons | 2D vector of longitudes [degrees] |
| elevs | 2D vector of elevations [m] |
| lafs | 2D vector of land area fractions [1] |
| type | Coordinate type |
| bool gridpp::Grid::get_box | ( | float | lat, |
| float | lon, | ||
| int & | Y1_out, | ||
| int & | X1_out, | ||
| int & | Y2_out, | ||
| int & | X2_out | ||
| ) | const |
| ivec2 gridpp::Grid::get_closest_neighbours | ( | float | lat, |
| float | lon, | ||
| int | num, | ||
| bool | include_match = true |
||
| ) | const |
| CoordinateType gridpp::Grid::get_coordinate_type | ( | ) | const |
| vec2 gridpp::Grid::get_elevs | ( | ) | const |
| vec2 gridpp::Grid::get_lafs | ( | ) | const |
| vec2 gridpp::Grid::get_lats | ( | ) | const |
| vec2 gridpp::Grid::get_lons | ( | ) | const |
| ivec gridpp::Grid::get_nearest_neighbour | ( | float | lat, |
| float | lon, | ||
| bool | include_match = true |
||
| ) | const |
| ivec2 gridpp::Grid::get_neighbours | ( | float | lat, |
| float | lon, | ||
| float | radius, | ||
| bool | include_match = true |
||
| ) | const |
| ivec2 gridpp::Grid::get_neighbours_with_distance | ( | float | lat, |
| float | lon, | ||
| float | radius, | ||
| vec & | distances, | ||
| bool | include_match = true |
||
| ) | const |
| int gridpp::Grid::get_num_neighbours | ( | float | lat, |
| float | lon, | ||
| float | radius, | ||
| bool | include_match = true |
||
| ) | const |
| gridpp::Point gridpp::Grid::get_point | ( | int | y_index, |
| int | x_index | ||
| ) | const |
| ivec gridpp::Grid::size | ( | ) | const |
| Points gridpp::Grid::to_points | ( | ) | const |
Convert grid to a vector of points.
1.8.13