openModeller
Version 1.4.0
|
#include <RemoteRaster.hh>
Public Member Functions | |
RemoteRaster () | |
~RemoteRaster () | |
void | createRaster (const std::string &str, int categ=0) |
void | createRaster (const std::string &str, const MapFormat &format) |
int | put (Coord x, Coord y, Scalar val) |
int | put (Coord x, Coord y) |
void | finish () |
int | deleteRaster () |
Static Public Member Functions | |
static Raster * | CreateRasterCallback () |
static bool | isFromRejectedSource (const std::string &str) |
Private Member Functions | |
RemoteRaster (const RemoteRaster &) | |
RemoteRaster & | operator= (const RemoteRaster &) |
Static Private Member Functions | |
static size_t | _writeData (void *buffer, size_t size, size_t nmemb, void *stream) |
Fetches raster identifiers starting with http:// or https:// into local files to be opened with GDAL
Definition at line 55 of file RemoteRaster.hh.
RemoteRaster::RemoteRaster | ( | ) | [inline] |
RasterFactory needs an empty constructor.
Definition at line 66 of file RemoteRaster.hh.
Destructor
Definition at line 52 of file RemoteRaster.cpp.
RemoteRaster::RemoteRaster | ( | const RemoteRaster & | ) | [private] |
size_t RemoteRaster::_writeData | ( | void * | buffer, |
size_t | size, | ||
size_t | nmemb, | ||
void * | stream | ||
) | [static, private] |
Callback method for CURL when fetching data.
Definition at line 323 of file RemoteRaster.cpp.
References CacheFile::fileName, and CacheFile::stream.
void RemoteRaster::createRaster | ( | const std::string & | str, |
int | categ = 0 |
||
) | [virtual] |
Open a raster (read only). Method needed by RasterFactory.
str | WCS string pointing to the raster. |
categ | if != 0 this is a categorical map (ie it can't be interpolated). Othewise this is a continuos map. |
Needed by RasterFactory.
Reimplemented from GdalRaster.
void RemoteRaster::createRaster | ( | const std::string & | str, |
const MapFormat & | format | ||
) | [virtual] |
Create a new raster for projections. If called will throw an exception since the WCS driver in GDAL does not support creation. Method needed by RasterFactory.
str | WCS string pointing to the raster. |
format | Output format specification. |
Reimplemented from GdalRaster.
Raster * RemoteRaster::CreateRasterCallback | ( | ) | [static] |
RasterFactory calls this function to build a new Raster.
Definition at line 59 of file RemoteRaster.cpp.
int RemoteRaster::deleteRaster | ( | ) | [virtual] |
Method to delete a raster.
Reimplemented from GdalRaster.
Definition at line 313 of file RemoteRaster.cpp.
References Log::instance(), and Log::warn().
void RemoteRaster::finish | ( | ) | [virtual] |
Event that must be called to indicate when the projection is finished.
Reimplemented from GdalRaster.
Definition at line 303 of file RemoteRaster.cpp.
References Log::instance(), and Log::warn().
bool RemoteRaster::isFromRejectedSource | ( | const std::string & | str | ) | [static] |
Indicates if a remote raster comes from an untrusted source.
Definition at line 343 of file RemoteRaster.cpp.
References Settings::count(), Log::error(), Settings::getAll(), and Log::instance().
RemoteRaster& RemoteRaster::operator= | ( | const RemoteRaster & | ) | [private] |
int RemoteRaster::put | ( | Coord | x, |
Coord | y, | ||
Scalar | val | ||
) | [virtual] |
Put '*val' at the (x,y) coordinate. Returns 0 if (x,y) is out of range or the map is read only. supports only single band output files.
Reimplemented from GdalRaster.
Definition at line 283 of file RemoteRaster.cpp.
References Log::instance(), and Log::warn().
int RemoteRaster::put | ( | Coord | x, |
Coord | y | ||
) | [virtual] |
Put 'no data val' at the (x,y) coordinate. Returns 0 if (x,y) is out of range or the map is read only. supports only single band output files.
Reimplemented from GdalRaster.
Definition at line 293 of file RemoteRaster.cpp.
References Log::instance(), and Log::warn().