Stay organized with collectionsSave and categorize content based on your preferences.
Warps an image using an image of displacements.
Usage
Returns
Image.displace(displacement,mode,maxOffset)
Image
Argument
Type
Details
this:image
Image
The image to warp.
displacement
Image
An image containing displacement values. The first band is interpreted as the 'X' displacement and the second as the 'Y' displacement. Each displacement pixel is a [dx,dy] vector added to the pixel location to determine the corresponding pixel location in 'image'. Displacements are interpreted as meters in the default projection of the displacement image.
mode
String, default: "bicubic"
The interpolation mode to use. One of 'nearest_neighbor', 'bilinear', or 'bicubic'.
maxOffset
Float, default: null
The maximum absolute offset in the displacement image. Providing this may improve processing performance.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-07-13 UTC."],[[["\u003cp\u003eWarps an image using a displacement image, where pixel values in the displacement image represent the shift in position for the corresponding pixels in the original image.\u003c/p\u003e\n"],["\u003cp\u003eThe displacement image contains two bands, representing the X and Y displacement values for each pixel in the original image.\u003c/p\u003e\n"],["\u003cp\u003eUsers can control the interpolation mode for warping, choosing from options such as 'nearest_neighbor', 'bilinear', or 'bicubic'.\u003c/p\u003e\n"],["\u003cp\u003eOptionally, users can specify a maximum offset value for performance optimization during the warping process.\u003c/p\u003e\n"]]],[],null,["# ee.Image.displace\n\nWarps an image using an image of displacements.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|----------------------------------------------------------|---------|\n| Image.displace`(displacement, `*mode* `, `*maxOffset*`)` | Image |\n\n| Argument | Type | Details |\n|----------------|----------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| this: `image` | Image | The image to warp. |\n| `displacement` | Image | An image containing displacement values. The first band is interpreted as the 'X' displacement and the second as the 'Y' displacement. Each displacement pixel is a \\[dx,dy\\] vector added to the pixel location to determine the corresponding pixel location in 'image'. Displacements are interpreted as meters in the default projection of the displacement image. |\n| `mode` | String, default: \"bicubic\" | The interpolation mode to use. One of 'nearest_neighbor', 'bilinear', or 'bicubic'. |\n| `maxOffset` | Float, default: null | The maximum absolute offset in the displacement image. Providing this may improve processing performance. |"]]