openModeller  Version 1.5.0
RemoteRaster.hh
Go to the documentation of this file.
1 
27 #ifndef _REMOTE_RASTERHH_
28 #define _REMOTE_RASTERHH_
29 
32 
33 #include <string>
34 #include <stdio.h>
35 
36 #define OM_REMOTE_RASTER_SUBDIR "r_layers"
37 
38 class GDALDataset;
39 class MapFormat;
40 
41 /*************************************************************/
42 /*********************** Remote Raster ***********************/
43 
44 struct CacheFile {
45 
46  const char *fileName;
47  FILE *stream;
48 };
49 
55 class dllexp RemoteRaster : public GdalRaster
56 {
57 public:
61  static Raster* CreateRasterCallback();
62 
67 
71  ~RemoteRaster();
72 
80  void createRaster( const std::string& str, int categ = 0 );
81 
89  #ifdef MPI_FOUND
90  void createRaster( const std::string& output_file, const std::string& file, const MapFormat& format );
91  #else
92  void createRaster( const std::string& str, const MapFormat& format );
93  #endif
94 
100  int put( Coord x, Coord y, Scalar val );
101 
107  int put( Coord x, Coord y );
108 
112  void finish();
113 
117  int deleteRaster();
118 
119 private:
120 
121  // Disable copying.
122  RemoteRaster( const RemoteRaster& );
124 
127  static size_t _writeData(void *buffer, size_t size, size_t nmemb, void *stream);
128 };
129 
130 #endif
void finish()
Definition: GdalRaster.cpp:873
double Scalar
Type of map values.
Definition: om_defs.hh:39
FILE * stream
Definition: RemoteRaster.hh:47
A common interface to rasters.
Definition: Raster.hh:44
GdalRaster & operator=(const GdalRaster &)
const char * fileName
Definition: RemoteRaster.hh:46
int deleteRaster()
Definition: GdalRaster.cpp:931
void createRaster(const std::string &file, int categ=0)
int put(Coord x, Coord y, Scalar val)
Definition: GdalRaster.cpp:710
double Coord
Type of map coordinates.
Definition: om_defs.hh:38