Ticket #1688: warpchunkorder.patch
| File warpchunkorder.patch, 1.2 kB (added by nowakpl, 5 months ago) |
|---|
-
alg/gdalwarpoperation.cpp
old new 583 583 * @return CE_None on success or CE_Failure if an error occurs. 584 584 */ 585 585 586 struct WarpChunk { 587 int dx, dy, dsx, dsy; 588 int sx, sy, ssx, ssy; 589 }; 590 591 bool OrderWarpChunk(const WarpChunk& a, const WarpChunk &b) { 592 if (a.dy < b.dy) return true; 593 else if (a.dy > b.dy) return false; 594 else if (a.dx < b.dx) return true; 595 else if (a.dx > b.dx) return false; 596 else return false; 597 } 598 586 599 CPLErr GDALWarpOperation::ChunkAndWarpImage( 587 600 int nDstXOff, int nDstYOff, int nDstXSize, int nDstYSize ) 588 601 … … 592 605 /* -------------------------------------------------------------------- */ 593 606 WipeChunkList(); 594 607 CollectChunkList( nDstXOff, nDstYOff, nDstXSize, nDstYSize ); 608 std::sort(reinterpret_cast<WarpChunk *>(panChunkList), reinterpret_cast<WarpChunk *>(panChunkList) + nChunkListCount, OrderWarpChunk); 595 609 596 610 /* -------------------------------------------------------------------- */ 597 611 /* Total up output pixels to process. */
