VAPOR3
3.9.4
include
vapor
GeoImageTMS.h
Go to the documentation of this file.
1
2
#ifndef _GeoImageTMS_h_
3
#define _GeoImageTMS_h_
4
5
#ifdef WIN32
6
#include <geotiff/xtiffio.h>
7
#include <geotiff/geotiff.h>
8
#else
9
#include <xtiffio.h>
10
#include <geotiff.h>
11
#endif
12
#include <sstream>
13
#include <fstream>
14
#include <sys/stat.h>
15
#include <
vapor/MyBase.h
>
16
#include <
vapor/UDUnitsClass.h
>
17
#include "
GeoTileMercator.h
"
18
#include "
GeoImage.h
"
19
20
namespace
VAPoR
{
21
26
//
27
class
RENDER_API
GeoImageTMS
:
public
GeoImage
{
28
public
:
29
GeoImageTMS
();
30
virtual
~GeoImageTMS
();
31
32
int
Initialize
(
string
path, vector<double> times);
33
34
void
SetLOD
(
int
lod);
35
36
unsigned
char
*
GetImage
(
size_t
ts,
size_t
&width,
size_t
&height);
37
38
unsigned
char
*
GetImage
(
size_t
ts,
const
double
pcsExtentsReq[4],
string
proj4StringReq,
size_t
maxWidthReq,
size_t
maxHeightReq,
double
pcsExtentsImg[4],
double
geoCornersImg[8],
39
string
&proj4StringImg,
size_t
&width,
size_t
&height);
40
41
private
:
42
string
_dir;
// path to TMS directory
43
int
_maxLOD;
// Maximum LOD available in TMS
44
int
_currentLOD;
// Current LOD in TMS
45
46
unsigned
char
*_texture;
// storage for texture image
47
size_t
_textureSize;
48
49
unsigned
char
*_tileBuf;
// storage for a single tile
50
size_t
_tileBufSize;
51
52
GeoTileMercator
*_geotile;
53
54
string
_defaultProj4String;
// proj4 string for global mercator
55
56
int
_tileSize(
string
dir,
size_t
tileX,
size_t
tileY,
int
lod,
size_t
&w,
size_t
&h);
57
58
int
_tileRead(
string
dir,
size_t
tileX,
size_t
tileY,
int
lod,
unsigned
char
*tile);
59
60
int
_getBestLOD(
const
double
myGeoExtentsData[4],
int
maxWidthReq,
int
maxHeightReq)
const
;
61
62
int
_getMap(
const
size_t
pixelSW[2],
const
size_t
pixelNE[2],
int
lod,
unsigned
char
*texture);
63
};
64
65
};
// namespace VAPoR
66
#endif
GeoImage.h
GeoTileMercator.h
MyBase.h
UDUnitsClass.h
VAPoR::GeoImageTMS
A class for managing OSGeo Tile Map Service Specification images.
Definition:
GeoImageTMS.h:27
VAPoR::GeoImageTMS::~GeoImageTMS
virtual ~GeoImageTMS()
VAPoR::GeoImageTMS::SetLOD
void SetLOD(int lod)
VAPoR::GeoImageTMS::GetImage
unsigned char * GetImage(size_t ts, size_t &width, size_t &height)
VAPoR::GeoImageTMS::GetImage
unsigned char * GetImage(size_t ts, const double pcsExtentsReq[4], string proj4StringReq, size_t maxWidthReq, size_t maxHeightReq, double pcsExtentsImg[4], double geoCornersImg[8], string &proj4StringImg, size_t &width, size_t &height)
VAPoR::GeoImageTMS::Initialize
int Initialize(string path, vector< double > times)
VAPoR::GeoImageTMS::GeoImageTMS
GeoImageTMS()
VAPoR::GeoImage
An abstract class for managing geo-referenced images.
Definition:
GeoImage.h:20
VAPoR::GeoTileMercator
Definition:
GeoTileMercator.h:33
RENDER_API
#define RENDER_API
Definition:
common.h:78
VAPoR
Definition:
AnnotationParams.h:33
Generated by
1.9.6