contour-creator/src/contour_creator.hh

35 lines
1.0 KiB
C++
Raw Normal View History

#include <gdal/ogr_spatialref.h>
#include <gdal/ogr_spatialref.h>
#include <ogr_spatialref.h>
/**
@brief stores the contents of a tif file with float32 values
*/
class HeightMap
{
public:
float* data;
int width; //!< width of image in pixels
int height; //!< height of image in pixels
float min; //!< Minimum value in image
float max; //!< Maximum value in image
OGRSpatialReference reference_system;
HeightMap(const char* filepath);
float get_pixel(int x,int y);
};
/**
@brief stores the cells from marching squars for one elevation level
*/
class CellMap
{
public:
uint8_t* cells; //!< pointer to the first cell in the array. uint8_t is a 8 bit unsigned integer
int width; //!< width of image in cells
int height; //!< height of image in cells
OGRSpatialReference reference_system;
CellMap(int width, int height, uint8_t* cells, OGRSpatialReference reference_system);
int get_cell(int x,int y);
};