#include <cstdint>
#include <gdal/ogr_spatialref.h>
#include <ogr_spatialref.h>
#include "contour_creator.hh"


CellMap::CellMap(int width, int height, uint8_t* cells, OGRSpatialReference reference_system, double* geotransform)
{
    this->width = width;
    this->height = height;
    this->cells = cells;
    this->reference_system = reference_system;
    this->geotransform = geotransform;
}
int CellMap::get_cell(int x, int y)
{
    // all the cells are in an array of ints from left to right, top to bottom
    int offset = ((this->width * y) + x);
    return *(this->cells + offset);
}