19 lines
522 B
C++
19 lines
522 B
C++
#include <cstdint>
|
|
#include <gdal/ogr_spatialref.h>
|
|
#include <ogr_spatialref.h>
|
|
#include "CaseMap.hh"
|
|
|
|
CaseMap::CaseMap(int width, int height, uint8_t* cases, OGRSpatialReference reference_system)
|
|
{
|
|
this->width = width;
|
|
this->height = height;
|
|
this->cases = cases;
|
|
this->reference_system = reference_system;
|
|
|
|
}
|
|
int CaseMap::get_case(int x, int y)
|
|
{
|
|
// all the cases are in an array of ints from left to right, top to bottom
|
|
int offset = ((this->width * y) + x);
|
|
return *(this->cases + offset);
|
|
} |