Changeset 27279
- Timestamp:
- Mar 12, 2010, 5:02:29 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/pswarp/src/pswarpTransformSources.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pswarp/src/pswarpTransformSources.c
r27096 r27279 60 60 61 61 int xGrid, yGrid; ///< Grid coordinates for local map 62 if (!pswarpMapGridSetGrid(sourceGrid, xIn + 0.5, yIn + 0.5, &xGrid, &yGrid)) {62 if (!pswarpMapGridSetGrid(sourceGrid, xIn, yIn, &xGrid, &yGrid)) { 63 63 psError(psErrorCodeLast(), false, "Unable to get grid coordinates for source at %f,%f\n", 64 64 xIn, yIn); … … 75 75 pswarpMap *map = sourceGrid->maps[xGrid][yGrid]; ///< Locally linear transformation 76 76 double xOut, yOut; ///< Output coordinates 77 if (!pswarpMapApply(&xOut, &yOut, map, xIn + 0.5, yIn + 0.5)) {77 if (!pswarpMapApply(&xOut, &yOut, map, xIn, yIn)) { 78 78 psError(psErrorCodeLast(), false, "Unable to transform coordinates for source at %f,%f\n", 79 79 xIn, yIn); … … 82 82 return false; 83 83 } 84 xOut += output->image->col0 - 0.5;85 yOut += output->image->row0 - 0.5;84 xOut += output->image->col0; 85 yOut += output->image->row0; 86 86 if (xOut < minX || xOut > maxX || yOut < minY || yOut > maxY) { 87 87 // It's not in the output image
Note:
See TracChangeset
for help on using the changeset viewer.
