20 lines
531 B
C++
20 lines
531 B
C++
#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)
|
|
{
|
|
this->width = width;
|
|
this->height = height;
|
|
this->cells = cells;
|
|
this->reference_system = reference_system;
|
|
|
|
}
|
|
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);
|
|
} |