diff options
author | Peter Baumann <baumann@floridita.rasdaman> | 2009-07-26 22:36:51 +0200 |
---|---|---|
committer | Peter Baumann <baumann@rasdaman.org> | 2009-07-26 22:12:24 +0200 |
commit | 01b34fa3871ad50fb68ff163034de51e1f4dd284 (patch) | |
tree | 1d9a91ec949197589fa62bc530cf959d267eaf96 /tilemgr | |
parent | 0eaf4e65aa962f165168edf47229c80e50774ae0 (diff) | |
download | rasdaman-upstream-01b34fa3871ad50fb68ff163034de51e1f4dd284.tar.gz rasdaman-upstream-01b34fa3871ad50fb68ff163034de51e1f4dd284.tar.xz rasdaman-upstream-01b34fa3871ad50fb68ff163034de51e1f4dd284.zip |
PB: adjust tile width if not matching with incoming tile size (from CJ)
Diffstat (limited to 'tilemgr')
-rw-r--r-- | tilemgr/tile.cc | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/tilemgr/tile.cc b/tilemgr/tile.cc index 627a336..7ea8693 100644 --- a/tilemgr/tile.cc +++ b/tilemgr/tile.cc @@ -800,8 +800,16 @@ Tile::copyTile(const r_Minterval &areaRes, const Tile *opTile, const r_Minterval cellOp = opTile->getContents(); cellRes = getContents(); - r_Dimension dim = areaRes.dimension(); - r_Range width = areaRes[dim-1].get_extent(); + r_Dimension dimRes = areaRes.dimension(); + r_Dimension dimOp = areaOp.dimension(); + + r_Range width = areaRes[dimRes-1].get_extent(); + if (width > areaOp[dimOp-1].get_extent()) + { + width = areaOp[dimOp-1].get_extent(); + RMInit::logOut << "RMDebug::module_tilemgr::copyTile() WARNING: had to adjust high dim width to " << width << endl; + } + unsigned int tsize = getType()->getSize(); unsigned int tsizeOp = opTile->getType()->getSize(); @@ -825,8 +833,8 @@ Tile::copyTile(const r_Minterval &areaRes, const Tile *opTile, const r_Minterval // copy entire line (continuous chunk in last dimension) in one go memcpy(resTileIter.getData(), opTileIter.getData(), width * tsize); // force overflow of last dimension - resTileIter.id[dim-1].pos += width; - opTileIter.id[dim-1].pos += width; + resTileIter.id[dimRes-1].pos += width; + opTileIter.id[dimOp-1].pos += width; // iterate; the last dimension will always overflow now ++resTileIter; ++opTileIter; |