added funcs to get min/max of lon/lat values

This commit is contained in:
djaidjai committed 2024-05-07 15:46:29 +02:00
1 parent 5d9228e549
commit e674dde67b
2 files changed
+40

No files matched your search

@@ -55,6 +55,22 @@ int UVGrid::timeStep() const {
return times[1] - times[0]; return times[1] - times[0];
} }
double UVGrid::lonMin() const {
return this->lons.front();
}
double UVGrid::lonMax() const {
return this->lons.back();
}
double UVGrid::latMin() const {
return this->lats.front();
}
double UVGrid::latMax() const {
return this->lats.back();
}
void UVGrid::streamSlice(ostream &os, size_t t) { void UVGrid::streamSlice(ostream &os, size_t t) {
for (int x = 0; x < latSize; x++) { for (int x = 0; x < latSize; x++) {
for (int y = 0; y < lonSize; y++) { for (int y = 0; y < lonSize; y++) {
@@ -38,6 +38,30 @@ public:
*/ */
int timeStep() const; int timeStep() const;
/**
* Returns the lowest longitudinal value of grid.
* @return minimum longitude
*/
double lonMin() const;
/**
* Returns the highest longitudinal value of grid.
* @return maximum longitude
*/
double lonMax() const;
/**
* Returns the lowest latitudinal value of grid.
* @return minimum latitude
*/
double latMin() const;
/**
* Returns the higehst latitudinal value of grid.
* @return maximum latitude
*/
double latMax() const;
/** /**
* times, lats, lons are vector of length timeSize, latSize, lonSize respectively. * times, lats, lons are vector of length timeSize, latSize, lonSize respectively.
* The maintain the following invariant: * The maintain the following invariant:
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.