39 #ifndef RASDAMANHELPER2_H_
40 #define RASDAMANHELPER2_H_
53 #include "itkImageIOBase.h"
63 #include "gdal_priv.h"
98 void dropImage(std::string collname,
double oid);
110 r_Minterval
getImageSdom(std::string collname,
double localImgOID);
145 void getImageBuffer(std::string collname,
double localImgOID,
char* buf,
149 double insertImage(std::string collname,
char* buf,
150 r_Point& shift, r_Minterval& sdom,
bool bRowMajor2ColMajor,
151 std::string marraytypename, std::string tiling);
154 void updateImage(std::string collname,
double imgid,
155 char* buf, r_Point& shift, r_Minterval& sdom,
bool bRowMajor2ColMajor,
156 std::string marraytypename)
170 int ncols,
int nrows,
int nlayers)
throw (r_Error);
179 void colBuf2RowBuf(
char* colbuf,
char* rowbuf,
unsigned int pixelsize,
183 void colBuf2RowBuf(
char* colbuf,
char* rowbuf,
unsigned int pixelsize,
184 unsigned int nelem,
int ncols,
int nrows,
int nlayers);
196 int ncols,
int nrows,
int nlayers)
throw (r_Error);
205 void rowBuf2ColBuf(
char* rowbuf,
char* colbuf,
unsigned int pixelsize,
209 void rowBuf2ColBuf(
char* rowbuf,
char* colbuf,
unsigned int pixelsize,
210 unsigned int nelem,
int ncols,
int nrows,
int nlayers);
220 std::vector<int>
offset2index(
int offset, std::vector<int>& sdom);
224 std::vector<int>
offset2index(
int offset, r_Minterval& sdom);
226 int index2offset(r_Minterval& sdom, std::vector<int>& index);
227 int index2offset(std::vector<int>& sdom, std::vector<int>& index);
229 void createCollection(r_Database& db, r_Ref< r_Set< r_Ref< r_GMarray > > >& imgSet,
232 void createMDD(r_Ref< r_GMarray >& image, r_Minterval sdom,
269 string RATName)
throw (r_Error);
271 int writeNMRAT(std::string filename,
double oid,
int band)
throw(r_Error);
273 std::string collname,
283 int xpix,
int ypix,
int zpix);
std::string getTypePrefixString(r_Type::r_Type_Id rtype)
Definition: RasdamanConnector.h:49
int index2offset(r_Minterval &sdom, std::vector< int > &index)
r_Transaction m_transaction
private transaction object of this helper
Definition: RasdamanHelper2.h:299
void writeNMMetadata(string collname, long oid, long epsgcode, string crsname, double minx, double maxx, double miny, double maxy, double minz, double maxz, double csx, double csy, double csz, string pixeltype, double stats_min, double stats_max, double stats_mean, double stats_stddev, string RATName)
std::string getDataTypeString(r_Type::r_Type_Id rtype)
bool isNMMetaAvailable(void)
double insertImage(std::string collname, char *buf, r_Point &shift, r_Minterval &sdom, bool bRowMajor2ColMajor, std::string marraytypename, std::string tiling)
void dropCollection(std::string collname)
void rowBuf2ColBuf(char *rowbuf, char *colbuf, r_Type::r_Type_Id rtype, int ncols, int nrows, int nlayers)
double doesCollectionExist(std::string collname)
RasdamanHelper2(RasdamanConnector *rasconn)
long m_maximgsize
the maximum image (tile/buffer) size that
Definition: RasdamanHelper2.h:303
std::vector< int > offset2index(int offset, std::vector< int > &sdom)
Helper class for handling rasdaman collections and images.
Definition: RasdamanHelper2.h:66
r_Marray_Type * getMarrayType(std::string collname)
std::string getNMMetaCrsName(long oid)
bool checkDbConnection(void)
int writeNMRAT(std::string filename, double oid, int band)
void createCollection(r_Database &db, r_Ref< r_Set< r_Ref< r_GMarray > > > &imgSet, r_Type::r_Type_Id rtype, bool asCube)
r_Type::r_Type_Id getBaseTypeId(std::string collname)
unsigned int getBaseTypeElementCount(std::string collname)
RasdamanConnector * m_pRasconn
pointer to the connection object
Definition: RasdamanHelper2.h:297
void insertUserCollection(std::string collname, std::string colltypename)
void dropImage(std::string collname, double oid)
r_Minterval getImageSdom(std::string collname, double localImgOID)
void setMaxImgSize(long maximgsize)
Definition: RasdamanHelper2.h:243
void getImageBuffer(std::string collname, double localImgOID, char *buf, r_Minterval &sdom)
int getWCPSTypeId(r_Type::r_Type_Id rtype)
long getMaxImgSize(void)
Definition: RasdamanHelper2.h:239
unsigned int getBaseTypeSize(std::string collname)
r_Type_Id
Definition: raslib/type.hh:61
void colBuf2RowBuf(char *colbuf, char *rowbuf, r_Type::r_Type_Id rtype, int ncols, int nrows, int nlayers)
int writePSMetadata(std::string collname, std::string crs, r_Type::r_Type_Id rtype, int nbands, double xmin, double xmax, double ymin, double ymax, double zmax, double zmin, int xpix, int ypix, int zpix)
void updateImage(std::string collname, double imgid, char *buf, r_Point &shift, r_Minterval &sdom, bool bRowMajor2ColMajor, std::string marraytypename)
std::string getBaseTypeName(std::string collname)
void createMDD(r_Ref< r_GMarray > &image, r_Minterval sdom, r_Type::r_Type_Id rtype)
virtual ~RasdamanHelper2()
void insertCollection(std::string collname, r_Type::r_Type_Id rtype, bool asCube)
std::string getNumConstChar(r_Type::r_Type_Id rtype)
int deleteNMMetadata(std::string collname, double oid)
std::vector< double > getNMMetaGeoDomain(long oid)
int deletePSMetadata(std::string collname)
std::vector< double > getImageOIDs(std::string collname)
std::vector< double > getNMMetaCellSize(long oid)
unsigned int getTypeSize(r_Type::r_Type_Id rtype)