Announcement: On November 13, 2024, all users will need to use a Cloud project in order to access Earth Engine. After this date, continued individual access without a Cloud project will require an exception.
Stay organized with collections
Save and categorize content based on your preferences.
ee.Algorithms.CannyEdgeDetector
Applies the Canny edge detection algorithm to an image. The output is an image whose bands have the same names as the input bands, and in which non-zero values indicate edges, and the magnitude of the value is the gradient magnitude.
Threshold value. The pixel is only considered for edge detection if the gradient magnitude is higher than this threshold.
sigma
Float, default: 1
Sigma value for a gaussian filter applied before edge detection. 0 means apply no filtering.
ee.Algorithms.Collection
Returns a Collection containing the specified features.
Usage
Returns
ee.Algorithms.Collection(features)
FeatureCollection
Argument
Type
Details
features
List
The features comprising the collection.
ee.Algorithms.CrossCorrelation
Gives information on the quality of image registration between two (theoretically) co-registered images. The input is two images with the same number of bands. This function outputs an image composed of four bands of information. The first three are distances: the deltaX, deltaY, and the Euclidean distance for each pixel in imageA to the pixel which has the highest corresponding correlation coefficient in imageB. The fourth band is the value of the correlation coefficient for that pixel [-1 : +1].
Second image, must have the same number of bands as imageA.
maxGap
Integer
The greatest distance a pixel may shift in either X or Y.
windowSize
Integer
Size of the window to be compared.
maxMaskedFrac
Float, default: 0
The maximum fraction of pixels within the correlation window that are allowed to be masked. This test is applied at each offset location within the search region. For each offset, the overlapping image patches are compared and a correlation score computed. A pixel within these overlapping patches is considered masked if either of the patches is masked there. If the test fails at any single location in the search region, the output pixel for which the correlation is being computed is considered invalid, and will be masked.
ee.Algorithms.Date
Creates a Date.
Usage
Returns
ee.Algorithms.Date(value, timeZone)
Date
Argument
Type
Details
value
Object
A number (interpreted as milliseconds since 1970-01-01T00:00:00Z), or string such as '1996-01-01' or '1996-001' or '1996-01-01T08:00'.
timeZone
String, default: null
The time zone (e.g. 'America/Los_Angeles'); defaults to UTC.
ee.Algorithms.Describe
Describes an object using a simple JSON-compatible structure.
Usage
Returns
ee.Algorithms.Describe(input)
Object
Argument
Type
Details
input
Object
The object to describe.
ee.Algorithms.Dictionary
Constructs a dictionary.
Usage
Returns
ee.Algorithms.Dictionary(input)
Dictionary
Argument
Type
Details
input
Object, default: null
An object to convert to a dictionary. Either a JSON dictionary or a list of alternating key/value pairs. Keys must be strings.
Constructs a rectangle whose edges are lines of latitude and longitude.
The result is a planar WGS84 rectangle.
If (east - west) ≥ 360 then the longitude range will be normalized to -180 to +180; otherwise they will be treated as designating points on a circle (e.g. east may be numerically less than west).
The list of Points or pairs of Numbers in x,y order.
crs
Projection, default: null
The coordinate reference system of the coordinates. The default is the projection of the inputs, where Numbers are assumed to be EPSG:4326.
geodesic
Boolean, default: null
If false, edges are straight in the projection. If true, edges are curved to follow the shortest path on the surface of the Earth. The default is the geodesic state of the inputs, or true if the inputs are numbers.
ee.Algorithms.GeometryConstructors.LinearRing
Constructs a LinearRing from the given coordinates, automatically adding the first point at the end if the ring is not explicitly closed.
The list of Points or pairs of Numbers in x,y order.
crs
Projection, default: null
The coordinate reference system of the coordinates. The default is the projection of the inputs, where Numbers are assumed to be EPSG:4326.
geodesic
Boolean, default: null
If false, edges are straight in the projection. If true, edges are curved to follow the shortest path on the surface of the Earth. The default is the geodesic state of the inputs, or true if the inputs are numbers.
ee.Algorithms.GeometryConstructors.MultiGeometry
Constructs a MultiGeometry from the given list of geometry elements.
The coordinate reference system of the coordinates. The default is the projection of the inputs, where Numbers are assumed to be EPSG:4326.
geodesic
Boolean, default: null
If false, edges are straight in the projection. If true, edges are curved to follow the shortest path on the surface of the Earth. The default is the geodesic state of the inputs, or true if the inputs are numbers.
maxError
ErrorMargin, default: null
Max error when input geometry must be reprojected to an explicitly requested result projection or geodesic state.
The list of LineStrings, or to wrap a single LineString, the list of Points or pairs of Numbers in x,y order.
crs
Projection, default: null
The coordinate reference system of the coordinates. The default is the projection of the inputs, where Numbers are assumed to be EPSG:4326.
geodesic
Boolean, default: null
If false, edges are straight in the projection. If true, edges are curved to follow the shortest path on the surface of the Earth. The default is the geodesic state of the inputs, or true if the inputs are numbers.
maxError
ErrorMargin, default: null
Max error when input geometry must be reprojected to an explicitly requested result projection or geodesic state.
ee.Algorithms.GeometryConstructors.MultiPoint
Constructs a MultiPoint from the given coordinates.
A list of Polygons, or for one simple polygon, a list of Points or pairs of Numbers in x,y order.
crs
Projection, default: null
The coordinate reference system of the coordinates. The default is the projection of the inputs, where Numbers are assumed to be EPSG:4326.
geodesic
Boolean, default: null
If false, edges are straight in the projection. If true, edges are curved to follow the shortest path on the surface of the Earth. The default is the geodesic state of the inputs, or true if the inputs are numbers.
maxError
ErrorMargin, default: null
Max error when input geometry must be reprojected to an explicitly requested result projection or geodesic state.
evenOdd
Boolean, default: true
If true, polygon interiors will be determined by the even/odd rule, where a point is inside if it crosses an odd number of edges to reach a point at infinity. Otherwise polygons use the left-inside rule, where interiors are on the left side of the shell's edges when walking the vertices in the given order.
ee.Algorithms.GeometryConstructors.Point
Constructs a new Point from the given x,y coordinates.
A list of LinearRings where the first is the shell and the rest are holes, or for a simple polygon, a list of Points or pairs of Numbers in x,y order.
crs
Projection, default: null
The coordinate reference system of the coordinates. The default is the projection of the inputs, where Numbers are assumed to be EPSG:4326.
geodesic
Boolean, default: null
If false, edges are straight in the projection. If true, edges are curved to follow the shortest path on the surface of the Earth. The default is the geodesic state of the inputs, or true if the inputs are numbers.
maxError
ErrorMargin, default: null
Max error when input geometry must be reprojected to an explicitly requested result projection or geodesic state.
evenOdd
Boolean, default: true
If true, polygon interiors will be determined by the even/odd rule, where a point is inside if it crosses an odd number of edges to reach a point at infinity. Otherwise polygons use the left-inside rule, where interiors are on the left side of the shell's edges when walking the vertices in the given order.
ee.Algorithms.GeometryConstructors.Rectangle
Constructs a rectangular polygon from the given corner points.
The low and then high corners of the Rectangle, as a list of Points or pairs of Numbers in x,y order.
crs
Projection, default: null
The coordinate reference system of the coordinates. The default is the projection of the inputs, where Numbers are assumed to be EPSG:4326.
geodesic
Boolean, default: null
If false, edges are straight in the projection. If true, edges are curved to follow the shortest path on the surface of the Earth. The default is the geodesic state of the inputs, or true if the inputs are numbers.
evenOdd
Boolean, default: true
If true, polygon interiors will be determined by the even/odd rule, where a point is inside if it crosses an odd number of edges to reach a point at infinity. Otherwise polygons use the left-inside rule, where interiors are on the left side of the shell's edges when walking the vertices in the given order.
ee.Algorithms.HillShadow
Creates a shadow band, with output 1 where pixels are illumunated and 0 where they are shadowed. Takes as input an elevation band, azimuth and zenith of the light source in degrees, a neighborhood size, and whether or not to apply hysteresis when a shadow appears. Currently, this algorithm only works for Mercator projections, in which light rays are parallel.
The image to which to apply the shadow algorithm, in which each pixel should represent an elevation in meters.
azimuth
Float
Azimuth in degrees.
zenith
Float
Zenith in degrees.
neighborhoodSize
Integer, default: 0
Neighborhood size.
hysteresis
Boolean, default: false
Use hysteresis. Less physically accurate, but may generate better images.
ee.Algorithms.HoughTransform
Applies the Hough transform to an image. For every input band, outputs a band where lines are detected by thresholding the Hough transform with a value of lineThreshold. The output band is named [input]_lines, where [input] is the name of the original band. The defaults provided for the parameters are intended as a starting point for use with UINT8 images.
The size of the grid over which to perform the computation.
inputThreshold
Float, default: 64
Value threshold for input image. Pixels equal to or above this value are considered active.
lineThreshold
Float, default: 72
Threshold for line detection. Values equal to or above this threshold on the Hough transform are considered to be detected lines.
smooth
Boolean, default: true
Whether to smooth the Hough transform before line detection.
ee.Algorithms.If
Selects one of its inputs based on a condition, similar to an if-then-else construct.
Usage
Returns
ee.Algorithms.If(condition, trueCase, falseCase)
Object
Argument
Type
Details
condition
Object, default: null
The condition that determines which result is returned. If this is not a boolean, it is interpreted as a boolean by the following rules:
Numbers that are equal to 0 or a NaN are false.
Empty strings, lists and dictionaries are false.
Null is false.
Everything else is true.
trueCase
Object, default: null
The result to return if the condition is true.
falseCase
Object, default: null
The result to return if the condition is false.
ee.Algorithms.Image.Segmentation.GMeans
Performs G-Means clustering on the input image. Iteratively applies k-means followed by a normality test to automatically determine the number of clusters to use. The output contains a 'clusters' band containing the integer ID of the cluster that each pixel belongs to. The algorithm can work either on a fixed grid of non-overlapping cells (gridSize, which can be smaller than a tile) or on tiles with overlap (neighborhoodSize). The default is to use tiles with no overlap. Clusters in one cell or tile are unrelated to clusters in another. Any cluster that spans a cell or tile boundary may receive two different labels in the two halves. Any input pixels with partial masks are fully masked in the output. This algorithm is only expected to perform well for images with a narrow dynamic range (i.e. bytes or shorts).
See: G. Hamerly and C. Elkan. 'Learning the k in k-means'. NIPS, 2003.
Neighborhood size. The amount to extend each tile (overlap) when computing the clusters. This option is mutually exclusive with gridSize.
gridSize
Integer, default: null
Grid cell-size. If greater than 0, kMeans will be run independently on cells of this size. This has the effect of limiting the size of any cluster to be gridSize or smaller. This option is mutually exclusive with neighborhoodSize.
uniqueLabels
Boolean, default: true
If true, clusters are assigned unique IDs. Otherwise, they repeat per tile or grid cell.
ee.Algorithms.Image.Segmentation.KMeans
Performs K-Means clustering on the input image. Outputs a 1-band image containing the ID of the cluster that each pixel belongs to. The algorithm can work either on a fixed grid of non-overlapping cells (gridSize, which can be smaller than a tile) or on tiles with overlap (neighborhoodSize). The default is to use tiles with no overlap. Clusters in one cell or tile are unrelated to clusters in another. Any cluster that spans a cell or tile boundary may receive two different labels in the two halves. Any input pixels with partial masks are fully masked in the output.
Neighborhood size. The amount to extend each tile (overlap) when computing the clusters. This option is mutually exclusive with gridSize.
gridSize
Integer, default: null
Grid cell-size. If greater than 0, kMeans will be run independently on cells of this size. This has the effect of limiting the size of any cluster to be gridSize or smaller. This option is mutually exclusive with neighborhoodSize.
forceConvergence
Boolean, default: false
If true, an error is thrown if convergence is not achieved before numIterations.
uniqueLabels
Boolean, default: true
If true, clusters are assigned unique IDs. Otherwise, they repeat per tile or grid cell.
ee.Algorithms.Image.Segmentation.SNIC
Superpixel clustering based on SNIC (Simple Non-Iterative Clustering). Outputs a band of cluster IDs and the per-cluster averages for each of the input bands. If the 'seeds' image isn't provided as input, the output will include a 'seeds' band containing the generated seed locations. See: Achanta, Radhakrishna and Susstrunk, Sabine, 'Superpixels and Polygons using Simple Non-Iterative Clustering', CVPR, 2017.
If provided, any non-zero valued pixels are used as seed locations. Pixels that touch (as specified by 'connectivity') are considered to belong to the same cluster.
Calibrates Landsat DN to TOA reflectance and brightness temperature for Landsat and similar data. For recently-acquired scenes calibration coefficients are extracted from the image metadata; for older scenes the coefficients are derived from:
Chander, Gyanesh, Brian L. Markham, and Dennis L. Helder. "Summary of current radiometric calibration coefficients for Landsat MSS, TM, ETM+, and EO-1 ALI sensors." Remote sensing of environment 113.5 (2009): 893-903.
Usage
Returns
ee.Algorithms.Landsat.TOA(input)
Image
Argument
Type
Details
input
Image
The Landsat image to process.
ee.Algorithms.Landsat.calibratedRadiance
Calibrates each band of an image by applying linear transformation with slope RADIANCE_MULT_BAND_N and y-intercept RADIANCE_ADD_BAND_N; these values are extracted from the image metadata.
Usage
Returns
ee.Algorithms.Landsat.calibratedRadiance(image)
Image
Argument
Type
Details
image
Image
The input Landsat image.
ee.Algorithms.Landsat.pathRowLimit
Limits requests to an ImageCollection of Landsat scenes to return a controllable number of the best scenes for each request. This is intended for use with statistical algorithms like median composites that need a certain amount of good data to perform well, but that do not benefit substantially from additional data beyond that while becoming needlessly expensive. The default arguments select approximately one year's worth of good data.
Note that in rare circumstances, when the tile boundary aligns with a Landsat WRS cell boundary, queries for adjacent tiles may yield conflicting results. This is why it is important that this algorithm only be used with statistical methods that can tolerate these inconsistencies.
The max number of scenes to return per request total.
ee.Algorithms.Landsat.simpleCloudScore
Computes a simple cloud-likelihood score in the range [0,100] using a combination of brightness, temperature, and NDSI. This is not a robust cloud detector, and is intended mainly to compare multiple looks at the same point for relative cloud likelihood.
Usage
Returns
ee.Algorithms.Landsat.simpleCloudScore(image)
Image
Argument
Type
Details
image
Image
The Landsat TOA image to process.
ee.Algorithms.Landsat.simpleComposite
Computes a Landsat TOA composite from a collection of raw Landsat scenes. It applies standard TOA calibration and then assigns a cloud score to each pixel using the SimpleLandsatCloudScore algorithm. It selects the lowest possible range of cloud scores at each point and then computes per-band percentile values from the accepted pixels. This algorithm also uses the LandsatPathRowLimit algorithm to select only the least-cloudy scenes in regions where more than maxDepth input scenes are available.
The percentile value to use when compositing each band.
cloudScoreRange
Integer, default: 10
The size of the range of cloud scores to accept per pixel.
maxDepth
Integer, default: 40
An approximate limit on the maximum number of scenes used to compute each pixel.
asFloat
Boolean, default: false
If true, output bands are in the same units as the Landsat.TOA algorithm; if false, TOA values are converted to uint8 by multiplying by 255 (reflective bands) or subtracting 100 (thermal bands) and rounding to the nearest integer.
ee.Algorithms.ObjectType
Returns a string representing the type of the given object.
Usage
Returns
ee.Algorithms.ObjectType(value)
String
Argument
Type
Details
value
Object, default: null
The object to get the type of.
ee.Algorithms.ProjectionTransform
Transforms the geometry of a feature to a specific projection.
The feature the geometry of which is being converted.
proj
Projection, optional
The target projection. Defaults to WGS84. If this has a geographic CRS, the edges of the geometry will be interpreted as geodesics. Otherwise they will be interpreted as straight lines in the projection.
maxError
ErrorMargin, default: null
The maximum projection error.
ee.Algorithms.Sentinel2.CDI
Computes the Cloud Displacement Index (CDI) from a Sentinel-2 Level 1C image. CDI is a measure of the optical separation in elevated objects due to sensor parallax. Returns a floating point band named "cdi".
See Frantz, D., Hass, E., Uhl, A., Stoffels, J., & Hill, J. (2018). Improvement of the Fmask algorithm for Sentinel-2 images: Separating clouds from bright surfaces based on parallax effects. Remote sensing of environment, 215, 471-481.
Usage
Returns
ee.Algorithms.Sentinel2.CDI(source)
Image
Argument
Type
Details
source
Image
The source image.
ee.Algorithms.String
Converts the input to a string.
Usage
Returns
ee.Algorithms.String(input)
String
Argument
Type
Details
input
Object
The object to convert.
ee.Algorithms.TemporalSegmentation.Ccdc
Implements the Continuous Change Detection and Classification temporal breakpoint algorithm. This algorithm finds temporal breakpoints in an image collection by iteratively fitting harmonic functions to the data. Fit coefficients are produced for all input bands, but the bands used for breakpoint detection can be specified with the 'breakpointBands' argument.
For more details, see Zhu, Z. and Woodcock, C.E., 2014. Continuous change detection and classification of land cover using all available Landsat data. Remote sensing of Environment, 144, pp.152-171.
The name or index of the bands to use for change detection. If unspecified, all bands are used.
tmaskBands
List, default: null
The name or index of the bands to use for iterative TMask cloud detection. These are typically the green band and the SWIR1 band. If unspecified, TMask is not used. If specified, 'tmaskBands' must be included in 'breakpointBands'.
minObservations
Integer, default: 6
The number of observations required to flag a change.
chiSquareProbability
Float, default: 0.99
The chi-square probability threshold for change detection in the range of [0, 1]
minNumOfYearsScaler
Float, default: 1.33
Factors of minimum number of years to apply new fitting.
dateFormat
Integer, default: 0
The time representation to use during fitting: 0 = jDays, 1 = fractional years, 2 = unix time in milliseconds. The start, end and break times for each temporal segment will be encoded this way.
lambda
Float, default: 20
Lambda for LASSO regression fitting. If set to 0, regular OLS is used instead of LASSO.
maxIterations
Integer, default: 25000
Maximum number of runs for LASSO regression convergence. If set to 0, regular OLS is used instead of LASSO.
ee.Algorithms.TemporalSegmentation.Ewmacd
Exponentially Weighted Moving Average Change Detection. This algorithm computes a harmonic model for the 'training' portion of the input data and subtracts that from the original results. The residuals are then subjected to Shewhart X-bar charts and an exponentially weighted moving average. Disturbed pixels are indicated when the charts signal a deviation from the given control limits.
The output is a 5 band image containing the bands:
ewma: a 1D array of the EWMA score for each input image. Negative values represent disturbance and positive values represent recovery.
harmonicCoefficients: A 1-D array of the computed harmonic coefficient pairs. The coefficients are ordered as [constant, sin0, cos0, sin1, cos1...]
rmse: the RMSE from the harmonic regression.
rSquared: r-squared value from the harmonic regression.
residuals: 1D array of residuals from the harmonic regression.
See: Brooks, E.B., Wynne, R.H., Thomas, V.A., Blinn, C.E. and Coulston, J.W., 2014. On-the-fly massively multitemporal change detection using statistical quality control charts and Landsat data. IEEE Transactions on Geoscience and Remote Sensing, 52(6), pp.3316-3332.
Collection from which to extract EWMA. This collection is expected to contain 1 image for each year and be sorted temporally.
vegetationThreshold
Float
Threshold for vegetation. Values below this are considered non-vegetation.
trainingStartYear
Integer
Start year of training period, inclusive.
trainingEndYear
Integer
End year of training period, exclusive.
harmonicCount
Integer, default: 2
Number of harmonic function pairs (sine and cosine) used.
xBarLimit1
Float, default: 1.5
Threshold for initial training xBar limit.
xBarLimit2
Integer, default: 20
Threshold for running xBar limit.
lambda
Float, default: 0.3
The 'lambda' tuning parameter weighting new years vs the running average.
lambdasigs
Float, default: 3
EWMA control bounds, in units of standard deviations.
rounding
Boolean, default: true
Should rounding be performed for EWMA
persistence
Integer, default: 3
Minimum number of observations needed to consider a change.
ee.Algorithms.TemporalSegmentation.LandTrendr
Landsat-based detection of Trends in Disturbance and Recovery: temporally segments a time-series of images by extracting the spectral trajectories of change over time. The first band of each image is used to find breakpoints, and those breakpoints are used to perform fitting on all subsequent bands. The breakpoints are returned as a 2-D matrix of 4 rows and as many columns as images. The first two rows are the original X and Y values. The third row contains the Y values fitted to the estimated segments, and the 4th row contains a 1 if the corresponding point was used as a segment vertex or 0 if not. Any additional fitted bands are appended as rows in the output. Breakpoint fitting assumes that increasing values represent disturbance and decreasing values represent recovery.
See: Kennedy, R.E., Yang, Z. and Cohen, W.B., 2010. Detecting trends in forest disturbance and recovery using yearly Landsat time series: 1. LandTrendr - Temporal segmentation algorithms. Remote Sensing of Environment, 114(12), pp.2897-2910.
Yearly time-series from which to extract breakpoints. The first band is usedto find breakpoints, and all subsequent bands are fitted using those breakpoints.
maxSegments
Integer
Maximum number of segments to be fitted on the time series.
spikeThreshold
Float, default: 0.9
Threshold for dampening the spikes (1.0 means no dampening).
vertexCountOvershoot
Integer, default: 3
The initial model can overshoot the maxSegments + 1 vertices by this amount. Later, it will be pruned down to maxSegments + 1.
preventOneYearRecovery
Boolean, default: false
Prevent segments that represent one year recoveries.
recoveryThreshold
Float, default: 0.25
If a segment has a recovery rate faster than 1/recoveryThreshold (in years), then the segment is disallowed.
pvalThreshold
Float, default: 0.1
If the p-value of the fitted model exceeds this threshold, then the current model is discarded and another one is fitted using the Levenberg-Marquardt optimizer.
bestModelProportion
Float, default: 0.75
Allows models with more vertices to be chosen if their p-value is no more than (2 - bestModelProportion) times the p-value of the best model.
minObservationsNeeded
Integer, default: 6
Min observations needed to perform output fitting.
ee.Algorithms.TemporalSegmentation.LandTrendrFit
Interpolates a time series using a set of LandTrendr breakpoint years. For each input band in the timeSeries, outputs a new 1D array-valued band containing the input values interpolated between the breakpoint times identified by the vertices image. See the LandTrendr Algorithm for more details.
Runs breakpoint detection, similar to R's strucchange::breakpoints function.
Each pixel is fit by a piecewise linear/harmonic model, of the form
Y = A + B * t + C * cos(2 * pi * season(t)) + D * sin(2 * pi * season(t)) + E * cos(4 * pi * season(t)) + F * sin(4 * pi * season(t)) + ...
In this equation, 't' is the start time of the image in the format specified by 'dateFormat', and 'season(t)' is the fractional year of that start time (see the description of dateFormat for details). The maximum order of the harmonic terms is determined by 'seasonalModelOrder'.
The result is an image containing two bands, plus two bands per band in the input:
tStart, tEnd: each of these holds a 1D array, with one entry per segment in the piecewise linear fit; each entry contains the start time of the first or last images in that segment. By default the values here are in fractional years, for easy use with the coefficients.
coefs_BANDNAME: there will be one such output band per input band. Each of these holds a 2D array, with one row per segment. The values in that row are the coefficients of the linear fit for that segment - that is, the values of A, B, C, ... for that segment. As described above, the values here are affected by 'dateFormat'
.rmse_BANDNAME: there will be one such output band per input band. This holds a 1D array, with one entry per segment. The value for each segment is the RMSE for the linear fit residuals for that segment.
Collection of images on which to detect breakpoints.
breakpointBand
String, default: null
The name of the band to use for breakpoint detection. Optional only if the images have only a single band.
seasonalModelOrder
Integer, default: 3
The order of the harmonic seasonal model.
minSpacing
Float, default: 0.15
The minimum spacing between breakpoints. If this is between 0 and 1 (exclusive), it will be interpreted as a fraction of the number of images in the collection. Otherwise, it will be interpreted as a number of samples.
maxBreaks
Integer, default: 0
The maximum number of breakpoints.
dateFormat
Integer, default: 1
The time representation to use in the results: 1 = fractional years, 2 = unix time in milliseconds. This affects the values in the tStart and tEnd bands and the 't' values used in the harmonic model. The fractional years used here and in that model are defined as the fractional number of 365.25-day years since 1 Jan 1970.
ee.Algorithms.TemporalSegmentation.VCT
Vegetation Change Tracker, an automated approach for reconstructing recent forest disturbance history using dense Landsat time series stacks.
The output is a 2D array per pixel containing 6 rows x N years. The output rows contain: input years, VCT landcover mask, magnitude in term of the UD composite, magnitude of distubance in B4, magnitude of distubance in NDVI, magnitude of distubance in dNBR.
See: Huang, C., Goward, S.N., Masek, J.G., Thomas, N., Zhu, Z. and Vogelmann, J.E., 2010. An automated approach for reconstructing recent forest disturbance history using dense Landsat time series stacks. Remote Sensing of Environment, 114(1), pp.183-198.
Collection from which to extract VCT disturbances, containing the bands: B3, B4, B5, B7, thermal, NDVI, DNBR and COMP. This collection is expected to contain 1 image for each year, sorted by time.
landCover
ImageCollection
Collection from which to extract VCT masks. This collection is expected to contain 1 image for each image in the timeSeries, sorted by time.
maxUd
Float, default: 4
Maximum Z-score composite value for detecting forest.
minNdvi
Float, default: 0.45
Minimum NDVI value for forest.
forThrMax
Float, default: 3
Maximum threshold for forest.
nYears
Integer, default: 30
Maximum number of years.
ee.Algorithms.TemporalSegmentation.Verdet
Vegetation Regeneration and Disturbance Estimates through Time, forest change detection algorithm. This algorithm generates a yearly clear-sky composite from satellite imagery, calculates a spectral vegetation index for each pixel in that composite, spatially segments the vegetation index image into patches, temporally divides the time series into differently sloped segments, and then labels those segments as disturbed, stable, or regenerating. Segmentation at both the spatial and temporal steps are performed using total variation regularization.
The output consists of a 1D array per pixel containing the slope of fitted trend lines. Negative values indicate disturbance and positive values regeneration.
See: Hughes, M.J., Kaylor, S.D. and Hayes, D.J., 2017. Patch-based forest change detection from Landsat time series. Forests, 8(5), p.166.
Collection from which to extract VeRDET scores. This collection is expected to contain 1 image for each year, sorted temporally.
tolerance
Float, default: 0.0001
Convergence tolerance.
alpha
Float, default: 0.03333333333333333
Regularization parameter for segmentation.
nRuns
Integer, default: 100
Maximum number of runs for convergence.
ee.Algorithms.Terrain
Calculates slope, aspect, and a simple hillshade from a terrain DEM.
Expects an image containing either a single band of elevation, measured in meters, or if there's more than one band, one named 'elevation'. Adds output bands named 'slope' and 'aspect' measured in degrees plus an unsigned byte output band named 'hillshade' for visualization. All other bands and metadata are copied from the input image. The local gradient is computed using the 4-connected neighbors of each pixel, so missing values will occur around the edges of an image.
Usage
Returns
ee.Algorithms.Terrain(input)
Image
Argument
Type
Details
input
Image
An elevation image, in meters.
ee.Array
Returns an array with the given coordinates.
Usage
Returns
ee.Array(values, pixelType)
Array
Argument
Type
Details
values
Object
An existing array to cast, or a number/list of numbers/nested list of numbers of any depth to create an array from. For nested lists, all inner arrays at the same depth must have the same length, and numbers may only be present at the deepest level.
pixelType
PixelType, default: null
The type of each number in the values argument. If the pixel type is not provided, it will be inferred from the numbers in 'values'. If there aren't any numbers in 'values', this type must be provided.
ee.Array.abs
On an element-wise basis, computes the absolute value of the input.
Usage
Returns
Array.abs()
Array
Argument
Type
Details
this: input
Array
The input array.
ee.Array.accum
Accumulates elements of an array along the given axis, by setting each element of the result to the reduction of elements along that axis up to and including the current position. May be used to make a cumulative sum, a monotonically increasing sequence, etc.
Usage
Returns
Array.accum(axis, reducer)
Array
Argument
Type
Details
this: array
Array
Array to accumulate.
axis
Integer
Axis along which to perform the accumulation.
reducer
Reducer, default: null
Reducer to accumulate values. Default is SUM, to produce the cumulative sum of each vector along the given axis.
ee.Array.acos
On an element-wise basis, computes the arc cosine in radians of the input.
Usage
Returns
Array.acos()
Array
Argument
Type
Details
this: input
Array
The input array.
ee.Array.add
On an element-wise basis, adds the first value to the second.
Usage
Returns
Array.add(right)
Array
Argument
Type
Details
this: left
Array
The left-hand value.
right
Array
The right-hand value.
ee.Array.and
On an element-wise basis, returns 1 if and only if both values are non-zero.
Usage
Returns
Array.and(right)
Array
Argument
Type
Details
this: left
Array
The left-hand value.
right
Array
The right-hand value.
ee.Array.argmax
Returns the position, as a list of indices in each array axis, of the maximum value in an array, or null if the array is empty. If there are multiple occurrences of the maximum, returns the position of the first.
Usage
Returns
Array.argmax()
List
Argument
Type
Details
this: array
Array
ee.Array.asin
On an element-wise basis, computes the arc sine in radians of the input.
Usage
Returns
Array.asin()
Array
Argument
Type
Details
this: input
Array
The input array.
ee.Array.atan
On an element-wise basis, computes the arc tangent in radians of the input.
Usage
Returns
Array.atan()
Array
Argument
Type
Details
this: input
Array
The input array.
ee.Array.atan2
On an element-wise basis, calculates the angle formed by the 2D vector [x, y].
Usage
Returns
Array.atan2(right)
Array
Argument
Type
Details
this: left
Array
The left-hand value.
right
Array
The right-hand value.
ee.Array.bitCount
On an element-wise basis, calculates the number of one-bits in the 64-bit two's complement binary representation of the input.
Usage
Returns
Array.bitCount()
Array
Argument
Type
Details
this: input
Array
The input array.
ee.Array.bitsToArray
Convert the bits of an integer to an Array. The array has as many elements as the position of the highest set bit, or a single 0 for a value of 0.
Usage
Returns
ee.Array.bitsToArray(input)
Array
Argument
Type
Details
input
Number
ee.Array.bitwiseAnd
On an element-wise basis, calculates the bitwise AND of the input values.
Usage
Returns
Array.bitwiseAnd(right)
Array
Argument
Type
Details
this: left
Array
The left-hand value.
right
Array
The right-hand value.
ee.Array.bitwiseNot
On an element-wise basis, calculates the bitwise NOT of the input, in the smallest signed integer type that can hold the input.
Usage
Returns
Array.bitwiseNot()
Array
Argument
Type
Details
this: input
Array
The input array.
ee.Array.bitwiseOr
On an element-wise basis, calculates the bitwise OR of the input values.
Usage
Returns
Array.bitwiseOr(right)
Array
Argument
Type
Details
this: left
Array
The left-hand value.
right
Array
The right-hand value.
ee.Array.bitwiseXor
On an element-wise basis, calculates the bitwise XOR of the input values.
Usage
Returns
Array.bitwiseXor(right)
Array
Argument
Type
Details
this: left
Array
The left-hand value.
right
Array
The right-hand value.
ee.Array.byte
On an element-wise basis, casts the input value to an unsigned 8-bit integer.
Usage
Returns
Array.byte()
Array
Argument
Type
Details
this: input
Array
The input array.
ee.Array.cat
Concatenates multiple arrays into a single array along the given axis. Each array must have the same dimensionality and the same length on all axes except the concatenation axis.
Usage
Returns
ee.Array.cat(arrays, axis)
Array
Argument
Type
Details
arrays
List
Arrays to concatenate.
axis
Integer, default: 0
Axis to concatenate along.
ee.Array.cbrt
On an element-wise basis, computes the cubic root of the input.
Usage
Returns
Array.cbrt()
Array
Argument
Type
Details
this: input
Array
The input array.
ee.Array.ceil
On an element-wise basis, computes the smallest integer greater than or equal to the input.
Usage
Returns
Array.ceil()
Array
Argument
Type
Details
this: input
Array
The input array.
ee.Array.cos
On an element-wise basis, computes the cosine of the input in radians.
Usage
Returns
Array.cos()
Array
Argument
Type
Details
this: input
Array
The input array.
ee.Array.cosh
On an element-wise basis, computes the hyperbolic cosine of the input.
Usage
Returns
Array.cosh()
Array
Argument
Type
Details
this: input
Array
The input array.
ee.Array.cut
Cut an array along one or more axes.
Usage
Returns
Array.cut(position)
Array
Argument
Type
Details
this: array
Array
The array to cut.
position
List
Cut an array along one or more axes. The positions args specifies either a single value for each axis of the array, or -1, indicating the whole axis. The output will be an array that has the same dimensions as the input, with a length of 1 on each axis that was not -1 in the positions array.
ee.Array.digamma
On an element-wise basis, computes the digamma function of the input.
Usage
Returns
Array.digamma()
Array
Argument
Type
Details
this: input
Array
The input array.
ee.Array.divide
On an element-wise basis, divides the first value by the second, returning 0 for division by 0.
Usage
Returns
Array.divide(right)
Array
Argument
Type
Details
this: left
Array
The left-hand value.
right
Array
The right-hand value.
ee.Array.dotProduct
Compute the dot product between two 1-D arrays.
Usage
Returns
Array.dotProduct(array2)
Number
Argument
Type
Details
this: array1
Array
The first 1-D array.
array2
Array
The second 1-D array.
ee.Array.double
On an element-wise basis, casts the input value to a 64-bit float.
Usage
Returns
Array.double()
Array
Argument
Type
Details
this: input
Array
The input array.
ee.Array.eigen
Computes the real eigenvectors and eigenvalues of a square 2D array of A rows and A columns. Returns an array with A rows and A+1 columns, where each row contains an eigenvalue in the first column, and the corresponding eigenvector in the remaining A columns. The rows are sorted by eigenvalue, in descending order.
This implementation uses DecompositionFactory.eig() from https://ejml.org.
Usage
Returns
Array.eigen()
Array
Argument
Type
Details
this: input
Array
A square, 2D array from which to compute the eigenvalue decomposition.
ee.Array.eq
On an element-wise basis, returns 1 if and only if the first value is equal to the second.
Usage
Returns
Array.eq(right)
Array
Argument
Type
Details
this: left
Array
The left-hand value.
right
Array
The right-hand value.
ee.Array.erf
On an element-wise basis, computes the error function of the input.
Usage
Returns
Array.erf()
Array
Argument
Type
Details
this: input
Array
The input array.
ee.Array.erfInv
On an element-wise basis, computes the inverse error function of the input.
Usage
Returns
Array.erfInv()
Array
Argument
Type
Details
this: input
Array
The input array.
ee.Array.erfc
On an element-wise basis, computes the complementary error function of the input.
Usage
Returns
Array.erfc()
Array
Argument
Type
Details
this: input
Array
The input array.
ee.Array.erfcInv
On an element-wise basis, computes the inverse complementary error function of the input.
Usage
Returns
Array.erfcInv()
Array
Argument
Type
Details
this: input
Array
The input array.
ee.Array.exp
On an element-wise basis, computes the Euler's number e raised to the power of the input.
Usage
Returns
Array.exp()
Array
Argument
Type
Details
this: input
Array
The input array.
ee.Array.first
On an element-wise basis, selects the value of the first value.
Usage
Returns
Array.first(right)
Array
Argument
Type
Details
this: left
Array
The left-hand value.
right
Array
The right-hand value.
ee.Array.firstNonZero
On an element-wise basis, selects the first value if it is non-zero, and the second value otherwise.
Usage
Returns
Array.firstNonZero(right)
Array
Argument
Type
Details
this: left
Array
The left-hand value.
right
Array
The right-hand value.
ee.Array.float
On an element-wise basis, casts the input value to a 32-bit float.
Usage
Returns
Array.float()
Array
Argument
Type
Details
this: input
Array
The input array.
ee.Array.floor
On an element-wise basis, computes the largest integer less than or equal to the input.
Usage
Returns
Array.floor()
Array
Argument
Type
Details
this: input
Array
The input array.
ee.Array.gamma
On an element-wise basis, computes the gamma function of the input.
Usage
Returns
Array.gamma()
Array
Argument
Type
Details
this: input
Array
The input array.
ee.Array.gammainc
On an element-wise basis, calculates the regularized lower incomplete Gamma function γ(x,a).
Usage
Returns
Array.gammainc(right)
Array
Argument
Type
Details
this: left
Array
The left-hand value.
right
Array
The right-hand value.
ee.Array.get
Extracts the value at the given position from the input array.
Usage
Returns
Array.get(position)
Number
Argument
Type
Details
this: array
Array
The array to extract from.
position
List
The coordinates of the element to get.
ee.Array.gt
On an element-wise basis, returns 1 if and only if the first value is greater than the second.
Usage
Returns
Array.gt(right)
Array
Argument
Type
Details
this: left
Array
The left-hand value.
right
Array
The right-hand value.
ee.Array.gte
On an element-wise basis, returns 1 if and only if the first value is greater than or equal to the second.
Usage
Returns
Array.gte(right)
Array
Argument
Type
Details
this: left
Array
The left-hand value.
right
Array
The right-hand value.
ee.Array.hypot
On an element-wise basis, calculates the magnitude of the 2D vector [x, y].
Usage
Returns
Array.hypot(right)
Array
Argument
Type
Details
this: left
Array
The left-hand value.
right
Array
The right-hand value.
ee.Array.identity
Creates a 2D identity matrix of the given size.
Usage
Returns
ee.Array.identity(size)
Array
Argument
Type
Details
size
Integer
The length of each axis.
ee.Array.int
On an element-wise basis, casts the input value to a signed 32-bit integer.
Usage
Returns
Array.int()
Array
Argument
Type
Details
this: input
Array
The input array.
ee.Array.int16
On an element-wise basis, casts the input value to a signed 16-bit integer.
Usage
Returns
Array.int16()
Array
Argument
Type
Details
this: input
Array
The input array.
ee.Array.int32
On an element-wise basis, casts the input value to a signed 32-bit integer.
Usage
Returns
Array.int32()
Array
Argument
Type
Details
this: input
Array
The input array.
ee.Array.int64
On an element-wise basis, casts the input value to a signed 64-bit integer.
Usage
Returns
Array.int64()
Array
Argument
Type
Details
this: input
Array
The input array.
ee.Array.int8
On an element-wise basis, casts the input value to a signed 8-bit integer.
Usage
Returns
Array.int8()
Array
Argument
Type
Details
this: input
Array
The input array.
ee.Array.lanczos
On an element-wise basis, computes the Lanczos approximation of the input.
Usage
Returns
Array.lanczos()
Array
Argument
Type
Details
this: input
Array
The input array.
ee.Array.leftShift
On an element-wise basis, calculates the left shift of v1 by v2 bits.
Usage
Returns
Array.leftShift(right)
Array
Argument
Type
Details
this: left
Array
The left-hand value.
right
Array
The right-hand value.
ee.Array.length
Returns a 1-D ee.Array containing the length of each dimension of the given ee.Array.
Usage
Returns
Array.length()
Array
Argument
Type
Details
this: array
Array
The array from which to extract the axis lengths.
ee.Array.log
On an element-wise basis, computes the natural logarithm of the input.
Usage
Returns
Array.log()
Array
Argument
Type
Details
this: input
Array
The input array.
ee.Array.log10
On an element-wise basis, computes the base-10 logarithm of the input.
Usage
Returns
Array.log10()
Array
Argument
Type
Details
this: input
Array
The input array.
ee.Array.long
On an element-wise basis, casts the input value to a signed 64-bit integer.
Usage
Returns
Array.long()
Array
Argument
Type
Details
this: input
Array
The input array.
ee.Array.lt
On an element-wise basis, returns 1 if and only if the first value is less than the second.
Usage
Returns
Array.lt(right)
Array
Argument
Type
Details
this: left
Array
The left-hand value.
right
Array
The right-hand value.
ee.Array.lte
On an element-wise basis, returns 1 if and only if the first value is less than or equal to the second.
Usage
Returns
Array.lte(right)
Array
Argument
Type
Details
this: left
Array
The left-hand value.
right
Array
The right-hand value.
ee.Array.mask
Creates a subarray by slicing out each position in an input array that is parallel to a non-zero element of the given mask array.
Usage
Returns
Array.mask(mask)
Array
Argument
Type
Details
this: input
Array
Array to mask.
mask
Array
Mask array.
ee.Array.matrixCholeskyDecomposition
Calculates the Cholesky decomposition of a matrix. The Cholesky decomposition is a decomposition into the form L * L' where L is a lower triangular matrix. The input must be a symmetric positive-definite matrix. Returns a dictionary with 1 entry named 'L'.
Usage
Returns
Array.matrixCholeskyDecomposition()
Dictionary
Argument
Type
Details
this: array
Array
The array to decompose.
ee.Array.matrixDeterminant
Computes the determinant of the matrix.
Usage
Returns
Array.matrixDeterminant()
Number
Argument
Type
Details
this: input
Array
The array to compute on.
ee.Array.matrixDiagonal
Computes the diagonal of the matrix in a single column.
Usage
Returns
Array.matrixDiagonal()
Array
Argument
Type
Details
this: input
Array
The input array.
ee.Array.matrixFnorm
Computes the Frobenius norm of the matrix.
Usage
Returns
Array.matrixFnorm()
Number
Argument
Type
Details
this: input
Array
The array to compute on.
ee.Array.matrixInverse
Computes the inverse of the matrix.
Usage
Returns
Array.matrixInverse()
Array
Argument
Type
Details
this: input
Array
The input array.
ee.Array.matrixLUDecomposition
Calculates the LU matrix decomposition such that P×input=L×U, where L is lower triangular (with unit diagonal terms), U is upper triangular and P is a partial pivot permutation matrix. The input matrix must be square. Returns a dictionary with entries named 'L', 'U' and 'P'.
Usage
Returns
Array.matrixLUDecomposition()
Dictionary
Argument
Type
Details
this: array
Array
The array to decompose.
ee.Array.matrixMultiply
Returns the matrix multiplication A * B.
Usage
Returns
Array.matrixMultiply(right)
Array
Argument
Type
Details
this: left
Array
The left-hand value.
right
Array
The right-hand value.
ee.Array.matrixPseudoInverse
Computes the Moore-Penrose pseudoinverse of the matrix.
Usage
Returns
Array.matrixPseudoInverse()
Array
Argument
Type
Details
this: input
Array
The input array.
ee.Array.matrixQRDecomposition
Calculates the QR-decomposition of a matrix into two matrices Q and R such that input = QR, where Q is orthogonal, and R is upper triangular. Returns a dictionary with entries named 'Q' and 'R'.
Usage
Returns
Array.matrixQRDecomposition()
Dictionary
Argument
Type
Details
this: array
Array
The array to decompose.
ee.Array.matrixSingularValueDecomposition
Calculates the Singular Value Decomposition of the input matrix into U×S×V', such that U and V are orthogonal and S is diagonal. Returns a dictionary with entries named 'U', 'S' and 'V'.
Usage
Returns
Array.matrixSingularValueDecomposition()
Dictionary
Argument
Type
Details
this: array
Array
The array to decompose.
ee.Array.matrixSolve
Solves for x in the matrix equation A * x = B, finding a least-squares solution if A is overdetermined.
Usage
Returns
Array.matrixSolve(right)
Array
Argument
Type
Details
this: left
Array
The left-hand value.
right
Array
The right-hand value.
ee.Array.matrixToDiag
Computes a square diagonal matrix from a single column matrix.
Usage
Returns
Array.matrixToDiag()
Array
Argument
Type
Details
this: input
Array
The input array.
ee.Array.matrixTrace
Computes the trace of the matrix.
Usage
Returns
Array.matrixTrace()
Number
Argument
Type
Details
this: input
Array
The array to compute on.
ee.Array.matrixTranspose
Transposes two dimensions of an array.
Usage
Returns
Array.matrixTranspose(axis1, axis2)
Array
Argument
Type
Details
this: array
Array
Array to transpose.
axis1
Integer, default: 0
First axis to swap.
axis2
Integer, default: 1
Second axis to swap.
ee.Array.max
On an element-wise basis, selects the maximum of the first and second values.
Usage
Returns
Array.max(right)
Array
Argument
Type
Details
this: left
Array
The left-hand value.
right
Array
The right-hand value.
ee.Array.min
On an element-wise basis, selects the minimum of the first and second values.
Usage
Returns
Array.min(right)
Array
Argument
Type
Details
this: left
Array
The left-hand value.
right
Array
The right-hand value.
ee.Array.mod
On an element-wise basis, calculates the remainder of the first value divided by the second.
Usage
Returns
Array.mod(right)
Array
Argument
Type
Details
this: left
Array
The left-hand value.
right
Array
The right-hand value.
ee.Array.multiply
On an element-wise basis, multiplies the first value by the second.
Usage
Returns
Array.multiply(right)
Array
Argument
Type
Details
this: left
Array
The left-hand value.
right
Array
The right-hand value.
ee.Array.neq
On an element-wise basis, returns 1 if and only if the first value is not equal to the second.
Usage
Returns
Array.neq(right)
Array
Argument
Type
Details
this: left
Array
The left-hand value.
right
Array
The right-hand value.
ee.Array.not
On an element-wise basis, returns 0 if the input is non-zero, and 1 otherwise.
Usage
Returns
Array.not()
Array
Argument
Type
Details
this: input
Array
The input array.
ee.Array.or
On an element-wise basis, returns 1 if and only if either input value is non-zero.
Usage
Returns
Array.or(right)
Array
Argument
Type
Details
this: left
Array
The left-hand value.
right
Array
The right-hand value.
ee.Array.pad
Pad an array to a given length. The pad value will be repeatedly appended to the array to extend it to given length along each axis. If the array is already as large or larger than a given length, it will remain unchanged along that axis.
Usage
Returns
Array.pad(lengths, pad)
Array
Argument
Type
Details
this: array
Array
Array to pad.
lengths
List
A list of new lengths for each axis.
pad
Number, default: 0
The value with which to pad the array.
ee.Array.pow
On an element-wise basis, raises the first value to the power of the second.
Usage
Returns
Array.pow(right)
Array
Argument
Type
Details
this: left
Array
The left-hand value.
right
Array
The right-hand value.
ee.Array.project
Projects an array to a lower dimensional space by specifying the axes to retain. Dropped axes must be at most length 1.
Usage
Returns
Array.project(axes)
Array
Argument
Type
Details
this: array
Array
Array to project.
axes
List
The axes to project onto. Other axes will be discarded, and must be at most length 1.
ee.Array.reduce
Apply a reducer to an array by collapsing all the input values along each specified axis into a single output value computed by the reducer.
The output always has the same dimensionality as the input, and the individual axes are affected as follows:
The axes specified in the 'axes' parameter have their length reduced to 1 (by applying the reducer).
If the reducer has multiple inputs or multiple outputs, the axis specified in 'fieldAxis' will be used to provide the reducer's inputs and store the reducer's outputs.
All other axes are unaffected (independent reductions are performed).
Usage
Returns
Array.reduce(reducer, axes, fieldAxis)
Array
Argument
Type
Details
this: array
Array
The array.
reducer
Reducer
The reducer to apply. Each of its outputs must be a number, not an array or other type.
axes
List
The list of axes over which to reduce. The output will have a length of 1 in all these axes.
fieldAxis
Integer, default: null
The axis to use as the reducer's input and output fields. Only required if the reducer has multiple inputs or multiple outputs, in which case the axis must have length equal to the number of reducer inputs, and in the result it will have length equal to the number of reducer outputs.
ee.Array.repeat
Repeats the array along the given axis. The result will have the shape of the input, except length along the repeated axis will be multiplied by the given number of copies.
Usage
Returns
Array.repeat(axis, copies)
Array
Argument
Type
Details
this: array
Array
Array to repeat.
axis
Integer, default: 0
The axis along which to repeat the array.
copies
Integer, default: 2
The number of copies of this array to concatenate along the given axis.
ee.Array.reshape
Reshapes an array to a new list of dimension lengths.
Usage
Returns
Array.reshape(shape)
Array
Argument
Type
Details
this: array
Array
Array to reshape.
shape
Array
New shape to which arrays are converted. If one component of the shape is the special value -1, the size of that dimension is computed so that the total size remains constant. In particular, a shape of [-1] flattens into 1-D. At most one component of shape can be -1.
ee.Array.rightShift
On an element-wise basis, calculates the signed right shift of v1 by v2 bits.
Usage
Returns
Array.rightShift(right)
Array
Argument
Type
Details
this: left
Array
The left-hand value.
right
Array
The right-hand value.
ee.Array.round
On an element-wise basis, computes the integer nearest to the input.
Usage
Returns
Array.round()
Array
Argument
Type
Details
this: input
Array
The input array.
ee.Array.short
On an element-wise basis, casts the input value to a signed 16-bit integer.
Usage
Returns
Array.short()
Array
Argument
Type
Details
this: input
Array
The input array.
ee.Array.signum
On an element-wise basis, computes the signum function (sign) of the input; zero if the input is zero, 1 if the input is greater than zero, -1 if the input is less than zero.
Usage
Returns
Array.signum()
Array
Argument
Type
Details
this: input
Array
The input array.
ee.Array.sin
On an element-wise basis, computes the sine of the input in radians.
Usage
Returns
Array.sin()
Array
Argument
Type
Details
this: input
Array
The input array.
ee.Array.sinh
On an element-wise basis, computes the hyperbolic sine of the input.
Usage
Returns
Array.sinh()
Array
Argument
Type
Details
this: input
Array
The input array.
ee.Array.slice
Creates a subarray by slicing out each position along the given axis from the 'start' (inclusive) to 'end' (exclusive) by increments of 'step'. The result will have as many dimensions as the input, and the same length in all directions except the slicing axis, where the length will be the number of positions from 'start' to 'end' by 'step' that are in range of the input array's length along 'axis'. This means the result can be length 0 along the given axis if start=end, or if the start or end values are entirely out of range.
Usage
Returns
Array.slice(axis, start, end, step)
Array
Argument
Type
Details
this: array
Array
Array to slice.
axis
Integer, default: 0
The axis to slice on.
start
Integer, default: 0
The coordinate of the first slice (inclusive) along 'axis'. Negative numbers are used to position the start of slicing relative to the end of the array, where -1 starts at the last position on the axis, -2 starts at the next to last position, etc.
end
Integer, default: null
The coordinate (exclusive) at which to stop taking slices. By default this will be the length of the given axis. Negative numbers are used to position the end of slicing relative to the end of the array, where -1 will exclude the last position, -2 will exclude the last two positions, etc.
step
Integer, default: 1
The separation between slices along 'axis'; a slice will be taken at each whole multiple of 'step' from 'start' (inclusive) to 'end' (exclusive). Must be positive.
ee.Array.sort
Sorts elements of the array along one axis.
Usage
Returns
Array.sort(keys)
Array
Argument
Type
Details
this: array
Array
Array image to sort.
keys
Array, default: null
Optional keys to sort by. If not provided, the values are used as the keys. The keys can only have multiple elements along one axis, which determines the direction to sort in.
ee.Array.sqrt
On an element-wise basis, computes the square root of the input.
Usage
Returns
Array.sqrt()
Array
Argument
Type
Details
this: input
Array
The input array.
ee.Array.subtract
On an element-wise basis, subtracts the second value from the first.
Usage
Returns
Array.subtract(right)
Array
Argument
Type
Details
this: left
Array
The left-hand value.
right
Array
The right-hand value.
ee.Array.tan
On an element-wise basis, computes the tangent of the input in radians.
Usage
Returns
Array.tan()
Array
Argument
Type
Details
this: input
Array
The input array.
ee.Array.tanh
On an element-wise basis, computes the hyperbolic tangent of the input.
Usage
Returns
Array.tanh()
Array
Argument
Type
Details
this: input
Array
The input array.
ee.Array.toByte
On an element-wise basis, casts the input value to an unsigned 8-bit integer.
Usage
Returns
Array.toByte()
Array
Argument
Type
Details
this: input
Array
The input array.
ee.Array.toDouble
On an element-wise basis, casts the input value to a 64-bit float.
Usage
Returns
Array.toDouble()
Array
Argument
Type
Details
this: input
Array
The input array.
ee.Array.toFloat
On an element-wise basis, casts the input value to a 32-bit float.
Usage
Returns
Array.toFloat()
Array
Argument
Type
Details
this: input
Array
The input array.
ee.Array.toInt
On an element-wise basis, casts the input value to a signed 32-bit integer.
Usage
Returns
Array.toInt()
Array
Argument
Type
Details
this: input
Array
The input array.
ee.Array.toInt16
On an element-wise basis, casts the input value to a signed 16-bit integer.
Usage
Returns
Array.toInt16()
Array
Argument
Type
Details
this: input
Array
The input array.
ee.Array.toInt32
On an element-wise basis, casts the input value to a signed 32-bit integer.
Usage
Returns
Array.toInt32()
Array
Argument
Type
Details
this: input
Array
The input array.
ee.Array.toInt64
On an element-wise basis, casts the input value to a signed 64-bit integer.
Usage
Returns
Array.toInt64()
Array
Argument
Type
Details
this: input
Array
The input array.
ee.Array.toInt8
On an element-wise basis, casts the input value to a signed 8-bit integer.
Usage
Returns
Array.toInt8()
Array
Argument
Type
Details
this: input
Array
The input array.
ee.Array.toList
Turns an Array into a list of lists of numbers.
Usage
Returns
Array.toList()
List
Argument
Type
Details
this: array
Array
Array to convert.
ee.Array.toLong
On an element-wise basis, casts the input value to a signed 64-bit integer.
Usage
Returns
Array.toLong()
Array
Argument
Type
Details
this: input
Array
The input array.
ee.Array.toShort
On an element-wise basis, casts the input value to a signed 16-bit integer.
Usage
Returns
Array.toShort()
Array
Argument
Type
Details
this: input
Array
The input array.
ee.Array.toUint16
On an element-wise basis, casts the input value to an unsigned 16-bit integer.
Usage
Returns
Array.toUint16()
Array
Argument
Type
Details
this: input
Array
The input array.
ee.Array.toUint32
On an element-wise basis, casts the input value to an unsigned 32-bit integer.
Usage
Returns
Array.toUint32()
Array
Argument
Type
Details
this: input
Array
The input array.
ee.Array.toUint8
On an element-wise basis, casts the input value to an unsigned 8-bit integer.
Usage
Returns
Array.toUint8()
Array
Argument
Type
Details
this: input
Array
The input array.
ee.Array.transpose
Transposes two dimensions of an array.
Usage
Returns
Array.transpose(axis1, axis2)
Array
Argument
Type
Details
this: array
Array
Array to transpose.
axis1
Integer, default: 0
First axis to swap.
axis2
Integer, default: 1
Second axis to swap.
ee.Array.trigamma
On an element-wise basis, computes the trigamma function of the input.
Usage
Returns
Array.trigamma()
Array
Argument
Type
Details
this: input
Array
The input array.
ee.Array.uint16
On an element-wise basis, casts the input value to an unsigned 16-bit integer.
Usage
Returns
Array.uint16()
Array
Argument
Type
Details
this: input
Array
The input array.
ee.Array.uint32
On an element-wise basis, casts the input value to an unsigned 32-bit integer.
Usage
Returns
Array.uint32()
Array
Argument
Type
Details
this: input
Array
The input array.
ee.Array.uint8
On an element-wise basis, casts the input value to an unsigned 8-bit integer.
Usage
Returns
Array.uint8()
Array
Argument
Type
Details
this: input
Array
The input array.
ee.Blob
Loads a Blob from a Google Cloud Storage URL.
Usage
Returns
ee.Blob(url)
Blob
Argument
Type
Details
url
String
The Blob's Google Cloud Storage URL.
ee.Blob.string
Returns the contents of the blob as a String.
Usage
Returns
Blob.string(encoding)
String
Argument
Type
Details
this: blob
Blob
encoding
String, default: null
ee.Blob.url
Returns the Blob's Google Cloud Storage URL.
Usage
Returns
Blob.url()
String
Argument
Type
Details
this: blob
Blob
ee.Classifier.amnhMaxent
Creates a Maximum Entropy classifier. Maxent is used to model species distribution probabilities using environmental data for locations of known presence and for a large number of 'background' locations. For more information and to cite, see: https://biodiversityinformatics.amnh.org/open_source/maxent/ and the reference publication: Phillips, et. al., 2004 A maximum entropy approach to species distribution modeling, Proceedings of the Twenty-First International Conference on Machine Learning. The output is a single band named 'probability', containing the modeled probability, and an additional band named 'clamp' when the 'writeClampGrid' argument is true.
A list of the names of the categorical inputs. Any inputs not listed in this argument are considered to be continuous.
outputFormat
String, default: "cloglog"
Representation of probabilities in output.
autoFeature
Boolean, default: true
Automatically select which feature classes to use, based on number of training samples.
linear
Boolean, default: true
Allow linear features to be used. Ignored when autofeature is true.
quadratic
Boolean, default: true
Allow quadratic features to be used. Ignored when autofeature is true.
product
Boolean, default: true
Allow product features to be used. Ignored when autofeature is true.
threshold
Boolean, default: false
Allow threshold features to be used. Ignored when autofeature is true.
hinge
Boolean, default: true
Allow hinge features to be used. Ignored when autofeature is true.
hingeThreshold
Integer, default: 15
Number of samples at which hinge features start being used. Ignored when autofeature is false.
l2lqThreshold
Integer, default: 10
Number of samples at which quadratic features start being used. Ignored when autofeature is false.
lq2lqptThreshold
Integer, default: 80
Number of samples at which product and threshold features start being used. Ignored when autofeature is false.
addSamplesToBackground
Boolean, default: true
Add to the background any sample for which has a combination of environmental values that isn't already present in the background.
addAllSamplesToBackground
Boolean, default: false
Add all samples to the background, even if they have combinations of environmental values that are already present in the background.
betaMultiplier
Float, default: 1
Regularization multiplier. Multiply all automatic regularization parameters by this number. A higher number gives a more spread-out distribution.
betaHinge
Float, default: -1
Regularization parameter to be applied to all hinge features; negative value enables automatic setting.
betaLqp
Float, default: -1
Regularization parameter to be applied to all linear, quadratic and product features; negative value enables automatic setting.
betaCategorical
Float, default: -1
Regularization parameter to be applied to all categorical features; negative value enables automatic setting.
betaThreshold
Float, default: -1
Regularization parameter to be applied to all threshold features; negative value enables automatic setting.
extrapolate
Boolean, default: true
Extrapolate. Predict to regions of environmental space outside the limits encountered during training.
doClamp
Boolean, default: true
Apply clamping to output.
writeClampGrid
Boolean, default: true
Adds a band to the output ('clamp') showing the spatial distribution of clamping. At each point, the value is the absolute difference between prediction values with and without clamping.
randomTestPoints
Integer, default: 0
Random test percentage. The percentage of training points to hold aside as test points, used to compute AUX, omission, etc.
seed
Long, default: 0
A seed used when generating random numbers.
ee.Classifier.confusionMatrix
Computes a 2D confusion matrix for a classifier based on its training data (ie: resubstitution error). Axis 0 of the matrix corresponds to the input classes, and axis 1 corresponds to the output classes. The rows and columns start at class 0 and increase sequentially up to the maximum class value, so some rows or columns might be empty if the input classes aren't 0-based or sequential.
Usage
Returns
Classifier.confusionMatrix()
ConfusionMatrix
Argument
Type
Details
this: classifier
Classifier
The classifier to use.
ee.Classifier.decisionTree
Creates a classifier that applies the given decision tree.
Usage
Returns
ee.Classifier.decisionTree(treeString)
Classifier
Argument
Type
Details
treeString
String
The decision tree, specified in the text format generated by R and other similar tools.
ee.Classifier.decisionTreeEnsemble
Creates a classifier that applies the given decision trees.
Usage
Returns
ee.Classifier.decisionTreeEnsemble(treeStrings)
Classifier
Argument
Type
Details
treeStrings
List
The decision trees, specified in the text format generated by R and other similar tools. Each item in the list should contain one or more trees in text format.
ee.Classifier.explain
Describe the results of a trained classifier.
Usage
Returns
Classifier.explain()
Dictionary
Argument
Type
Details
this: classifier
Classifier
The classifier to describe.
ee.Classifier.libsvm
Creates an empty Support Vector Machine classifier.
The decision procedure to use for classification. Either 'Voting' or 'Margin'. Not used for regression.
svmType
String, default: "C_SVC"
The SVM type. One of `C_SVC`, `NU_SVC`, `ONE_CLASS`, `EPSILON_SVR` or `NU_SVR`.
kernelType
String, default: "LINEAR"
The kernel type. One of LINEAR (u′×v), POLY ((γ×u′×v + coef₀)ᵈᵉᵍʳᵉᵉ), RBF (exp(-γ×|u-v|²)) or SIGMOID (tanh(γ×u′×v + coef₀)).
shrinking
Boolean, default: true
Whether to use shrinking heuristics.
degree
Integer, default: null
The degree of polynomial. Valid for POLY kernels.
gamma
Float, default: null
The gamma value in the kernel function. Defaults to the reciprocal of the number of features. Valid for POLY, RBF and SIGMOID kernels.
coef0
Float, default: null
The coef₀ value in the kernel function. Defaults to 0. Valid for POLY and SIGMOID kernels.
cost
Float, default: null
The cost (C) parameter. Defaults to 1. Only valid for C-SVC, epsilon-SVR, and nu-SVR.
nu
Float, default: null
The nu parameter. Defaults to 0.5. Only valid for nu-SVC, one-class SVM, and nu-SVR.
terminationEpsilon
Float, default: null
The termination criterion tolerance (e). Defaults to 0.001. Only valid for epsilon-SVR.
lossEpsilon
Float, default: null
The epsilon in the loss function (p). Defaults to 0.1. Only valid for epsilon-SVR.
oneClass
Integer, default: null
The class of the training data on which to train in a one-class SVM. Defaults to 0. Only valid for one-class SVM. Possible values are 0 and 1. The classifier output is binary (0/1) and will match this class value for the data determined to be in the class.
ee.Classifier.load
Creates a Classifier.
Usage
Returns
ee.Classifier.load(id)
Classifier
Argument
Type
Details
id
String
The Classifier's Asset ID.
ee.Classifier.minimumDistance
Creates a minimum distance classifier for the given distance metric. In CLASSIFICATION mode, the nearest class is returned. In REGRESSION mode, the distance to the nearest class center is returned. In RAW mode, the distance to every class center is returned.
Usage
Returns
ee.Classifier.minimumDistance(metric, kNearest)
Classifier
Argument
Type
Details
metric
String, default: "euclidean"
The distance metric to use. Options are:
'euclidean' - euclidean distance from the unnormalized class mean.
'cosine' - spectral angle from the unnormalized class mean.
'mahalanobis' - Mahalanobis distance from the class mean.
'manhattan' - Manhattan distance from the unnormalized class mean.
kNearest
Integer, default: 1
If greater than 1, the result will contain an array of the k nearest neighbors or distances, based on the output mode setting. if kNearest is greater than the total number of classes, it will be set equal to the number of classes.
ee.Classifier.mode
Returns the classifier mode: CLASSIFICATION, REGRESSION, PROBABILITY, MULTIPROBABILITY, RAW or RAW_REGRESSION.
Usage
Returns
Classifier.mode()
String
Argument
Type
Details
this: classifier
Classifier
ee.Classifier.schema
Returns the names of the inputs used by this classifier, or null if this classifier has not had any training data added yet.
Usage
Returns
Classifier.schema()
List
Argument
Type
Details
this: classifier
Classifier
ee.Classifier.setOutputMode
Sets the output mode.
Usage
Returns
Classifier.setOutputMode(mode)
Classifier
Argument
Type
Details
this: classifier
Classifier
An input classifier.
mode
String
The output mode. One of:
CLASSIFICATION (default): The output is the class number.
REGRESSION: The output is the result of standard regression.
PROBABILITY: The output is the probability that the classification is correct.
MULTIPROBABILITY: The output is an array of probabilities that each class is correct ordered by classes seen.
RAW: The output is an array of the internal representation of the classification process. For example, the raw votes in multi-decision tree models.
RAW_REGRESSION: The output is an array of the internal representation of the regression process. For example, the raw predictions of multiple regression trees.
Not all classifiers support modes other than CLASSIFICATION.
The shrinkage parameter in (0, 1] controls the learning rate of procedure.
samplingRate
Float, default: 0.7
The sampling rate for stochastic tree boosting.
maxNodes
Integer, default: null
The maximum number of leaf nodes in each tree. If unspecified, defaults to no limit.
loss
String, default: "LeastAbsoluteDeviation"
Loss function for regression. One of: LeastSquares, LeastAbsoluteDeviation, Huber.
seed
Integer, default: 0
The randomization seed.
ee.Classifier.smileKNN
Creates an empty kNN classifier.
The k-nearest neighbor algorithm (k-NN) is a method for classifying objects by a majority vote of its neighbors, with the object being assigned to the class most common amongst its k nearest neighbors (k is a positive integer, typically small, typically odd).
Usage
Returns
ee.Classifier.smileKNN(k, searchMethod, metric)
Classifier
Argument
Type
Details
k
Integer, default: 1
The number of neighbors for classification.
searchMethod
String, default: "AUTO"
Search method. The following are valid [AUTO, LINEAR_SEARCH, KD_TREE, COVER_TREE].
AUTO Will choose between KD_TREE and COVER_TREE depending on the dimension count. Results may vary between the different search methods for distance ties and probability values. Since performance and results may vary consult with SMILE's documentation and other literature.
metric
String, default: "EUCLIDEAN"
The distance metric to use. NOTE: KD_TREE (and AUTO for low dimensions) will not use the metric selected. Options are:
'EUCLIDEAN' - euclidean distance.
'MAHALANOBIS' - Mahalanobis distance.
'MANHATTAN' - Manhattan distance.
ee.Classifier.smileNaiveBayes
Creates an empty Naive Bayes classifier. This classifier assumes that the feature vector consists of positive integers, and negative inputs are discarded.
Usage
Returns
ee.Classifier.smileNaiveBayes(lambda)
Classifier
Argument
Type
Details
lambda
Float, default: 0.000001
A smoothing lambda. Used to avoid assigning zero probability to classes not seen during training, instead using lambda / (lambda * nFeatures).
The number of variables per split. If unspecified, uses the square root of the number of variables.
minLeafPopulation
Integer, default: 1
Only create nodes whose training set contains at least this many points.
bagFraction
Float, default: 0.5
The fraction of input to bag per tree.
maxNodes
Integer, default: null
The maximum number of leaf nodes in each tree. If unspecified, defaults to no limit.
seed
Integer, default: 0
The randomization seed.
ee.Classifier.spectralRegion
Creates a classifier that tests if its inputs lie within a polygon defined by a set of coordinates in an arbitrary 2D coordinate system. Each input to be classified must have 2 values (e.g.: images must have 2 bands). The result will be 1 wherever the input values are contained within the given polygon and 0 otherwise.
Usage
Returns
ee.Classifier.spectralRegion(coordinates, schema)
Classifier
Argument
Type
Details
coordinates
List
The coordinates of the polygon, as a list of rings. Each ring is a list of coordinate pairs (e.g.: [u1, v1, u2, v2, ..., uN, vN]). No edge may intersect any other edge. The resulting classification will be a 1 wherever the input values are within the interior of the given polygon, that is, an odd number of polygon edges must be crossed to get outside the polygon and 0 otherwise.
schema
List, default: null
The classifier's schema. A list of band or property names that the classifier will operate on. Since this classifier doesn't undergo a training step, these have to be specified manually. Defaults to ['u', 'v'].
ee.Classifier.train
Trains the classifier on a collection of features, using the specified numeric properties of each feature as training data. The geometry of the features is ignored.
The name of the property containing the class value. Each feature must have this property, and its value must be numeric.
inputProperties
List, default: null
The list of property names to include as training data. Each feature must have all these properties, and their values must be numeric. This argument is optional if the input collection contains a 'band_order' property, (as produced by Image.sample).
subsampling
Float, default: 1
An optional subsampling factor, within (0, 1].
subsamplingSeed
Integer, default: 0
A randomization seed to use for subsampling.
ee.Clusterer.schema
Returns the names of the inputs used by this Clusterer, or null if this Clusterer has not had any training data added yet.
Usage
Returns
Clusterer.schema()
List
Argument
Type
Details
this: clusterer
Clusterer
ee.Clusterer.train
Trains the Clusterer on a collection of features, using the specified numeric properties of each feature as training data. The geometry of the features is ignored.
The list of property names to include as training data. Each feature must have all these properties, and their values must be numeric. This argument is optional if the input collection contains a 'band_order' property, (as produced by Image.sample).
subsampling
Float, default: 1
An optional subsampling factor, within (0, 1].
subsamplingSeed
Integer, default: 0
A randomization seed to use for subsampling.
ee.Clusterer.wekaCascadeKMeans
Cascade simple k-means, selects the best k according to the Calinski-Harabasz criterion. For more information see:
Calinski, T. and J. Harabasz. 1974. A dendrite method for cluster analysis. Commun. Stat. 3: 1-27.
Set whether to initialize using the probabilistic farthest first like method of the k-means++ algorithm (rather than the standard random selection of initial cluster centers).
distanceFunction
String, default: "Euclidean"
Distance function to use. Options are: Euclidean & Manhattan
maxIterations
Integer, default: null
Maximum number of iterations for k-means.
ee.Clusterer.wekaCobweb
Implementation of the Cobweb clustering algorithm. For more information see:
D. Fisher (1987). Knowledge acquisition via incremental conceptual clustering. Machine Learning. 2(2):139-172. and J. H. Gennari, P. Langley, D. Fisher (1990). Models of incremental concept formation. Artificial Intelligence. 40:11-61.
Usage
Returns
ee.Clusterer.wekaCobweb(acuity, cutoff, seed)
Clusterer
Argument
Type
Details
acuity
Float, default: 1
Acuity (minimum standard deviation).
cutoff
Float, default: 0.002
Cutoff (minimum category utility).
seed
Integer, default: 42
Random number seed.
ee.Clusterer.wekaKMeans
Cluster data using the k means algorithm. Can use either the Euclidean distance (default) or the Manhattan distance. If the Manhattan distance is used, then centroids are computed as the component-wise median rather than mean. For more information see:
D. Arthur, S. Vassilvitskii: k-means++: the advantages of careful seeding. In: Proceedings of the eighteenth annual ACM-SIAM symposium on Discrete algorithms, 1027-1035, 2007.
Use canopies to reduce the number of distance calculations.
maxCandidates
Integer, default: 100
Maximum number of candidate canopies to retain in memory at any one time when using canopy clustering. T2 distance plus, data characteristics, will determine how many candidate canopies are formed before periodic and final pruning are performed, which might result in exceess memory consumption. This setting avoids large numbers of candidate canopies consuming memory.
periodicPruning
Integer, default: 10000
How often to prune low density canopies when using canopy clustering.
minDensity
Integer, default: 2
Minimum canopy density, when using canopy clustering, below which a canopy will be pruned during periodic pruning.
t1
Float, default: -1.5
The T1 distance to use when using canopy clustering. A value < 0 is taken as a positive multiplier for T2.
t2
Float, default: -1
The T2 distance to use when using canopy clustering. Values < 0 cause a heuristic based on attribute std. deviation to be used.
distanceFunction
String, default: "Euclidean"
Distance function to use. Options are: Euclidean & Manhattan
maxIterations
Integer, default: null
Maximum number of iterations.
preserveOrder
Boolean, default: false
Preserve order of instances.
fast
Boolean, default: false
Enables faster distance calculations, using cut-off values. Disables the calculation/output of squared errors/distances
seed
Integer, default: 10
The randomization seed.
ee.Clusterer.wekaLVQ
A Clusterer that implements the Learning Vector Quantization algorithm. For more details, see:
T. Kohonen, "Learning Vector Quantization", The Handbook of Brain Theory and Neural Networks, 2nd Edition, MIT Press, 2003, pp. 631-634.
The learning rate for the training algorithm. (Value should be greaterthan 0 and less or equal to 1).
epochs
Integer, default: 1000
Number of training epochs. (Value should be greater than or equal to 1).
normalizeInput
Boolean, default: false
Skip normalizing the attributes.
ee.Clusterer.wekaXMeans
X-Means is K-Means with an efficient estimation of the number of clusters. For more information see:
Dan Pelleg, Andrew W. Moore: X-means: Extending K-means with Efficient Estimation of the Number of Clusters. In: Seventeenth International Conference on Machine Learning, 727-734, 2000.
Returns the difference between two Dates in the specified units; the result is floating-point and based on the average length of the unit.
Usage
Returns
Date.difference(start, unit)
Float
Argument
Type
Details
this: date
Date
start
Date
unit
String
One of 'year', 'month' 'week', 'day', 'hour', 'minute', or 'second'.
ee.Date.evaluate
Asynchronously retrieves the value of this object from the server and passes it to the provided callback function.
Usage
Returns
Date.evaluate(callback)
Argument
Type
Details
this: computedobject
ComputedObject
The ComputedObject instance.
callback
Function
A function of the form function(success, failure), called when the server returns an answer. If the request succeeded, the success argument contains the evaluated result. If the request failed, the failure argument will contains an error message.
ee.Date.format
Convert a date to string.
Usage
Returns
Date.format(format, timeZone)
String
Argument
Type
Details
this: date
Date
format
String, default: null
A pattern, as described at http://joda-time.sourceforge.net/apidocs/org/joda/time/format/DateTimeFormat.html; if omitted will use ISO standard date formatting.
timeZone
String, default: null
The time zone (e.g. 'America/Los_Angeles'); defaults to UTC.
ee.Date.fromYMD
Returns a Date given year, month, day.
Usage
Returns
ee.Date.fromYMD(year, month, day, timeZone)
Date
Argument
Type
Details
year
Integer
month
Integer
day
Integer
timeZone
String, default: null
The time zone (e.g. 'America/Los_Angeles'); defaults to UTC.
ee.Date.get
Returns the specified unit of this date.
Usage
Returns
Date.get(unit, timeZone)
Long
Argument
Type
Details
this: date
Date
unit
String
One of 'year', 'month' (returns 1-12), 'week' (1-53), 'day' (1-31), 'hour' (0-23), 'minute' (0-59), or 'second' (0-59).
timeZone
String, default: null
The time zone (e.g. 'America/Los_Angeles'); defaults to UTC.
ee.Date.getFraction
Returns this date's elapsed fraction of the specified unit (between 0 and 1).
Usage
Returns
Date.getFraction(unit, timeZone)
Float
Argument
Type
Details
this: date
Date
unit
String
One of 'year', 'month' 'week', 'day', 'hour', 'minute', or 'second'.
timeZone
String, default: null
The time zone (e.g. 'America/Los_Angeles'); defaults to UTC.
ee.Date.getInfo
Retrieves the value of this object from the server.
If no callback function is provided, the request is made synchronously. If a callback is provided, the request is made asynchronously.
The asynchronous mode is preferred because the synchronous mode stops all other code (for example, the EE Code Editor UI) while waiting for the server. To make an asynchronous request, evaluate() is preferred over getInfo().
Returns the computed value of this object.
Usage
Returns
Date.getInfo(callback)
Object
Argument
Type
Details
this: computedobject
ComputedObject
The ComputedObject instance.
callback
Function, optional
An optional callback. If not supplied, the call is made synchronously.
ee.Date.getRange
Returns a DateRange covering the unit of the specified type that contains this date, e.g. Date('2013-3-15').getRange('year') returns DateRange('2013-1-1', '2014-1-1').
Usage
Returns
Date.getRange(unit, timeZone)
DateRange
Argument
Type
Details
this: date
Date
unit
String
One of 'year', 'month' 'week', 'day', 'hour', 'minute', or 'second'.
timeZone
String, default: null
The time zone (e.g. 'America/Los_Angeles'); defaults to UTC.
ee.Date.getRelative
Returns the specified (0-based) unit of this date relative to a larger unit, e.g. getRelative('day', 'year') returns a value between 0 and 365.
Usage
Returns
Date.getRelative(unit, inUnit, timeZone)
Long
Argument
Type
Details
this: date
Date
unit
String
One of 'month' 'week', 'day', 'hour', 'minute', or 'second'.
inUnit
String
One of 'year', 'month' 'week', 'day', 'hour', or 'minute'.
timeZone
String, default: null
The time zone (e.g. 'America/Los_Angeles'); defaults to UTC.
ee.Date.millis
The number of milliseconds since 1970-01-01T00:00:00Z.
Usage
Returns
Date.millis()
Long
Argument
Type
Details
this: date
Date
ee.Date.parse
Parse a date string, given a string describing its format.
Usage
Returns
ee.Date.parse(format, date, timeZone)
Date
Argument
Type
Details
format
String
A pattern, as described at http://joda-time.sourceforge.net/apidocs/org/joda/time/format/DateTimeFormat.html.
date
String
A string matching the given pattern.
timeZone
String, default: null
The time zone (e.g. 'America/Los_Angeles'); defaults to UTC.
ee.Date.serialize
Returns the serialized representation of this object.
Usage
Returns
Date.serialize(legacy)
String
Argument
Type
Details
this: computedobject
ComputedObject
The ComputedObject instance.
legacy
Boolean, optional
Enables legacy format.
ee.Date.unitRatio
Returns the ratio of the length of one unit to the length of another, e.g. unitRatio('day', 'minute') returns 1440. Valid units are 'year', 'month' 'week', 'day', 'hour', 'minute', and 'second'.
Usage
Returns
ee.Date.unitRatio(numerator, denominator)
Float
Argument
Type
Details
numerator
String
denominator
String
ee.Date.update
Create a new Date by setting one or more of the units of the given Date to a new value. If a timeZone is given the new value(s) is interpreted in that zone.
The time zone (e.g. 'America/Los_Angeles'); defaults to UTC.
ee.DateRange
Creates a DateRange with the given start (inclusive) and end (exclusive), which may be Dates, numbers (interpreted as milliseconds since 1970-01-01T00:00:00Z), or strings (such as '1996-01-01T08:00'). If 'end' is not specified, a 1-millisecond range starting at 'start' is created.
Usage
Returns
ee.DateRange(start, end, timeZone)
DateRange
Argument
Type
Details
start
Object
end
Object, default: null
timeZone
String, default: null
If start and/or end are provided as strings, the time zone in which to interpret them; defaults to UTC.
ee.DateRange.contains
Returns true if the given Date or DateRange is within this DateRange.
Usage
Returns
DateRange.contains(other)
Boolean
Argument
Type
Details
this: dateRange
DateRange
other
Object
ee.DateRange.end
Returns the (exclusive) end of this DateRange.
Usage
Returns
DateRange.end()
Date
Argument
Type
Details
this: dateRange
DateRange
ee.DateRange.intersection
Returns a DateRange that contains all points in the intersection of this DateRange and another.
Usage
Returns
DateRange.intersection(other)
DateRange
Argument
Type
Details
this: dateRange
DateRange
other
DateRange
ee.DateRange.intersects
Returns true if the given DateRange has at least one point in common with this DateRange.
Usage
Returns
DateRange.intersects(other)
Boolean
Argument
Type
Details
this: dateRange
DateRange
other
DateRange
ee.DateRange.isEmpty
Returns true if this DateRange contains no dates (i.e. start >= end).
Usage
Returns
DateRange.isEmpty()
Boolean
Argument
Type
Details
this: dateRange
DateRange
ee.DateRange.isUnbounded
Returns true if this DateRange contains all dates.
Usage
Returns
DateRange.isUnbounded()
Boolean
Argument
Type
Details
this: dateRange
DateRange
ee.DateRange.start
Returns the (inclusive) start of this DateRange.
Usage
Returns
DateRange.start()
Date
Argument
Type
Details
this: dateRange
DateRange
ee.DateRange.unbounded
Returns a DateRange that includes all possible dates.
Usage
Returns
ee.DateRange.unbounded()
DateRange
No arguments.
ee.DateRange.union
Returns a DateRange that contains all points in the union of this DateRange and another.
Usage
Returns
DateRange.union(other)
DateRange
Argument
Type
Details
this: dateRange
DateRange
other
DateRange
ee.Dictionary
Constructs a new Dictionary.
Usage
Returns
ee.Dictionary(dict)
Dictionary
Argument
Type
Details
dict
ComputedObject|Object, optional
An object to convert to a dictionary. This constructor accepts the following types: 1) Another dictionary. 2) A list of key/value pairs. 3) A null or no argument (producing an empty dictionary)
ee.Dictionary.aside
Calls a function passing this object as the first argument, and returning itself. Convenient e.g. when debugging:
Combines two dictionaries. In the case of duplicate names, the output will contain the value of the second dictionary unless overwrite is false. Null values in both dictionaries are ignored / removed.
Usage
Returns
Dictionary.combine(second, overwrite)
Dictionary
Argument
Type
Details
this: first
Dictionary
second
Dictionary
overwrite
Boolean, default: true
ee.Dictionary.contains
Returns true if the dictionary contains the given key.
Usage
Returns
Dictionary.contains(key)
Boolean
Argument
Type
Details
this: dictionary
Dictionary
key
String, default: null
ee.Dictionary.evaluate
Asynchronously retrieves the value of this object from the server and passes it to the provided callback function.
Usage
Returns
Dictionary.evaluate(callback)
Argument
Type
Details
this: computedobject
ComputedObject
The ComputedObject instance.
callback
Function
A function of the form function(success, failure), called when the server returns an answer. If the request succeeded, the success argument contains the evaluated result. If the request failed, the failure argument will contains an error message.
ee.Dictionary.fromLists
Construct a dictionary from two parallel lists of keys and values.
Usage
Returns
ee.Dictionary.fromLists(keys, values)
Dictionary
Argument
Type
Details
keys
List
values
List
ee.Dictionary.get
Extracts a named value from a dictionary. If the dictionary does not contain the given key, then defaultValue is returned, unless it is null.
Usage
Returns
Dictionary.get(key, defaultValue)
Object
Argument
Type
Details
this: dictionary
Dictionary
key
String
defaultValue
Object, default: null
ee.Dictionary.getArray
Extracts a named array value from a dictionary.
Usage
Returns
Dictionary.getArray(key)
Array
Argument
Type
Details
this: dictionary
Dictionary
key
String
ee.Dictionary.getGeometry
Extracts a named geometry value from a dictionary.
Usage
Returns
Dictionary.getGeometry(key)
Geometry
Argument
Type
Details
this: dictionary
Dictionary
key
String
ee.Dictionary.getInfo
Retrieves the value of this object from the server.
If no callback function is provided, the request is made synchronously. If a callback is provided, the request is made asynchronously.
The asynchronous mode is preferred because the synchronous mode stops all other code (for example, the EE Code Editor UI) while waiting for the server. To make an asynchronous request, evaluate() is preferred over getInfo().
Returns the computed value of this object.
Usage
Returns
Dictionary.getInfo(callback)
Object
Argument
Type
Details
this: computedobject
ComputedObject
The ComputedObject instance.
callback
Function, optional
An optional callback. If not supplied, the call is made synchronously.
ee.Dictionary.getNumber
Extracts a named number value from a dictionary.
Usage
Returns
Dictionary.getNumber(key)
Number
Argument
Type
Details
this: dictionary
Dictionary
key
String
ee.Dictionary.getString
Extracts a named string value from a dictionary.
Usage
Returns
Dictionary.getString(key)
String
Argument
Type
Details
this: dictionary
Dictionary
key
String
ee.Dictionary.keys
Retrieve the keys of a dictionary as a list. The keys will be sorted in natural order.
Usage
Returns
Dictionary.keys()
List
Argument
Type
Details
this: dictionary
Dictionary
ee.Dictionary.map
Map an algorithm over a dictionary. The algorithm is expected to take 2 arguments, a key from the existing dictionary and the value it corresponds to, and return a new value for the given key. If the algorithm returns null, the key is dropped.
Usage
Returns
Dictionary.map(baseAlgorithm)
Dictionary
Argument
Type
Details
this: dictionary
Dictionary
baseAlgorithm
Algorithm
ee.Dictionary.remove
Returns a dictionary with the specified keys removed.
Usage
Returns
Dictionary.remove(selectors, ignoreMissing)
Dictionary
Argument
Type
Details
this: dictionary
Dictionary
selectors
List
A list of keys names or regular expressions of key names to remove.
ignoreMissing
Boolean, default: false
Ignore selectors that don't match at least 1 key.
ee.Dictionary.rename
Rename elements in a dictionary.
Usage
Returns
Dictionary.rename(from, to, overwrite)
Dictionary
Argument
Type
Details
this: dictionary
Dictionary
from
List
A list of keys to be renamed.
to
List
A list of the new names for the keys listed in the 'from' parameter. Must have the same length as the 'from' list.
overwrite
Boolean, default: false
Allow overwriting existing properties with the same name.
ee.Dictionary.select
Returns a dictionary with only the specified keys.
Usage
Returns
Dictionary.select(selectors, ignoreMissing)
Dictionary
Argument
Type
Details
this: dictionary
Dictionary
selectors
List
A list of keys or regular expressions to select.
ignoreMissing
Boolean, default: false
Ignore selectors that don't match at least 1 key.
ee.Dictionary.serialize
Returns the serialized representation of this object.
Usage
Returns
Dictionary.serialize(legacy)
String
Argument
Type
Details
this: computedobject
ComputedObject
The ComputedObject instance.
legacy
Boolean, optional
Enables legacy format.
ee.Dictionary.set
Set a value in a dictionary.
Usage
Returns
Dictionary.set(key, value)
Dictionary
Argument
Type
Details
this: dictionary
Dictionary
key
String
value
Object
ee.Dictionary.size
Returns the number of entries in a dictionary.
Usage
Returns
Dictionary.size()
Integer
Argument
Type
Details
this: dictionary
Dictionary
ee.Dictionary.toArray
Returns numeric values of a dictionary as an array. If no keys are specified, all values are returned in the natural ordering of the dictionary's keys. The default 'axis' is 0.
Usage
Returns
Dictionary.toArray(keys, axis)
Array
Argument
Type
Details
this: dictionary
Dictionary
keys
List, default: null
axis
Integer, default: 0
ee.Dictionary.toImage
Creates an image of constants from values in a dictionary. The bands of the image are ordered and named according to the names argument. If no names are specified, the bands are sorted alpha-numerically.
Usage
Returns
Dictionary.toImage(names)
Image
Argument
Type
Details
this: dictionary
Dictionary
The dictionary to convert.
names
List, default: null
The order of the output bands.
ee.Dictionary.values
Returns the values of a dictionary as a list. If no keys are specified, all values are returned in the natural ordering of the dictionary's keys.
Usage
Returns
Dictionary.values(keys)
List
Argument
Type
Details
this: dictionary
Dictionary
keys
List, default: null
ee.ErrorMargin
Returns an ErrorMargin of the given type with the given value.
Usage
Returns
ee.ErrorMargin(value, unit)
ErrorMargin
Argument
Type
Details
value
Float, default: null
The maximum error value allowed by the margin. Ignored if the unit is 'infinite'.
unit
String, default: "meters"
The unit of this margin: 'meters', 'projected' or 'infinite'.
ee.Feature
Features can be constructed from one of the following arguments plus an optional dictionary of properties:
- An ee.Geometry.
- A GeoJSON Geometry.
- A GeoJSON Feature.
- A computed object: reinterpreted as a geometry if properties are specified, and as a feature if they aren't.
Usage
Returns
ee.Feature(geometry, properties)
Feature
Argument
Type
Details
geometry
ComputedObject|Feature|Geometry|Object
A geometry or feature.
properties
Object, optional
A dictionary of metadata properties. If the first parameter is a Feature (instead of a geometry), this is unused.
ee.Feature.area
Returns the area of the feature's default geometry. Area of points and line strings is 0, and the area of multi geometries is the sum of the areas of their components (intersecting areas are counted multiple times).
Usage
Returns
Feature.area(maxError, proj)
Float
Argument
Type
Details
this: feature
Element
The feature from which the geometry is taken.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the result will be in the units of the coordinate system of this projection. Otherwise it will be in square meters.
ee.Feature.aside
Calls a function passing this object as the first argument, and returning itself. Convenient e.g. when debugging:
Returns a feature containing the bounding box of the geometry of a given feature.
Usage
Returns
Feature.bounds(maxError, proj)
Feature
Argument
Type
Details
this: feature
Element
The feature the bound of which is being calculated.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the result will be in this projection. Otherwise it will be in WGS84.
ee.Feature.buffer
Returns the input buffered by a given distance. If the distance is positive, the geometry is expanded, and if the distance is negative, the geometry is contracted.
Usage
Returns
Feature.buffer(distance, maxError, proj)
Feature
Argument
Type
Details
this: feature
Element
The feature the geometry of which is being buffered.
distance
Float
The distance of the buffering, which may be negative. If no projection is specified, the unit is meters. Otherwise the unit is in the coordinate system of the projection.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when approximating the buffering circle and performing any necessary reprojection. If unspecified, defaults to 1% of the distance.
proj
Projection, default: null
If specified, the buffering will be performed in this projection and the distance will be interpreted as units of the coordinate system of this projection. Otherwise the distance is interpereted as meters and the buffering is performed in a spherical coordinate system.
ee.Feature.centroid
Returns a feature containing the point at the center of the highest-dimension components of the geometry of a feature. Lower-dimensional components are ignored, so the centroid of a geometry containing two polygons, three lines and a point is equivalent to the centroid of a geometry containing just the two polygons.
Usage
Returns
Feature.centroid(maxError, proj)
Feature
Argument
Type
Details
this: feature
Element
Calculates the centroid of this feature's default geometry.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the result will be in this projection. Otherwise it will be in WGS84.
ee.Feature.containedIn
Returns true if and only if the geometry of one feature is contained in the geometry of another.
Usage
Returns
Feature.containedIn(right, maxError, proj)
Boolean
Argument
Type
Details
this: left
Element
The feature containing the geometry used as the left operand of the operation.
right
Element
The feature containing the geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Feature.contains
Returns true if and only if the geometry of one feature contains the geometry of another.
Usage
Returns
Feature.contains(right, maxError, proj)
Boolean
Argument
Type
Details
this: left
Element
The feature containing the geometry used as the left operand of the operation.
right
Element
The feature containing the geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Feature.convexHull
Returns the feature, with the geometry replaced by the convex hull of the original geometry. The convex hull of a single point is the point itself, the convex hull of collinear points is a line, and the convex hull of everything else is a polygon. Note that a degenerate polygon with all vertices on the same line will result in a line segment.
Usage
Returns
Feature.convexHull(maxError, proj)
Feature
Argument
Type
Details
this: feature
Element
The feature containing the geometry whole hull is being calculated.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Feature.copyProperties
Copies metadata properties from one element to another.
The properties to copy. If omitted, all ordinary (i.e. non-system) properties are copied.
exclude
List, default: null
The list of properties to exclude when copying all properties. Must not be specified if properties is.
ee.Feature.cutLines
Converts LineString, MultiLineString, and LinearRing geometries into a MultiLineString by cutting them into parts no longer than the given distance along their length. All other geometry types will be converted to an empty MultiLineString.
Usage
Returns
Feature.cutLines(distances, maxError, proj)
Feature
Argument
Type
Details
this: feature
Element
Cuts the lines of this feature's default geometry.
distances
List
Distances along each LineString to cut the line into separate pieces, measured in units of the given proj, or meters if proj is unspecified.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
Projection of the result and distance measurements, or WGS84 if unspecified.
ee.Feature.difference
Returns a feature with the properties of the 'left' feature, and the geometry that results from subtracting the 'right' geometry from the 'left' geometry.
Usage
Returns
Feature.difference(right, maxError, proj)
Feature
Argument
Type
Details
this: left
Element
The feature containing the geometry used as the left operand of the operation. The properties of the result will be copied from this object.
right
Element
The feature containing the geometry used as the right operand of the operation. The properties of this object are ignored.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Feature.disjoint
Returns true if and only if the feature geometries are disjoint.
Usage
Returns
Feature.disjoint(right, maxError, proj)
Boolean
Argument
Type
Details
this: left
Element
The feature containing the geometry used as the left operand of the operation.
right
Element
The feature containing the geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Feature.dissolve
Returns a feature containing the union of the geometry of a feature. This leaves single geometries untouched, and unions multi geometries.
Usage
Returns
Feature.dissolve(maxError, proj)
Element
Argument
Type
Details
this: feature
Element
The feature the geometry of which is being unioned.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the union will be performed in this projection. Otherwise it will be performed in a spherical coordinate system.
ee.Feature.distance
Returns the minimum distance between the geometries of two features.
Usage
Returns
Feature.distance(right, maxError, proj)
Float
Argument
Type
Details
this: left
Element
The feature containing the geometry used as the left operand of the operation.
right
Element
The feature containing the geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Feature.evaluate
Asynchronously retrieves the value of this object from the server and passes it to the provided callback function.
Usage
Returns
Feature.evaluate(callback)
Argument
Type
Details
this: computedobject
ComputedObject
The ComputedObject instance.
callback
Function
A function of the form function(success, failure), called when the server returns an answer. If the request succeeded, the success argument contains the evaluated result. If the request failed, the failure argument will contains an error message.
ee.Feature.geometry
Returns the geometry of a given feature in a given projection.
Usage
Returns
Feature.geometry(maxError, proj, geodesics)
Geometry
Argument
Type
Details
this: feature
Element
The feature from which the geometry is taken.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the geometry will be in this projection. If unspecified, the geometry will be in its default projection.
geodesics
Boolean, default: null
If true, the geometry will have geodesic edges. If false, it will have edges as straight lines in the specified projection. If null, the edge interpretation will be the same as the original geometry. This argument is ignored if proj is not specified.
ee.Feature.get
Extract a property from a feature.
Usage
Returns
Feature.get(property)
Argument
Type
Details
this: object
Element
The feature to extract the property from.
property
String
The property to extract.
ee.Feature.getArray
Extract a property from a feature.
Usage
Returns
Feature.getArray(property)
Array
Argument
Type
Details
this: object
Element
The feature to extract the property from.
property
String
The property to extract.
ee.Feature.getInfo
An imperative function that returns information about this feature via an AJAX call.
Returns a description of the feature.
Usage
Returns
Feature.getInfo(callback)
GeoJSONFeature
Argument
Type
Details
this: feature
Feature
The Feature instance.
callback
Function, optional
An optional callback. If not supplied, the call is made synchronously. If supplied, will be called with the first parameter if successful and the second if unsuccessful.
ee.Feature.getMapId
An imperative function that returns a map ID and optional token, suitable for generating a Map overlay.
Returns an object which may be passed to ee.data.getTileUrl or ui.Map.addLayer, including an additional 'image' field, containing a Collection.draw image wrapping a FeatureCollection containing this feature. Undefined if a callback was specified.
Usage
Returns
Feature.getMapId(visParams, callback)
MapId|Object
Argument
Type
Details
this: feature
Feature
The Feature instance.
visParams
Object, optional
The visualization parameters. Currently only one parameter, 'color', containing an RGB color string is allowed. If visParams is not specified, black ("000000") is used.
callback
Function, optional
An async callback.
ee.Feature.getNumber
Extract a property from a feature.
Usage
Returns
Feature.getNumber(property)
Number
Argument
Type
Details
this: object
Element
The feature to extract the property from.
property
String
The property to extract.
ee.Feature.getString
Extract a property from a feature.
Usage
Returns
Feature.getString(property)
String
Argument
Type
Details
this: object
Element
The feature to extract the property from.
property
String
The property to extract.
ee.Feature.hersDescriptor
Creates a dictionary of Histogram Error Ring Statistic (HERS) descriptor arrays from square array properties of an element. The HERS radius is taken to be the array's (side_length - 1) / 2.
The array properties for which descriptors will be created. Selected array properties must be square, floating point arrays. Defaults to all array properties.
buckets
Integer, default: 100
The number of HERS buckets. Defaults to 100.
peakWidthScale
Float, default: 1
The HERS peak width scale. Defaults to 1.0.
ee.Feature.id
Returns the ID of a given element within a collection. Objects outside collections are not guaranteed to have IDs.
Usage
Returns
Feature.id()
String
Argument
Type
Details
this: element
Element
The element from which the ID is taken.
ee.Feature.intersection
Returns a feature containing the intersection of the geometries of two features, with the properties of the left feature.
Usage
Returns
Feature.intersection(right, maxError, proj)
Feature
Argument
Type
Details
this: left
Element
The feature containing the geometry used as the left operand of the operation. The properties of the result will be copied from this object.
right
Element
The feature containing the geometry used as the right operand of the operation. The properties of this object are ignored.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Feature.intersects
Returns true if and only if the feature geometries intersect.
Usage
Returns
Feature.intersects(right, maxError, proj)
Boolean
Argument
Type
Details
this: left
Element
The feature containing the geometry used as the left operand of the operation.
right
Element
The feature containing the geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Feature.length
Returns the length of the linear parts of the geometry of a given feature. Polygonal parts are ignored. The length of multi geometries is the sum of the lengths of their components.
Usage
Returns
Feature.length(maxError, proj)
Float
Argument
Type
Details
this: feature
Element
The feature from which the geometry is taken.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the result will be in the units of the coordinate system of this projection. Otherwise it will be in meters.
ee.Feature.perimeter
Returns the length of the perimeter of the polygonal parts of the geometry of a given feature. The perimeter of multi geometries is the sum of the perimeters of their components.
Usage
Returns
Feature.perimeter(maxError, proj)
Float
Argument
Type
Details
this: feature
Element
The feature from which the geometry is taken.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the result will be in the units of the coordinate system of this projection. Otherwise it will be in meters.
ee.Feature.propertyNames
Returns the names of properties on this element.
Usage
Returns
Feature.propertyNames()
List
Argument
Type
Details
this: element
Element
ee.Feature.select
Selects properties from a feature by name or RE2-compatible regex and optionally renames them.
A list of names or regexes specifying the properties to select.
newProperties
List, default: null
Optional new names for the output properties. Must match the number of properties selected.
retainGeometry
Boolean, default: true
When false, the result will have a NULL geometry.
ee.Feature.serialize
Returns the serialized representation of this object.
Usage
Returns
Feature.serialize(legacy)
String
Argument
Type
Details
this: computedobject
ComputedObject
The ComputedObject instance.
legacy
Boolean, optional
Enables legacy format.
ee.Feature.set
Overrides one or more metadata properties of an Element.
Returns the element with the specified properties overridden.
Usage
Returns
Feature.set(var_args)
Element
Argument
Type
Details
this: element
Element
The Element instance.
var_args
VarArgs
Either a dictionary of properties, or a vararg sequence of properties, e.g. key1, value1, key2, value2, ...
ee.Feature.setGeometry
Returns the feature, with the geometry replaced by the specified geometry.
Usage
Returns
Feature.setGeometry(geometry)
Element
Argument
Type
Details
this: feature
Element
The feature on which to set the geometry.
geometry
Geometry, default: null
The geometry to set.
ee.Feature.simplify
Simplifies the geometry of a feature to within a given error margin. Note that this does not respect the error margin requested by the consumer of this algorithm, unless maxError is explicitly specified to be null.
This overrides the default Earth Engine policy for propagating error margins, so regardless of the geometry accuracy requested from the output, the inputs will be requested with the error margin specified in the arguments to this algorithm. This results in consistent rendering at all zoom levels of a rendered vector map, but at lower zoom levels (i.e. zoomed out), the geometry won't be simplified, which may harm performance.
Usage
Returns
Feature.simplify(maxError, proj)
Feature
Argument
Type
Details
this: feature
Element
The feature whose geometry is being simplified.
maxError
ErrorMargin
The maximum amount of error by which the result may differ from the input.
proj
Projection, default: null
If specified, the result will be in this projection. Otherwise it will be in the same projection as the input. If the error margin is in projected units, the margin will be interpreted as units of this projection
ee.Feature.symmetricDifference
Returns a feature containing the symmetric difference between geometries of two features.
The feature containing the geometry used as the left operand of the operation. The properties of the result will be copied from this object.
right
Element
The feature containing the geometry used as the right operand of the operation. The properties of this object are ignored.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Feature.toArray
Creates an array from the given properties of an object, which must all be numbers.
Usage
Returns
Feature.toArray(properties)
Array
Argument
Type
Details
this: feature
Feature
The object from which to select array properties.
properties
List
The property selectors for each array element.
ee.Feature.toDictionary
Extract properties from a feature as a dictionary.
Usage
Returns
Feature.toDictionary(properties)
Dictionary
Argument
Type
Details
this: element
Element
The feature to extract the property from.
properties
List, default: null
The list of properties to extract. Defaults to all non-system properties.
ee.Feature.transform
Transforms the geometry of a feature to a specific projection.
Usage
Returns
Feature.transform(proj, maxError)
Feature
Argument
Type
Details
this: feature
Element
The feature the geometry of which is being converted.
proj
Projection, optional
The target projection. Defaults to WGS84. If this has a geographic CRS, the edges of the geometry will be interpreted as geodesics. Otherwise they will be interpreted as straight lines in the projection.
maxError
ErrorMargin, default: null
The maximum projection error.
ee.Feature.union
Returns a feature containing the union of the geometries of two features.
Usage
Returns
Feature.union(right, maxError, proj)
Feature
Argument
Type
Details
this: left
Element
The feature containing the geometry used as the left operand of the operation. The properties of the result will be copied from this object.
right
Element
The feature containing the geometry used as the right operand of the operation. The properties of this object are ignored.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Feature.withinDistance
Returns true if and only if the geometries of two features are within a specified distance.
The feature containing the geometry used as the left operand of the operation.
right
Element
The feature containing the geometry used as the right operand of the operation.
distance
Float
The distance threshold. If a projection is specified, the distance is in units of that projected coordinate system, otherwise it is in meters.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.FeatureCollection
FeatureCollections can be constructed from the following arguments:
- A string: assumed to be the name of a collection.
- A single geometry.
- A single feature.
- A list of features.
- A GeoJSON FeatureCollection
- A computed object: reinterpreted as a collection.
The property to use from each element of the collection.
ee.FeatureCollection.aggregate_first
Aggregates over a given property of the objects in a collection, calculating the property value of the first object in the collection.
Usage
Returns
FeatureCollection.aggregate_first(property)
Argument
Type
Details
this: collection
FeatureCollection
The collection to aggregate over.
property
String
The property to use from each element of the collection.
ee.FeatureCollection.aggregate_histogram
Aggregates over a given property of the objects in a collection, calculating a histogram of the selected property.
Usage
Returns
FeatureCollection.aggregate_histogram(property)
Dictionary
Argument
Type
Details
this: collection
FeatureCollection
The collection to aggregate over.
property
String
The property to use from each element of the collection.
ee.FeatureCollection.aggregate_max
Aggregates over a given property of the objects in a collection, calculating the maximum of the values of the selected property.
Usage
Returns
FeatureCollection.aggregate_max(property)
Argument
Type
Details
this: collection
FeatureCollection
The collection to aggregate over.
property
String
The property to use from each element of the collection.
ee.FeatureCollection.aggregate_mean
Aggregates over a given property of the objects in a collection, calculating the mean of the selected property.
Usage
Returns
FeatureCollection.aggregate_mean(property)
Number
Argument
Type
Details
this: collection
FeatureCollection
The collection to aggregate over.
property
String
The property to use from each element of the collection.
ee.FeatureCollection.aggregate_min
Aggregates over a given property of the objects in a collection, calculating the minimum of the values of the selected property.
Usage
Returns
FeatureCollection.aggregate_min(property)
Argument
Type
Details
this: collection
FeatureCollection
The collection to aggregate over.
property
String
The property to use from each element of the collection.
ee.FeatureCollection.aggregate_product
Aggregates over a given property of the objects in a collection, calculating the product of the values of the selected property.
Usage
Returns
FeatureCollection.aggregate_product(property)
Number
Argument
Type
Details
this: collection
FeatureCollection
The collection to aggregate over.
property
String
The property to use from each element of the collection.
ee.FeatureCollection.aggregate_sample_sd
Aggregates over a given property of the objects in a collection, calculating the sample std. deviation of the values of the selected property.
Usage
Returns
FeatureCollection.aggregate_sample_sd(property)
Number
Argument
Type
Details
this: collection
FeatureCollection
The collection to aggregate over.
property
String
The property to use from each element of the collection.
ee.FeatureCollection.aggregate_sample_var
Aggregates over a given property of the objects in a collection, calculating the sample variance of the values of the selected property.
Usage
Returns
FeatureCollection.aggregate_sample_var(property)
Number
Argument
Type
Details
this: collection
FeatureCollection
The collection to aggregate over.
property
String
The property to use from each element of the collection.
ee.FeatureCollection.aggregate_stats
Aggregates over a given property of the objects in a collection, calculating the sum, min, max, mean, sample standard deviation, sample variance, total standard deviation and total variance of the selected property.
Usage
Returns
FeatureCollection.aggregate_stats(property)
Dictionary
Argument
Type
Details
this: collection
FeatureCollection
The collection to aggregate over.
property
String
The property to use from each element of the collection.
ee.FeatureCollection.aggregate_sum
Aggregates over a given property of the objects in a collection, calculating the sum of the values of the selected property.
Usage
Returns
FeatureCollection.aggregate_sum(property)
Number
Argument
Type
Details
this: collection
FeatureCollection
The collection to aggregate over.
property
String
The property to use from each element of the collection.
ee.FeatureCollection.aggregate_total_sd
Aggregates over a given property of the objects in a collection, calculating the total std. deviation of the values of the selected property.
Usage
Returns
FeatureCollection.aggregate_total_sd(property)
Number
Argument
Type
Details
this: collection
FeatureCollection
The collection to aggregate over.
property
String
The property to use from each element of the collection.
ee.FeatureCollection.aggregate_total_var
Aggregates over a given property of the objects in a collection, calculating the total variance of the values of the selected property.
Usage
Returns
FeatureCollection.aggregate_total_var(property)
Number
Argument
Type
Details
this: collection
FeatureCollection
The collection to aggregate over.
property
String
The property to use from each element of the collection.
ee.FeatureCollection.aside
Calls a function passing this object as the first argument, and returning itself. Convenient e.g. when debugging:
The properties to copy. If omitted, all ordinary (i.e. non-system) properties are copied.
exclude
List, default: null
The list of properties to exclude when copying all properties. Must not be specified if properties is.
ee.FeatureCollection.distance
Produces a DOUBLE image where each pixel is the distance in meters from the pixel center to the nearest Point, LineString, or polygonal boundary in the collection. Note distance is also measured within interiors of polygons. Pixels that are not within 'searchRadius' meters of a geometry will be masked out.
Distances are computed on a sphere, so there is a small error proportional to the latitude difference between each pixel and the nearest geometry.
Feature collection from which to get features used to compute pixel distances.
searchRadius
Float, default: 100000
Maximum distance in meters from each pixel to look for edges. Pixels will be masked unless there are edges within this distance.
maxError
Float, default: 100
Maximum reprojection error in meters, only used if the input polylines require reprojection. If '0' is provided, then this operation will fail if projection is required.
ee.FeatureCollection.distinct
Removes duplicates from a collection. Note that duplicates are determined using a strong hash over the serialized form of the selected properties.
Usage
Returns
FeatureCollection.distinct(properties)
FeatureCollection
Argument
Type
Details
this: collection
FeatureCollection
The input collection from which objects will be selected.
properties
Object
A property name or a list of property names to use for comparison. The '.geo' property can be included to compare object geometries.
ee.FeatureCollection.draw
Paints a vector collection for visualization. Not intended for use as input to other algorithms.
A hex string in the format RRGGBB specifying the color to use for drawing the features.
pointRadius
Integer, default: 3
The radius in pixels of the point markers.
strokeWidth
Integer, default: 2
The width in pixels of lines and polygon borders.
ee.FeatureCollection.errorMatrix
Computes a 2D error matrix for a collection by comparing two columns of a collection: one containing the actual values, and one containing predicted values.The values are expected to be small contiguous integers, starting from 0. Axis 0 (the rows) of the matrix correspond to the actual values, and Axis 1 (the columns) to the predicted values.
The name of the property containing the actual value.
predicted
String
The name of the property containing the predicted value.
order
List, default: null
A list of the expected values. If this argument is not specified, the values are assumed to be contiguous and span the range 0 to maxValue. If specified, only values matching this list are used, and the matrix will have dimensions and order matching the this list.
ee.FeatureCollection.evaluate
Asynchronously retrieves the value of this object from the server and passes it to the provided callback function.
Usage
Returns
FeatureCollection.evaluate(callback)
Argument
Type
Details
this: computedobject
ComputedObject
The ComputedObject instance.
callback
Function
A function of the form function(success, failure), called when the server returns an answer. If the request succeeded, the success argument contains the evaluated result. If the request failed, the failure argument will contains an error message.
ee.FeatureCollection.filter
Apply a filter to this collection.
Returns the filtered collection.
Usage
Returns
FeatureCollection.filter(filter)
Collection
Argument
Type
Details
this: collection
Collection
The Collection instance.
filter
Filter
A filter to apply to this collection.
ee.FeatureCollection.filterBounds
Shortcut to filter a collection by intersection with geometry. Items in the collection with a footprint that fails to intersect the given geometry will be excluded.
This is equivalent to this.filter(ee.Filter.bounds(...)).
Returns the filtered collection.
Usage
Returns
FeatureCollection.filterBounds(geometry)
Collection
Argument
Type
Details
this: collection
Collection
The Collection instance.
geometry
ComputedObject|FeatureCollection|Geometry
The geometry, feature or collection to intersect with.
ee.FeatureCollection.filterDate
Shortcut to filter a collection by a date range. The start and end may be Dates, numbers (interpreted as milliseconds since 1970-01-01T00:00:00Z), or strings (such as '1996-01-01T08:00'). Based on 'system:time_start'.
This is equivalent to this.filter(ee.Filter.date(...)); see the ee.Filter type for other date filtering options.
Returns the filtered collection.
Usage
Returns
FeatureCollection.filterDate(start, end)
Collection
Argument
Type
Details
this: collection
Collection
The Collection instance.
start
Date|Number|String
The start date (inclusive).
end
Date|Number|String, optional
The end date (exclusive). Optional. If not specified, a 1-millisecond range starting at 'start' is created.
ee.FeatureCollection.first
Returns the first entry from a given collection.
Usage
Returns
FeatureCollection.first()
Element
Argument
Type
Details
this: collection
FeatureCollection
The collection from which to select the first entry.
ee.FeatureCollection.flatten
Flattens collections of collections.
Usage
Returns
FeatureCollection.flatten()
FeatureCollection
Argument
Type
Details
this: collection
FeatureCollection
The input collection of collections.
ee.FeatureCollection.geometry
Extracts and merges the geometries of a collection. Requires that all the geometries in the collection share the projection and edge interpretation.
Usage
Returns
FeatureCollection.geometry(maxError)
Geometry
Argument
Type
Details
this: collection
FeatureCollection
The collection whose geometries will be extracted.
maxError
ErrorMargin, optional
An error margin to use when merging geometries.
ee.FeatureCollection.get
Extract a property from a feature.
Usage
Returns
FeatureCollection.get(property)
Argument
Type
Details
this: object
Element
The feature to extract the property from.
property
String
The property to extract.
ee.FeatureCollection.getArray
Extract a property from a feature.
Usage
Returns
FeatureCollection.getArray(property)
Array
Argument
Type
Details
this: object
Element
The feature to extract the property from.
property
String
The property to extract.
ee.FeatureCollection.getDownloadURL
Gets a download URL. When the URL is accessed, the FeatureCollection is downloaded in one of several formats.
Returns a download URL or undefined if a callback was specified.
The format of download, one of:
"csv", "json", "geojson", "kml", "kmz" ("json" outputs GeoJSON). If unspecified, defaults to "csv".
selectors
List, optional
Feature property names used to select the attributes to be downloaded. If unspecified, all properties are included.
filename
String, optional
Name of the file to be downloaded; extension is appended by default. If unspecified, defaults to "table".
callback
Function, optional
An optional callback. If not supplied, the call is made synchronously.
ee.FeatureCollection.getInfo
An imperative function that returns all the known information about this collection via an AJAX call.
Returns a collection description whose fields include:
- features: a list containing metadata about the features in the collection.
- properties: an optional dictionary containing the collection's metadata properties.
Usage
Returns
FeatureCollection.getInfo(callback)
FeatureCollectionDescription
Argument
Type
Details
this: featurecollection
FeatureCollection
The FeatureCollection instance.
callback
Function, optional
An optional callback. If not supplied, the call is made synchronously. If supplied, will be called with the first parameter if successful and the second if unsuccessful.
ee.FeatureCollection.getMapId
An imperative function that returns a map ID and optional token, suitable for generating a Map overlay.
Returns an object which may be passed to ee.data.getTileUrl or ui.Map.addLayer, including an additional 'image' field, containing a Collection.draw image wrapping a FeatureCollection containing this feature. Undefined if a callback was specified.
Usage
Returns
FeatureCollection.getMapId(visParams, callback)
MapId|Object
Argument
Type
Details
this: featurecollection
FeatureCollection
The FeatureCollection instance.
visParams
Object, optional
The visualization parameters. Currently only one parameter, 'color', containing an RGB color string is allowed. If visParams is not specified, black ("000000") is used.
callback
Function, optional
An async callback.
ee.FeatureCollection.getNumber
Extract a property from a feature.
Usage
Returns
FeatureCollection.getNumber(property)
Number
Argument
Type
Details
this: object
Element
The feature to extract the property from.
property
String
The property to extract.
ee.FeatureCollection.getString
Extract a property from a feature.
Usage
Returns
FeatureCollection.getString(property)
String
Argument
Type
Details
this: object
Element
The feature to extract the property from.
property
String
The property to extract.
ee.FeatureCollection.inverseDistance
Returns an inverse-distance weighted estimate of the value at each pixel.
Feature collection to use as source data for the estimation.
range
Float
Size of the interpolation window (in meters).
propertyName
String
Name of the numeric property to be estimated.
mean
Float
Global expected mean.
stdDev
Float
Global standard deviation.
gamma
Float, default: 1
Determines how quickly the estimates tend towards the global mean.
reducer
Reducer, default: null
Reducer used to collapse the 'propertyName' value of overlapping points into a single value.
ee.FeatureCollection.iterate
Applies a user-supplied function to each element of a collection. The user-supplied function is given two arguments: the current element, and the value returned by the previous call to iterate() or the first argument, for the first iteration. The result is the value returned by the final call to the user-supplied function.
Returns the result of the Collection.iterate() call.
Usage
Returns
FeatureCollection.iterate(algorithm, first)
ComputedObject
Argument
Type
Details
this: collection
Collection
The Collection instance.
algorithm
Function
The function to apply to each element. Must take two arguments: an element of the collection and the value from the previous iteration.
first
Object, optional
The initial state.
ee.FeatureCollection.kriging
Returns the results of sampling a Kriging estimator at each pixel.
Feature collection to use as source data for the estimation.
propertyName
String
Property to be estimated (must be numeric).
shape
String
Semivariogram shape (one of {exponential, gaussian, spherical}).
range
Float
Semivariogram range, in meters.
sill
Float
Semivariogram sill.
nugget
Float
Semivariogram nugget.
maxDistance
Float, default: null
Radius which determines which features are included in each pixel's computation, in meters. Defaults to the semivariogram's range.
reducer
Reducer, default: null
Reducer used to collapse the 'propertyName' value of overlapping points into a single value.
ee.FeatureCollection.limit
Limit a collection to the specified number of elements, optionally sorting them by a specified property first.
Returns the limited collection.
Usage
Returns
FeatureCollection.limit(max, property, ascending)
Collection
Argument
Type
Details
this: collection
Collection
The Collection instance.
max
Number
The number to limit the collection to.
property
String, optional
The property to sort by, if sorting.
ascending
Boolean, optional
Whether to sort in ascending or descending order. The default is true (ascending).
ee.FeatureCollection.makeArray
Add a 1-D Array to each feature in a collection by combining a list of properties for each feature into a 1-D Array. All of the properties must be numeric values. If a feature doesn't contain all of the named properties, or any of them aren't numeric, the feature will be dropped from the resulting collection.
Usage
Returns
FeatureCollection.makeArray(properties, name)
FeatureCollection
Argument
Type
Details
this: collection
FeatureCollection
The input collection from which properties will be selected.
properties
List
The properties to select.
name
String, default: "array"
The name of the new array property.
ee.FeatureCollection.map
Maps an algorithm over a collection.
Returns the mapped collection.
Usage
Returns
FeatureCollection.map(algorithm, dropNulls)
Collection
Argument
Type
Details
this: collection
Collection
The Collection instance.
algorithm
Function
The operation to map over the images or features of the collection. A JavaScript function that receives an image or features and returns one. The function is called only once and the result is captured as a description, so it cannot perform imperative operations or rely on external state.
dropNulls
Boolean, optional
If true, the mapped algorithm is allowed to return nulls, and the elements for which it returns nulls will be dropped.
ee.FeatureCollection.merge
Merges two collections into one. The result has all the elements that were in either collection.
Elements from the first collection will have IDs prefixed with "1" and elements from the second collection will have IDs prefixed with "2".
Usage
Returns
FeatureCollection.merge(collection2)
FeatureCollection
Argument
Type
Details
this: collection1
FeatureCollection
The first collection to merge.
collection2
FeatureCollection
The second collection to merge.
ee.FeatureCollection.propertyNames
Returns the names of properties on this element.
Usage
Returns
FeatureCollection.propertyNames()
List
Argument
Type
Details
this: element
Element
ee.FeatureCollection.randomColumn
Adds a column of deterministic pseudorandom numbers to a collection. The outputs are double-precision floating point numbers. When using the 'uniform' distribution (default), outputs are in the range of [0, 1). Using the 'normal' distribution, outputs have μ=0, 𝛔=1, but have no explicit limits.
The input collection to which to add a random column.
columnName
String, default: "random"
The name of the column to add.
seed
Long, default: 0
A seed used when generating the random numbers.
distribution
String, default: "uniform"
The distribution type of random numbers to produce; one of 'uniform' or 'normal'.
ee.FeatureCollection.randomPoints
Generates points that are uniformly random in the given geometry. If the geometry is two-dimensional (polygon or multi-polygon) then the returned points are uniformly distributed on the given region of the sphere. If the geometry is one-dimensional (linestrings), the returned points are interpolated uniformly along the geometry's edges. If the geometry has dimension zero (points), the returned points are sampled uniformly from the input points. If a multi-geometry of mixed dimension is given, points are sampled from the component geometries with the highest dimension.
Feature collection to intersect with each output pixel.
properties
List
Properties to select from each feature and pass into the reducer.
reducer
Reducer
A Reducer to combine the properties of each intersecting feature into a final result to store in the pixel.
ee.FeatureCollection.remap
Remaps the value of a specific property in a collection. Takes two parallel lists and maps values found in one to values in the other. Any element with a value that is not specified in the first list is dropped from the output collection.
The input mapping values. Restricted to strings and integers.
lookupOut
List
The output mapping values. Must be the same size as lookupIn.
columnName
String
The name of the property to remap.
ee.FeatureCollection.select
Select properties from each Feature in a collection. It is also possible to call this function with only string arguments; they will be all be interpreted as propertySelectors (varargs).
Returns the feature collection with selected properties.
A default color (CSS 3.0 color value e.g. 'FF0000' or 'red') to use for drawing the features. Supports opacity (e.g.: 'FF000088' for 50% transparent red).
pointSize
Integer, default: 3
The default size in pixels of the point markers.
pointShape
String, default: "circle"
The default shape of the marker to draw at each point location. One of: `circle`, `square`, `diamond`, `cross`, `plus`, `pentagram`, `hexagram`, `triangle`, `triangle_up`, `triangle_down`, `triangle_left`, `triangle_right`, `pentagon`, `hexagon`, `star5`, `star6`. This argument also supports the following Matlab marker abbreviations: `o`, `s`, `d`, `x`, `+`, `p`, `h`, `^`, `v`, `<`, `>`.
width
Float, default: 2
The default line width for lines and outlines for polygons and point shapes.
fillColor
String, default: null
The color for filling polygons and point shapes. Defaults to 'color' at 0.66 opacity.
styleProperty
String, default: null
A per-feature property expected to contain a dictionary. Values in the dictionary override any default values for that feature.
neighborhood
Integer, default: 5
If styleProperty is used and any feature has a pointSize or width larger than the defaults, tiling artifacts can occur. Specifies the maximum neighborhood (pointSize + width) needed for any feature.
lineType
String, default: "solid"
The default line style for lines and outlines of polygons and point shapes. Defaults to 'solid'. One of: solid, dotted, dashed.
ee.FeatureCollection.toDictionary
Extract properties from a feature as a dictionary.
Usage
Returns
FeatureCollection.toDictionary(properties)
Dictionary
Argument
Type
Details
this: element
Element
The feature to extract the property from.
properties
List, default: null
The list of properties to extract. Defaults to all non-system properties.
ee.FeatureCollection.toList
Returns the elements of a collection as a list.
Usage
Returns
FeatureCollection.toList(count, offset)
List
Argument
Type
Details
this: collection
FeatureCollection
The input collection to fetch.
count
Integer
The maximum number of elements to fetch.
offset
Integer, default: 0
The number of elements to discard from the start. If set, (offset + count) elements will be fetched and the first offset elements will be discarded.
ee.FeatureCollection.union
Merges all geometries in a given collection into one and returns a collection containing a single feature with only an ID of 'union_result' and a geometry.
Usage
Returns
FeatureCollection.union(maxError)
FeatureCollection
Argument
Type
Details
this: collection
FeatureCollection
The collection being merged.
maxError
ErrorMargin, default: null
The maximum error allowed when performing any necessary reprojections. If not specified, defaults to the error margin requested from the output.
ee.Filter
Constructs a new filter. This constructor accepts the following args:
- Another filter.
- A list of filters (which are implicitly ANDed together).
- A ComputedObject returning a filter. Users shouldn't be making these; they're produced by the generator functions below.
Usage
Returns
ee.Filter(filter)
Filter
Argument
Type
Details
filter
Filter|List, optional
Optional filter to add.
ee.Filter.and
Combine two or more filters using boolean AND.
Returns the constructed filter.
Usage
Returns
ee.Filter.and(var_args)
Filter
Argument
Type
Details
var_args
VarArgs
The filters to combine.
ee.Filter.area
Returns a filter that passes if the specified geometry has an area within the given range (inclusive).
Creates a filter that passes if the object's geometry intersects the given geometry.
Returns the constructed filter.
Usage
Returns
ee.Filter.bounds(geometry, errorMargin)
Filter
Argument
Type
Details
geometry
ComputedObject|FeatureCollection|Geometry
The geometry, feature or collection to intersect with.
errorMargin
ComputedObject|Number, optional
An optional error margin. If a number, interpreted as sphere surface meters.
ee.Filter.calendarRange
Returns a filter that passes if the object's timestamp falls within the given range of a calendar field. The month, day_of_year, day_of_month, and day_of_week are 1-based. Times are assumed to be in UTC. Weeks are assumed to begin on Monday as day 1. If end < start then this tests for value >= start OR value <= end, to allow for wrapping.
Usage
Returns
ee.Filter.calendarRange(start, end, field)
Filter
Argument
Type
Details
start
Integer
The start of the desired calendar field, inclusive.
end
Integer, default: null
The end of the desired calendar field, inclusive. Defaults to the same value as start.
field
String, default: "day_of_year"
The calendar field to filter over. Options are: `year`, `month`, `hour`, `minute`, `day_of_year`, `day_of_month`, and `day_of_week`.
ee.Filter.contains
Creates a unary or binary filter that passes if the left geometry contains the right geometry (empty geometries are not contained in anything).
A selector for the left operand. Should not be specified if leftValue is specified.
rightValue
Object, default: null
The value of the right operand. Should not be specified if rightField is specified.
rightField
String, default: null
A selector for the right operand. Should not be specified if rightValue is specified.
leftValue
Object, default: null
The value of the left operand. Should not be specified if leftField is specified.
ee.Filter.evaluate
Asynchronously retrieves the value of this object from the server and passes it to the provided callback function.
Usage
Returns
Filter.evaluate(callback)
Argument
Type
Details
this: computedobject
ComputedObject
The ComputedObject instance.
callback
Function
A function of the form function(success, failure), called when the server returns an answer. If the request succeeded, the success argument contains the evaluated result. If the request failed, the failure argument will contains an error message.
ee.Filter.expression
Constructs a filter tree from a string.
Usage
Returns
ee.Filter.expression(expression)
Filter
Argument
Type
Details
expression
String
A string to be parsed into a Filter object (e.g.: "property > value"). Supported operators include: >, >=, <, <=, ==, !=, (), !, && and ||.
ee.Filter.getInfo
Retrieves the value of this object from the server.
If no callback function is provided, the request is made synchronously. If a callback is provided, the request is made asynchronously.
The asynchronous mode is preferred because the synchronous mode stops all other code (for example, the EE Code Editor UI) while waiting for the server. To make an asynchronous request, evaluate() is preferred over getInfo().
Returns the computed value of this object.
Usage
Returns
Filter.getInfo(callback)
Object
Argument
Type
Details
this: computedobject
ComputedObject
The ComputedObject instance.
callback
Function, optional
An optional callback. If not supplied, the call is made synchronously.
ee.Filter.greaterThan
Creates a unary or binary filter that passes if the left operand is greater than the right operand.
A selector for the left operand. Should not be specified if leftValue is specified.
rightValue
Object, default: null
The value of the right operand. Should not be specified if rightField is specified.
rightField
String, default: null
A selector for the right operand. Should not be specified if rightValue is specified.
leftValue
Object, default: null
The value of the left operand. Should not be specified if leftField is specified.
ee.Filter.lt
Filter to metadata less than the given value.
Returns the constructed filter.
Usage
Returns
ee.Filter.lt(name, value)
Filter
Argument
Type
Details
name
String
The property name to filter on.
value
Object
The value to compare against.
ee.Filter.lte
Filter on metadata less than or equal to the given value.
Returns the constructed filter.
Usage
Returns
ee.Filter.lte(name, value)
Filter
Argument
Type
Details
name
String
The property name to filter on.
value
Object
The value to compare against.
ee.Filter.maxDifference
Creates a unary or binary filter that passes if the left and right operands, both numbers, are within a given maximum difference. If used as a join condition, this numeric difference is used as a join measure.
A selector for the left operand. Should not be specified if leftValue is specified.
rightValue
Object, default: null
The value of the right operand. Should not be specified if rightField is specified.
rightField
String, default: null
A selector for the right operand. Should not be specified if rightValue is specified.
leftValue
Object, default: null
The value of the left operand. Should not be specified if leftField is specified.
ee.Filter.withinDistance
Creates a unary or binary filter that passes if the left geometry is within a specified distance of the right geometry. If used as a join condition, this distance is used as a join measure.
The maximum distance for which the filter will return true.
leftField
String, default: null
A selector for the left operand. Should not be specified if leftValue is specified.
rightValue
Object, default: null
The value of the right operand. Should not be specified if rightField is specified.
rightField
String, default: null
A selector for the right operand. Should not be specified if rightValue is specified.
leftValue
Object, default: null
The value of the left operand. Should not be specified if leftField is specified.
maxError
ErrorMargin, optional
The maximum reprojection error allowed during filter application.
ee.Geometry
Creates a geometry.
Usage
Returns
ee.Geometry(geoJson, proj, geodesic, evenOdd)
Geometry
Argument
Type
Details
geoJson
Object
The GeoJSON object describing the geometry or a ComputedObject to be reinterpreted as a Geometry. Supports CRS specifications as per the GeoJSON spec, but only allows named
(rather than "linked" CRSs). If this includes a 'geodesic' field, and opt_geodesic is not specified, it will be used as opt_geodesic.
proj
Projection, optional
An optional projection specification, either as a CRS ID code or as a WKT string. If specified, overrides any CRS found in the geoJson parameter. If unspecified and the geoJson does not declare a CRS, defaults to "EPSG:4326" (x=longitude, y=latitude).
geodesic
Boolean, optional
Whether line segments should be interpreted as spherical geodesics. If false, indicates that line segments should be interpreted as planar lines in the specified CRS. If absent, defaults to true if the CRS is geographic (including the default EPSG:4326), or to false if the CRS is projected.
evenOdd
Boolean, optional
If true, polygon interiors will be determined by the even/odd rule, where a point is inside if it crosses an odd number of edges to reach a point at infinity. Otherwise polygons use the left- inside rule, where interiors are on the left side of the shell's edges when walking the vertices in the given order. If unspecified, defaults to true.
ee.Geometry.BBox
Constructs a rectangle whose edges are lines of latitude and longitude.
The result is a planar WGS84 rectangle.
If (east - west) ≥ 360 then the longitude range will be normalized to -180 to
+180; otherwise they will be treated as designating points on a circle (e.g. east may be numerically less than west).
Usage
Returns
ee.Geometry.BBox(west, south, east, north)
Geometry.BBox
Argument
Type
Details
west
Number
The westernmost enclosed longitude. Will be adjusted to lie in the range -180° to 180°.
south
Number
The southernmost enclosed latitude. If less than -90°
(south pole), will be treated as -90°.
east
Number
The easternmost enclosed longitude.
north
Number
The northernmost enclosed latitude. If greater than
+90° (north pole), will be treated as +90°.
ee.Geometry.BBox.area
Returns the area of the geometry. Area of points and line strings is 0, and the area of multi geometries is the sum of the areas of their components (intersecting areas are counted multiple times).
Usage
Returns
BBox.area(maxError, proj)
Float
Argument
Type
Details
this: geometry
Geometry
The geometry input.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the result will be in the units of the coordinate system of this projection. Otherwise it will be in square meters.
ee.Geometry.BBox.aside
Calls a function passing this object as the first argument, and returning itself. Convenient e.g. when debugging:
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the result will be in this projection. Otherwise it will be in WGS84.
ee.Geometry.BBox.buffer
Returns the input buffered by a given distance. If the distance is positive, the geometry is expanded, and if the distance is negative, the geometry is contracted.
Usage
Returns
BBox.buffer(distance, maxError, proj)
Geometry
Argument
Type
Details
this: geometry
Geometry
The geometry being buffered.
distance
Float
The distance of the buffering, which may be negative. If no projection is specified, the unit is meters. Otherwise the unit is in the coordinate system of the projection.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when approximating the buffering circle and performing any necessary reprojection. If unspecified, defaults to 1% of the distance.
proj
Projection, default: null
If specified, the buffering will be performed in this projection and the distance will be interpreted as units of the coordinate system of this projection. Otherwise the distance is interpereted as meters and the buffering is performed in a spherical coordinate system.
ee.Geometry.BBox.centroid
Returns a point at the center of the highest-dimension components of the geometry. Lower-dimensional components are ignored, so the centroid of a geometry containing two polygons, three lines and a point is equivalent to the centroid of a geometry containing just the two polygons.
Usage
Returns
BBox.centroid(maxError, proj)
Geometry
Argument
Type
Details
this: geometry
Geometry
Calculates the centroid of this geometry.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the result will be in this projection. Otherwise it will be in WGS84.
ee.Geometry.BBox.containedIn
Returns true if and only if one geometry is contained in the other.
Usage
Returns
BBox.containedIn(right, maxError, proj)
Boolean
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.BBox.contains
Returns true if and only if one geometry contains the other.
Usage
Returns
BBox.contains(right, maxError, proj)
Boolean
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.BBox.convexHull
Returns the convex hull of the given geometry. The convex hull of a single point is the point itself, the convex hull of collinear points is a line, and the convex hull of everything else is a polygon. Note that a degenerate polygon with all vertices on the same line will result in a line segment.
Usage
Returns
BBox.convexHull(maxError, proj)
Geometry
Argument
Type
Details
this: geometry
Geometry
Calculates the convex hull of this geometry.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.BBox.coordinates
Returns a GeoJSON-style list of the geometry's coordinates.
Usage
Returns
BBox.coordinates()
List
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.BBox.coveringGrid
Returns a collection of features that cover this geometry, where each feature is a rectangle in the grid defined by the given projection.
Usage
Returns
BBox.coveringGrid(proj, scale)
FeatureCollection
Argument
Type
Details
this: geometry
Geometry
The result is the grid cells that intersect with this region.
proj
Projection
The projection in which to construct the grid. A feature is generated for each grid cell that intersects 'geometry', where cell corners are at integer-valued positions in the projection. If the projection is scaled in meters, the points will be on a grid of that size at the point of true scale.
scale
Float, default: null
Overrides the scale of the projection, if provided. May be required if the projection isn't already scaled.
ee.Geometry.BBox.cutLines
Converts LineString, MultiLineString, and LinearRing geometries into a MultiLineString by cutting them into parts no longer than the given distance along their length. All other geometry types will be converted to an empty MultiLineString.
Usage
Returns
BBox.cutLines(distances, maxError, proj)
Geometry
Argument
Type
Details
this: geometry
Geometry
Cuts the lines of this geometry.
distances
List
Distances along each LineString to cut the line into separate pieces, measured in units of the given proj, or meters if proj is unspecified.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
Projection of the result and distance measurements, or WGS84 if unspecified.
ee.Geometry.BBox.difference
Returns the result of subtracting the 'right' geometry from the 'left' geometry.
Usage
Returns
BBox.difference(right, maxError, proj)
Geometry
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.BBox.disjoint
Returns true if and only if the geometries are disjoint.
Usage
Returns
BBox.disjoint(right, maxError, proj)
Boolean
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.BBox.dissolve
Returns the union of the geometry. This leaves single geometries untouched, and unions multi geometries.
Usage
Returns
BBox.dissolve(maxError, proj)
Geometry
Argument
Type
Details
this: geometry
Geometry
The geometry to union.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the union will be performed in this projection. Otherwise it will be performed in a spherical coordinate system.
ee.Geometry.BBox.distance
Returns the minimum distance between two geometries.
Usage
Returns
BBox.distance(right, maxError, proj)
Float
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.BBox.edgesAreGeodesics
Returns true if the geometry edges, if any, are geodesics along a spherical model of the earth; if false, any edges are straight lines in the projection.
Usage
Returns
BBox.edgesAreGeodesics()
Boolean
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.BBox.evaluate
Asynchronously retrieves the value of this object from the server and passes it to the provided callback function.
Usage
Returns
BBox.evaluate(callback)
Argument
Type
Details
this: computedobject
ComputedObject
The ComputedObject instance.
callback
Function
A function of the form function(success, failure), called when the server returns an answer. If the request succeeded, the success argument contains the evaluated result. If the request failed, the failure argument will contains an error message.
ee.Geometry.BBox.geodesic
If false, edges are straight in the projection. If true, edges are curved to follow the shortest path on the surface of the Earth.
Usage
Returns
BBox.geodesic()
Boolean
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.BBox.geometries
Returns the list of geometries in a GeometryCollection, or a singleton list of the geometry for single geometries.
Usage
Returns
BBox.geometries()
List
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.BBox.getInfo
Retrieves the value of this object from the server.
If no callback function is provided, the request is made synchronously. If a callback is provided, the request is made asynchronously.
The asynchronous mode is preferred because the synchronous mode stops all other code (for example, the EE Code Editor UI) while waiting for the server. To make an asynchronous request, evaluate() is preferred over getInfo().
Returns the computed value of this object.
Usage
Returns
BBox.getInfo(callback)
Object
Argument
Type
Details
this: computedobject
ComputedObject
The ComputedObject instance.
callback
Function, optional
An optional callback. If not supplied, the call is made synchronously.
ee.Geometry.BBox.intersection
Returns the intersection of the two geometries.
Usage
Returns
BBox.intersection(right, maxError, proj)
Geometry
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.BBox.intersects
Returns true if and only if the geometries intersect.
Usage
Returns
BBox.intersects(right, maxError, proj)
Boolean
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.BBox.isUnbounded
Returns whether the geometry is unbounded.
Usage
Returns
BBox.isUnbounded()
Boolean
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.BBox.length
Returns the length of the linear parts of the geometry. Polygonal parts are ignored. The length of multi geometries is the sum of the lengths of their components.
Usage
Returns
BBox.length(maxError, proj)
Float
Argument
Type
Details
this: geometry
Geometry
The input geometry.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the result will be in the units of the coordinate system of this projection. Otherwise it will be in meters.
ee.Geometry.BBox.perimeter
Returns the length of the perimeter of the polygonal parts of the geometry. The perimeter of multi geometries is the sum of the perimeters of their components.
Usage
Returns
BBox.perimeter(maxError, proj)
Float
Argument
Type
Details
this: geometry
Geometry
The input geometry.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the result will be in the units of the coordinate system of this projection. Otherwise it will be in meters.
ee.Geometry.BBox.projection
Returns the projection of the geometry.
Usage
Returns
BBox.projection()
Projection
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.BBox.serialize
Returns the serialized representation of this object.
Usage
Returns
BBox.serialize(legacy)
String
Argument
Type
Details
this: geometry
Geometry
The Geometry instance.
legacy
Boolean, optional
Enables legacy format.
ee.Geometry.BBox.simplify
Simplifies the geometry to within a given error margin. Note that this does not respect the error margin requested by the consumer of this algorithm, unless maxError is explicitly specified to be null.
This overrides the default Earth Engine policy for propagating error margins, so regardless of the geometry accuracy requested from the output, the inputs will be requested with the error margin specified in the arguments to this algorithm. This results in consistent rendering at all zoom levels of a rendered vector map, but at lower zoom levels (i.e. zoomed out), the geometry won't be simplified, which may harm performance.
Usage
Returns
BBox.simplify(maxError, proj)
Geometry
Argument
Type
Details
this: geometry
Geometry
The geometry to simplify.
maxError
ErrorMargin
The maximum amount of error by which the result may differ from the input.
proj
Projection, default: null
If specified, the result will be in this projection. Otherwise it will be in the same projection as the input. If the error margin is in projected units, the margin will be interpreted as units of this projection
ee.Geometry.BBox.symmetricDifference
Returns the symmetric difference between two geometries.
Usage
Returns
BBox.symmetricDifference(right, maxError, proj)
Geometry
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.BBox.toGeoJSON
Returns a GeoJSON representation of the geometry.
Usage
Returns
BBox.toGeoJSON()
GeoJSONGeometry
Argument
Type
Details
this: geometry
Geometry
The Geometry instance.
ee.Geometry.BBox.toGeoJSONString
Returns a GeoJSON string representation of the geometry.
Usage
Returns
BBox.toGeoJSONString()
String
Argument
Type
Details
this: geometry
Geometry
The Geometry instance.
ee.Geometry.BBox.transform
Transforms the geometry to a specific projection.
Usage
Returns
BBox.transform(proj, maxError)
Geometry
Argument
Type
Details
this: geometry
Geometry
The geometry to reproject.
proj
Projection, optional
The target projection. Defaults to WGS84. If this has a geographic CRS, the edges of the geometry will be interpreted as geodesics. Otherwise they will be interpreted as straight lines in the projection.
maxError
ErrorMargin, default: null
The maximum projection error.
ee.Geometry.BBox.type
Returns the GeoJSON type of the geometry.
Usage
Returns
BBox.type()
String
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.BBox.union
Returns the union of the two geometries.
Usage
Returns
BBox.union(right, maxError, proj)
Geometry
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.BBox.withinDistance
Returns true if and only if the geometries are within a specified distance.
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
distance
Float
The distance threshold. If a projection is specified, the distance is in units of that projected coordinate system, otherwise it is in meters.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.LineString
Constructs an ee.Geometry describing a LineString.
For convenience, varargs may be used when all arguments are numbers. This allows creating geodesic EPSG:4326 LineStrings given an even number of arguments, e.g. ee.Geometry.LineString(aLng, aLat, bLng, bLat, ...).
A list of at least two points. May be a list of coordinates in the GeoJSON 'LineString' format, a list of at least two ee.Geometry objects describing a point, or a list of at least four numbers defining the [x,y] coordinates of at least two points.
proj
Projection, optional
The projection of this geometry. If unspecified, the default is the projection of the input ee.Geometry, or EPSG:4326 if there are no ee.Geometry inputs.
geodesic
Boolean, optional
If false, edges are straight in the projection. If true, edges are curved to follow the shortest path on the surface of the Earth. The default is the geodesic state of the inputs, or true if the inputs are numbers.
maxError
ErrorMargin, optional
Max error when input geometry must be reprojected to an explicitly requested result projection or geodesic state.
ee.Geometry.LineString.area
Returns the area of the geometry. Area of points and line strings is 0, and the area of multi geometries is the sum of the areas of their components (intersecting areas are counted multiple times).
Usage
Returns
LineString.area(maxError, proj)
Float
Argument
Type
Details
this: geometry
Geometry
The geometry input.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the result will be in the units of the coordinate system of this projection. Otherwise it will be in square meters.
ee.Geometry.LineString.aside
Calls a function passing this object as the first argument, and returning itself. Convenient e.g. when debugging:
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the result will be in this projection. Otherwise it will be in WGS84.
ee.Geometry.LineString.buffer
Returns the input buffered by a given distance. If the distance is positive, the geometry is expanded, and if the distance is negative, the geometry is contracted.
Usage
Returns
LineString.buffer(distance, maxError, proj)
Geometry
Argument
Type
Details
this: geometry
Geometry
The geometry being buffered.
distance
Float
The distance of the buffering, which may be negative. If no projection is specified, the unit is meters. Otherwise the unit is in the coordinate system of the projection.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when approximating the buffering circle and performing any necessary reprojection. If unspecified, defaults to 1% of the distance.
proj
Projection, default: null
If specified, the buffering will be performed in this projection and the distance will be interpreted as units of the coordinate system of this projection. Otherwise the distance is interpereted as meters and the buffering is performed in a spherical coordinate system.
ee.Geometry.LineString.centroid
Returns a point at the center of the highest-dimension components of the geometry. Lower-dimensional components are ignored, so the centroid of a geometry containing two polygons, three lines and a point is equivalent to the centroid of a geometry containing just the two polygons.
Usage
Returns
LineString.centroid(maxError, proj)
Geometry
Argument
Type
Details
this: geometry
Geometry
Calculates the centroid of this geometry.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the result will be in this projection. Otherwise it will be in WGS84.
ee.Geometry.LineString.containedIn
Returns true if and only if one geometry is contained in the other.
Usage
Returns
LineString.containedIn(right, maxError, proj)
Boolean
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.LineString.contains
Returns true if and only if one geometry contains the other.
Usage
Returns
LineString.contains(right, maxError, proj)
Boolean
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.LineString.convexHull
Returns the convex hull of the given geometry. The convex hull of a single point is the point itself, the convex hull of collinear points is a line, and the convex hull of everything else is a polygon. Note that a degenerate polygon with all vertices on the same line will result in a line segment.
Usage
Returns
LineString.convexHull(maxError, proj)
Geometry
Argument
Type
Details
this: geometry
Geometry
Calculates the convex hull of this geometry.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.LineString.coordinates
Returns a GeoJSON-style list of the geometry's coordinates.
Usage
Returns
LineString.coordinates()
List
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.LineString.coveringGrid
Returns a collection of features that cover this geometry, where each feature is a rectangle in the grid defined by the given projection.
Usage
Returns
LineString.coveringGrid(proj, scale)
FeatureCollection
Argument
Type
Details
this: geometry
Geometry
The result is the grid cells that intersect with this region.
proj
Projection
The projection in which to construct the grid. A feature is generated for each grid cell that intersects 'geometry', where cell corners are at integer-valued positions in the projection. If the projection is scaled in meters, the points will be on a grid of that size at the point of true scale.
scale
Float, default: null
Overrides the scale of the projection, if provided. May be required if the projection isn't already scaled.
ee.Geometry.LineString.cutLines
Converts LineString, MultiLineString, and LinearRing geometries into a MultiLineString by cutting them into parts no longer than the given distance along their length. All other geometry types will be converted to an empty MultiLineString.
Usage
Returns
LineString.cutLines(distances, maxError, proj)
Geometry
Argument
Type
Details
this: geometry
Geometry
Cuts the lines of this geometry.
distances
List
Distances along each LineString to cut the line into separate pieces, measured in units of the given proj, or meters if proj is unspecified.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
Projection of the result and distance measurements, or WGS84 if unspecified.
ee.Geometry.LineString.difference
Returns the result of subtracting the 'right' geometry from the 'left' geometry.
Usage
Returns
LineString.difference(right, maxError, proj)
Geometry
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.LineString.disjoint
Returns true if and only if the geometries are disjoint.
Usage
Returns
LineString.disjoint(right, maxError, proj)
Boolean
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.LineString.dissolve
Returns the union of the geometry. This leaves single geometries untouched, and unions multi geometries.
Usage
Returns
LineString.dissolve(maxError, proj)
Geometry
Argument
Type
Details
this: geometry
Geometry
The geometry to union.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the union will be performed in this projection. Otherwise it will be performed in a spherical coordinate system.
ee.Geometry.LineString.distance
Returns the minimum distance between two geometries.
Usage
Returns
LineString.distance(right, maxError, proj)
Float
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.LineString.edgesAreGeodesics
Returns true if the geometry edges, if any, are geodesics along a spherical model of the earth; if false, any edges are straight lines in the projection.
Usage
Returns
LineString.edgesAreGeodesics()
Boolean
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.LineString.evaluate
Asynchronously retrieves the value of this object from the server and passes it to the provided callback function.
Usage
Returns
LineString.evaluate(callback)
Argument
Type
Details
this: computedobject
ComputedObject
The ComputedObject instance.
callback
Function
A function of the form function(success, failure), called when the server returns an answer. If the request succeeded, the success argument contains the evaluated result. If the request failed, the failure argument will contains an error message.
ee.Geometry.LineString.geodesic
If false, edges are straight in the projection. If true, edges are curved to follow the shortest path on the surface of the Earth.
Usage
Returns
LineString.geodesic()
Boolean
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.LineString.geometries
Returns the list of geometries in a GeometryCollection, or a singleton list of the geometry for single geometries.
Usage
Returns
LineString.geometries()
List
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.LineString.getInfo
Retrieves the value of this object from the server.
If no callback function is provided, the request is made synchronously. If a callback is provided, the request is made asynchronously.
The asynchronous mode is preferred because the synchronous mode stops all other code (for example, the EE Code Editor UI) while waiting for the server. To make an asynchronous request, evaluate() is preferred over getInfo().
Returns the computed value of this object.
Usage
Returns
LineString.getInfo(callback)
Object
Argument
Type
Details
this: computedobject
ComputedObject
The ComputedObject instance.
callback
Function, optional
An optional callback. If not supplied, the call is made synchronously.
ee.Geometry.LineString.intersection
Returns the intersection of the two geometries.
Usage
Returns
LineString.intersection(right, maxError, proj)
Geometry
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.LineString.intersects
Returns true if and only if the geometries intersect.
Usage
Returns
LineString.intersects(right, maxError, proj)
Boolean
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.LineString.isUnbounded
Returns whether the geometry is unbounded.
Usage
Returns
LineString.isUnbounded()
Boolean
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.LineString.length
Returns the length of the linear parts of the geometry. Polygonal parts are ignored. The length of multi geometries is the sum of the lengths of their components.
Usage
Returns
LineString.length(maxError, proj)
Float
Argument
Type
Details
this: geometry
Geometry
The input geometry.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the result will be in the units of the coordinate system of this projection. Otherwise it will be in meters.
ee.Geometry.LineString.perimeter
Returns the length of the perimeter of the polygonal parts of the geometry. The perimeter of multi geometries is the sum of the perimeters of their components.
Usage
Returns
LineString.perimeter(maxError, proj)
Float
Argument
Type
Details
this: geometry
Geometry
The input geometry.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the result will be in the units of the coordinate system of this projection. Otherwise it will be in meters.
ee.Geometry.LineString.projection
Returns the projection of the geometry.
Usage
Returns
LineString.projection()
Projection
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.LineString.serialize
Returns the serialized representation of this object.
Usage
Returns
LineString.serialize(legacy)
String
Argument
Type
Details
this: geometry
Geometry
The Geometry instance.
legacy
Boolean, optional
Enables legacy format.
ee.Geometry.LineString.simplify
Simplifies the geometry to within a given error margin. Note that this does not respect the error margin requested by the consumer of this algorithm, unless maxError is explicitly specified to be null.
This overrides the default Earth Engine policy for propagating error margins, so regardless of the geometry accuracy requested from the output, the inputs will be requested with the error margin specified in the arguments to this algorithm. This results in consistent rendering at all zoom levels of a rendered vector map, but at lower zoom levels (i.e. zoomed out), the geometry won't be simplified, which may harm performance.
Usage
Returns
LineString.simplify(maxError, proj)
Geometry
Argument
Type
Details
this: geometry
Geometry
The geometry to simplify.
maxError
ErrorMargin
The maximum amount of error by which the result may differ from the input.
proj
Projection, default: null
If specified, the result will be in this projection. Otherwise it will be in the same projection as the input. If the error margin is in projected units, the margin will be interpreted as units of this projection
ee.Geometry.LineString.symmetricDifference
Returns the symmetric difference between two geometries.
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.LineString.toGeoJSON
Returns a GeoJSON representation of the geometry.
Usage
Returns
LineString.toGeoJSON()
GeoJSONGeometry
Argument
Type
Details
this: geometry
Geometry
The Geometry instance.
ee.Geometry.LineString.toGeoJSONString
Returns a GeoJSON string representation of the geometry.
Usage
Returns
LineString.toGeoJSONString()
String
Argument
Type
Details
this: geometry
Geometry
The Geometry instance.
ee.Geometry.LineString.transform
Transforms the geometry to a specific projection.
Usage
Returns
LineString.transform(proj, maxError)
Geometry
Argument
Type
Details
this: geometry
Geometry
The geometry to reproject.
proj
Projection, optional
The target projection. Defaults to WGS84. If this has a geographic CRS, the edges of the geometry will be interpreted as geodesics. Otherwise they will be interpreted as straight lines in the projection.
maxError
ErrorMargin, default: null
The maximum projection error.
ee.Geometry.LineString.type
Returns the GeoJSON type of the geometry.
Usage
Returns
LineString.type()
String
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.LineString.union
Returns the union of the two geometries.
Usage
Returns
LineString.union(right, maxError, proj)
Geometry
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.LineString.withinDistance
Returns true if and only if the geometries are within a specified distance.
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
distance
Float
The distance threshold. If a projection is specified, the distance is in units of that projected coordinate system, otherwise it is in meters.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.LinearRing
Constructs an ee.Geometry describing a LinearRing. If the last point is not equal to the first, a duplicate of the first point will be added at the end.
For convenience, varargs may be used when all arguments are numbers. This allows creating geodesic EPSG:4326 LinearRings given an even number of arguments, e.g. ee.Geometry.LinearRing(aLng, aLat, bLng, bLat, ..., aLng, aLat).
A list of points in the ring. May be a list of coordinates in the GeoJSON
'LinearRing' format, a list of at least three ee.Geometry objects describing a point, or a list of at least six numbers defining the [x,y] coordinates of at least three points.
proj
Projection, optional
The projection of this geometry. If unspecified, the default is the projection of the input ee.Geometry, or EPSG:4326 if there are no ee.Geometry inputs.
geodesic
Boolean, optional
If false, edges are straight in the projection. If true, edges are curved to follow the shortest path on the surface of the Earth. The default is the geodesic state of the inputs, or true if the inputs are numbers.
maxError
ErrorMargin, optional
Max error when input geometry must be reprojected to an explicitly requested result projection or geodesic state.
ee.Geometry.LinearRing.area
Returns the area of the geometry. Area of points and line strings is 0, and the area of multi geometries is the sum of the areas of their components (intersecting areas are counted multiple times).
Usage
Returns
LinearRing.area(maxError, proj)
Float
Argument
Type
Details
this: geometry
Geometry
The geometry input.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the result will be in the units of the coordinate system of this projection. Otherwise it will be in square meters.
ee.Geometry.LinearRing.aside
Calls a function passing this object as the first argument, and returning itself. Convenient e.g. when debugging:
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the result will be in this projection. Otherwise it will be in WGS84.
ee.Geometry.LinearRing.buffer
Returns the input buffered by a given distance. If the distance is positive, the geometry is expanded, and if the distance is negative, the geometry is contracted.
Usage
Returns
LinearRing.buffer(distance, maxError, proj)
Geometry
Argument
Type
Details
this: geometry
Geometry
The geometry being buffered.
distance
Float
The distance of the buffering, which may be negative. If no projection is specified, the unit is meters. Otherwise the unit is in the coordinate system of the projection.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when approximating the buffering circle and performing any necessary reprojection. If unspecified, defaults to 1% of the distance.
proj
Projection, default: null
If specified, the buffering will be performed in this projection and the distance will be interpreted as units of the coordinate system of this projection. Otherwise the distance is interpereted as meters and the buffering is performed in a spherical coordinate system.
ee.Geometry.LinearRing.centroid
Returns a point at the center of the highest-dimension components of the geometry. Lower-dimensional components are ignored, so the centroid of a geometry containing two polygons, three lines and a point is equivalent to the centroid of a geometry containing just the two polygons.
Usage
Returns
LinearRing.centroid(maxError, proj)
Geometry
Argument
Type
Details
this: geometry
Geometry
Calculates the centroid of this geometry.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the result will be in this projection. Otherwise it will be in WGS84.
ee.Geometry.LinearRing.containedIn
Returns true if and only if one geometry is contained in the other.
Usage
Returns
LinearRing.containedIn(right, maxError, proj)
Boolean
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.LinearRing.contains
Returns true if and only if one geometry contains the other.
Usage
Returns
LinearRing.contains(right, maxError, proj)
Boolean
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.LinearRing.convexHull
Returns the convex hull of the given geometry. The convex hull of a single point is the point itself, the convex hull of collinear points is a line, and the convex hull of everything else is a polygon. Note that a degenerate polygon with all vertices on the same line will result in a line segment.
Usage
Returns
LinearRing.convexHull(maxError, proj)
Geometry
Argument
Type
Details
this: geometry
Geometry
Calculates the convex hull of this geometry.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.LinearRing.coordinates
Returns a GeoJSON-style list of the geometry's coordinates.
Usage
Returns
LinearRing.coordinates()
List
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.LinearRing.coveringGrid
Returns a collection of features that cover this geometry, where each feature is a rectangle in the grid defined by the given projection.
Usage
Returns
LinearRing.coveringGrid(proj, scale)
FeatureCollection
Argument
Type
Details
this: geometry
Geometry
The result is the grid cells that intersect with this region.
proj
Projection
The projection in which to construct the grid. A feature is generated for each grid cell that intersects 'geometry', where cell corners are at integer-valued positions in the projection. If the projection is scaled in meters, the points will be on a grid of that size at the point of true scale.
scale
Float, default: null
Overrides the scale of the projection, if provided. May be required if the projection isn't already scaled.
ee.Geometry.LinearRing.cutLines
Converts LineString, MultiLineString, and LinearRing geometries into a MultiLineString by cutting them into parts no longer than the given distance along their length. All other geometry types will be converted to an empty MultiLineString.
Usage
Returns
LinearRing.cutLines(distances, maxError, proj)
Geometry
Argument
Type
Details
this: geometry
Geometry
Cuts the lines of this geometry.
distances
List
Distances along each LineString to cut the line into separate pieces, measured in units of the given proj, or meters if proj is unspecified.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
Projection of the result and distance measurements, or WGS84 if unspecified.
ee.Geometry.LinearRing.difference
Returns the result of subtracting the 'right' geometry from the 'left' geometry.
Usage
Returns
LinearRing.difference(right, maxError, proj)
Geometry
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.LinearRing.disjoint
Returns true if and only if the geometries are disjoint.
Usage
Returns
LinearRing.disjoint(right, maxError, proj)
Boolean
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.LinearRing.dissolve
Returns the union of the geometry. This leaves single geometries untouched, and unions multi geometries.
Usage
Returns
LinearRing.dissolve(maxError, proj)
Geometry
Argument
Type
Details
this: geometry
Geometry
The geometry to union.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the union will be performed in this projection. Otherwise it will be performed in a spherical coordinate system.
ee.Geometry.LinearRing.distance
Returns the minimum distance between two geometries.
Usage
Returns
LinearRing.distance(right, maxError, proj)
Float
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.LinearRing.edgesAreGeodesics
Returns true if the geometry edges, if any, are geodesics along a spherical model of the earth; if false, any edges are straight lines in the projection.
Usage
Returns
LinearRing.edgesAreGeodesics()
Boolean
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.LinearRing.evaluate
Asynchronously retrieves the value of this object from the server and passes it to the provided callback function.
Usage
Returns
LinearRing.evaluate(callback)
Argument
Type
Details
this: computedobject
ComputedObject
The ComputedObject instance.
callback
Function
A function of the form function(success, failure), called when the server returns an answer. If the request succeeded, the success argument contains the evaluated result. If the request failed, the failure argument will contains an error message.
ee.Geometry.LinearRing.geodesic
If false, edges are straight in the projection. If true, edges are curved to follow the shortest path on the surface of the Earth.
Usage
Returns
LinearRing.geodesic()
Boolean
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.LinearRing.geometries
Returns the list of geometries in a GeometryCollection, or a singleton list of the geometry for single geometries.
Usage
Returns
LinearRing.geometries()
List
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.LinearRing.getInfo
Retrieves the value of this object from the server.
If no callback function is provided, the request is made synchronously. If a callback is provided, the request is made asynchronously.
The asynchronous mode is preferred because the synchronous mode stops all other code (for example, the EE Code Editor UI) while waiting for the server. To make an asynchronous request, evaluate() is preferred over getInfo().
Returns the computed value of this object.
Usage
Returns
LinearRing.getInfo(callback)
Object
Argument
Type
Details
this: computedobject
ComputedObject
The ComputedObject instance.
callback
Function, optional
An optional callback. If not supplied, the call is made synchronously.
ee.Geometry.LinearRing.intersection
Returns the intersection of the two geometries.
Usage
Returns
LinearRing.intersection(right, maxError, proj)
Geometry
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.LinearRing.intersects
Returns true if and only if the geometries intersect.
Usage
Returns
LinearRing.intersects(right, maxError, proj)
Boolean
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.LinearRing.isUnbounded
Returns whether the geometry is unbounded.
Usage
Returns
LinearRing.isUnbounded()
Boolean
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.LinearRing.length
Returns the length of the linear parts of the geometry. Polygonal parts are ignored. The length of multi geometries is the sum of the lengths of their components.
Usage
Returns
LinearRing.length(maxError, proj)
Float
Argument
Type
Details
this: geometry
Geometry
The input geometry.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the result will be in the units of the coordinate system of this projection. Otherwise it will be in meters.
ee.Geometry.LinearRing.perimeter
Returns the length of the perimeter of the polygonal parts of the geometry. The perimeter of multi geometries is the sum of the perimeters of their components.
Usage
Returns
LinearRing.perimeter(maxError, proj)
Float
Argument
Type
Details
this: geometry
Geometry
The input geometry.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the result will be in the units of the coordinate system of this projection. Otherwise it will be in meters.
ee.Geometry.LinearRing.projection
Returns the projection of the geometry.
Usage
Returns
LinearRing.projection()
Projection
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.LinearRing.serialize
Returns the serialized representation of this object.
Usage
Returns
LinearRing.serialize(legacy)
String
Argument
Type
Details
this: geometry
Geometry
The Geometry instance.
legacy
Boolean, optional
Enables legacy format.
ee.Geometry.LinearRing.simplify
Simplifies the geometry to within a given error margin. Note that this does not respect the error margin requested by the consumer of this algorithm, unless maxError is explicitly specified to be null.
This overrides the default Earth Engine policy for propagating error margins, so regardless of the geometry accuracy requested from the output, the inputs will be requested with the error margin specified in the arguments to this algorithm. This results in consistent rendering at all zoom levels of a rendered vector map, but at lower zoom levels (i.e. zoomed out), the geometry won't be simplified, which may harm performance.
Usage
Returns
LinearRing.simplify(maxError, proj)
Geometry
Argument
Type
Details
this: geometry
Geometry
The geometry to simplify.
maxError
ErrorMargin
The maximum amount of error by which the result may differ from the input.
proj
Projection, default: null
If specified, the result will be in this projection. Otherwise it will be in the same projection as the input. If the error margin is in projected units, the margin will be interpreted as units of this projection
ee.Geometry.LinearRing.symmetricDifference
Returns the symmetric difference between two geometries.
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.LinearRing.toGeoJSON
Returns a GeoJSON representation of the geometry.
Usage
Returns
LinearRing.toGeoJSON()
GeoJSONGeometry
Argument
Type
Details
this: geometry
Geometry
The Geometry instance.
ee.Geometry.LinearRing.toGeoJSONString
Returns a GeoJSON string representation of the geometry.
Usage
Returns
LinearRing.toGeoJSONString()
String
Argument
Type
Details
this: geometry
Geometry
The Geometry instance.
ee.Geometry.LinearRing.transform
Transforms the geometry to a specific projection.
Usage
Returns
LinearRing.transform(proj, maxError)
Geometry
Argument
Type
Details
this: geometry
Geometry
The geometry to reproject.
proj
Projection, optional
The target projection. Defaults to WGS84. If this has a geographic CRS, the edges of the geometry will be interpreted as geodesics. Otherwise they will be interpreted as straight lines in the projection.
maxError
ErrorMargin, default: null
The maximum projection error.
ee.Geometry.LinearRing.type
Returns the GeoJSON type of the geometry.
Usage
Returns
LinearRing.type()
String
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.LinearRing.union
Returns the union of the two geometries.
Usage
Returns
LinearRing.union(right, maxError, proj)
Geometry
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.LinearRing.withinDistance
Returns true if and only if the geometries are within a specified distance.
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
distance
Float
The distance threshold. If a projection is specified, the distance is in units of that projected coordinate system, otherwise it is in meters.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.MultiLineString
Constructs an ee.Geometry describing a MultiLineString.
For convenience, varargs may be used when all arguments are numbers. This allows creating geodesic EPSG:4326 MultiLineStrings with a single LineString, given an even number of arguments, e.g. ee.Geometry.MultiLineString(aLng, aLat, bLng, bLat, ...).
A list of linestrings. May be a list of coordinates in the GeoJSON
'MultiLineString' format, a list of at least two ee.Geometry objects describing a LineString, or a list of numbers defining a single linestring.
proj
Projection, optional
The projection of this geometry. If unspecified, the default is the projection of the input ee.Geometry, or EPSG:4326 if there are no ee.Geometry inputs.
geodesic
Boolean, optional
If false, edges are straight in the projection. If true, edges are curved to follow the shortest path on the surface of the Earth. The default is the geodesic state of the inputs, or true if the inputs are numbers.
maxError
ErrorMargin, optional
Max error when input geometry must be reprojected to an explicitly requested result projection or geodesic state.
ee.Geometry.MultiLineString.area
Returns the area of the geometry. Area of points and line strings is 0, and the area of multi geometries is the sum of the areas of their components (intersecting areas are counted multiple times).
Usage
Returns
MultiLineString.area(maxError, proj)
Float
Argument
Type
Details
this: geometry
Geometry
The geometry input.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the result will be in the units of the coordinate system of this projection. Otherwise it will be in square meters.
ee.Geometry.MultiLineString.aside
Calls a function passing this object as the first argument, and returning itself. Convenient e.g. when debugging:
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the result will be in this projection. Otherwise it will be in WGS84.
ee.Geometry.MultiLineString.buffer
Returns the input buffered by a given distance. If the distance is positive, the geometry is expanded, and if the distance is negative, the geometry is contracted.
Usage
Returns
MultiLineString.buffer(distance, maxError, proj)
Geometry
Argument
Type
Details
this: geometry
Geometry
The geometry being buffered.
distance
Float
The distance of the buffering, which may be negative. If no projection is specified, the unit is meters. Otherwise the unit is in the coordinate system of the projection.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when approximating the buffering circle and performing any necessary reprojection. If unspecified, defaults to 1% of the distance.
proj
Projection, default: null
If specified, the buffering will be performed in this projection and the distance will be interpreted as units of the coordinate system of this projection. Otherwise the distance is interpereted as meters and the buffering is performed in a spherical coordinate system.
ee.Geometry.MultiLineString.centroid
Returns a point at the center of the highest-dimension components of the geometry. Lower-dimensional components are ignored, so the centroid of a geometry containing two polygons, three lines and a point is equivalent to the centroid of a geometry containing just the two polygons.
Usage
Returns
MultiLineString.centroid(maxError, proj)
Geometry
Argument
Type
Details
this: geometry
Geometry
Calculates the centroid of this geometry.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the result will be in this projection. Otherwise it will be in WGS84.
ee.Geometry.MultiLineString.containedIn
Returns true if and only if one geometry is contained in the other.
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.MultiLineString.contains
Returns true if and only if one geometry contains the other.
Usage
Returns
MultiLineString.contains(right, maxError, proj)
Boolean
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.MultiLineString.convexHull
Returns the convex hull of the given geometry. The convex hull of a single point is the point itself, the convex hull of collinear points is a line, and the convex hull of everything else is a polygon. Note that a degenerate polygon with all vertices on the same line will result in a line segment.
Usage
Returns
MultiLineString.convexHull(maxError, proj)
Geometry
Argument
Type
Details
this: geometry
Geometry
Calculates the convex hull of this geometry.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.MultiLineString.coordinates
Returns a GeoJSON-style list of the geometry's coordinates.
Usage
Returns
MultiLineString.coordinates()
List
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.MultiLineString.coveringGrid
Returns a collection of features that cover this geometry, where each feature is a rectangle in the grid defined by the given projection.
Usage
Returns
MultiLineString.coveringGrid(proj, scale)
FeatureCollection
Argument
Type
Details
this: geometry
Geometry
The result is the grid cells that intersect with this region.
proj
Projection
The projection in which to construct the grid. A feature is generated for each grid cell that intersects 'geometry', where cell corners are at integer-valued positions in the projection. If the projection is scaled in meters, the points will be on a grid of that size at the point of true scale.
scale
Float, default: null
Overrides the scale of the projection, if provided. May be required if the projection isn't already scaled.
ee.Geometry.MultiLineString.cutLines
Converts LineString, MultiLineString, and LinearRing geometries into a MultiLineString by cutting them into parts no longer than the given distance along their length. All other geometry types will be converted to an empty MultiLineString.
Distances along each LineString to cut the line into separate pieces, measured in units of the given proj, or meters if proj is unspecified.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
Projection of the result and distance measurements, or WGS84 if unspecified.
ee.Geometry.MultiLineString.difference
Returns the result of subtracting the 'right' geometry from the 'left' geometry.
Usage
Returns
MultiLineString.difference(right, maxError, proj)
Geometry
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.MultiLineString.disjoint
Returns true if and only if the geometries are disjoint.
Usage
Returns
MultiLineString.disjoint(right, maxError, proj)
Boolean
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.MultiLineString.dissolve
Returns the union of the geometry. This leaves single geometries untouched, and unions multi geometries.
Usage
Returns
MultiLineString.dissolve(maxError, proj)
Geometry
Argument
Type
Details
this: geometry
Geometry
The geometry to union.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the union will be performed in this projection. Otherwise it will be performed in a spherical coordinate system.
ee.Geometry.MultiLineString.distance
Returns the minimum distance between two geometries.
Usage
Returns
MultiLineString.distance(right, maxError, proj)
Float
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.MultiLineString.edgesAreGeodesics
Returns true if the geometry edges, if any, are geodesics along a spherical model of the earth; if false, any edges are straight lines in the projection.
Usage
Returns
MultiLineString.edgesAreGeodesics()
Boolean
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.MultiLineString.evaluate
Asynchronously retrieves the value of this object from the server and passes it to the provided callback function.
Usage
Returns
MultiLineString.evaluate(callback)
Argument
Type
Details
this: computedobject
ComputedObject
The ComputedObject instance.
callback
Function
A function of the form function(success, failure), called when the server returns an answer. If the request succeeded, the success argument contains the evaluated result. If the request failed, the failure argument will contains an error message.
ee.Geometry.MultiLineString.geodesic
If false, edges are straight in the projection. If true, edges are curved to follow the shortest path on the surface of the Earth.
Usage
Returns
MultiLineString.geodesic()
Boolean
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.MultiLineString.geometries
Returns the list of geometries in a GeometryCollection, or a singleton list of the geometry for single geometries.
Usage
Returns
MultiLineString.geometries()
List
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.MultiLineString.getInfo
Retrieves the value of this object from the server.
If no callback function is provided, the request is made synchronously. If a callback is provided, the request is made asynchronously.
The asynchronous mode is preferred because the synchronous mode stops all other code (for example, the EE Code Editor UI) while waiting for the server. To make an asynchronous request, evaluate() is preferred over getInfo().
Returns the computed value of this object.
Usage
Returns
MultiLineString.getInfo(callback)
Object
Argument
Type
Details
this: computedobject
ComputedObject
The ComputedObject instance.
callback
Function, optional
An optional callback. If not supplied, the call is made synchronously.
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.MultiLineString.intersects
Returns true if and only if the geometries intersect.
Usage
Returns
MultiLineString.intersects(right, maxError, proj)
Boolean
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.MultiLineString.isUnbounded
Returns whether the geometry is unbounded.
Usage
Returns
MultiLineString.isUnbounded()
Boolean
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.MultiLineString.length
Returns the length of the linear parts of the geometry. Polygonal parts are ignored. The length of multi geometries is the sum of the lengths of their components.
Usage
Returns
MultiLineString.length(maxError, proj)
Float
Argument
Type
Details
this: geometry
Geometry
The input geometry.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the result will be in the units of the coordinate system of this projection. Otherwise it will be in meters.
ee.Geometry.MultiLineString.perimeter
Returns the length of the perimeter of the polygonal parts of the geometry. The perimeter of multi geometries is the sum of the perimeters of their components.
Usage
Returns
MultiLineString.perimeter(maxError, proj)
Float
Argument
Type
Details
this: geometry
Geometry
The input geometry.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the result will be in the units of the coordinate system of this projection. Otherwise it will be in meters.
ee.Geometry.MultiLineString.projection
Returns the projection of the geometry.
Usage
Returns
MultiLineString.projection()
Projection
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.MultiLineString.serialize
Returns the serialized representation of this object.
Usage
Returns
MultiLineString.serialize(legacy)
String
Argument
Type
Details
this: geometry
Geometry
The Geometry instance.
legacy
Boolean, optional
Enables legacy format.
ee.Geometry.MultiLineString.simplify
Simplifies the geometry to within a given error margin. Note that this does not respect the error margin requested by the consumer of this algorithm, unless maxError is explicitly specified to be null.
This overrides the default Earth Engine policy for propagating error margins, so regardless of the geometry accuracy requested from the output, the inputs will be requested with the error margin specified in the arguments to this algorithm. This results in consistent rendering at all zoom levels of a rendered vector map, but at lower zoom levels (i.e. zoomed out), the geometry won't be simplified, which may harm performance.
Usage
Returns
MultiLineString.simplify(maxError, proj)
Geometry
Argument
Type
Details
this: geometry
Geometry
The geometry to simplify.
maxError
ErrorMargin
The maximum amount of error by which the result may differ from the input.
proj
Projection, default: null
If specified, the result will be in this projection. Otherwise it will be in the same projection as the input. If the error margin is in projected units, the margin will be interpreted as units of this projection
ee.Geometry.MultiLineString.symmetricDifference
Returns the symmetric difference between two geometries.
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.MultiLineString.toGeoJSON
Returns a GeoJSON representation of the geometry.
Usage
Returns
MultiLineString.toGeoJSON()
GeoJSONGeometry
Argument
Type
Details
this: geometry
Geometry
The Geometry instance.
ee.Geometry.MultiLineString.toGeoJSONString
Returns a GeoJSON string representation of the geometry.
Usage
Returns
MultiLineString.toGeoJSONString()
String
Argument
Type
Details
this: geometry
Geometry
The Geometry instance.
ee.Geometry.MultiLineString.transform
Transforms the geometry to a specific projection.
Usage
Returns
MultiLineString.transform(proj, maxError)
Geometry
Argument
Type
Details
this: geometry
Geometry
The geometry to reproject.
proj
Projection, optional
The target projection. Defaults to WGS84. If this has a geographic CRS, the edges of the geometry will be interpreted as geodesics. Otherwise they will be interpreted as straight lines in the projection.
maxError
ErrorMargin, default: null
The maximum projection error.
ee.Geometry.MultiLineString.type
Returns the GeoJSON type of the geometry.
Usage
Returns
MultiLineString.type()
String
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.MultiLineString.union
Returns the union of the two geometries.
Usage
Returns
MultiLineString.union(right, maxError, proj)
Geometry
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.MultiLineString.withinDistance
Returns true if and only if the geometries are within a specified distance.
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
distance
Float
The distance threshold. If a projection is specified, the distance is in units of that projected coordinate system, otherwise it is in meters.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.MultiPoint
Constructs an ee.Geometry describing a MultiPoint.
For convenience, varargs may be used when all arguments are numbers. This allows creating EPSG:4326 MultiPoints given an even number of arguments, e.g. ee.Geometry.MultiPoint(aLng, aLat, bLng, bLat, ...).
Usage
Returns
ee.Geometry.MultiPoint(coords, proj)
Geometry.MultiPoint
Argument
Type
Details
coords
List
A list of points, each in the GeoJSON 'coordinates' format of a Point, or a list of the x,y coordinates in the given projection, or an ee.Geometry describing a point.
proj
Projection, optional
The projection of this geometry. If unspecified, the default is the projection of the input ee.Geometry, or EPSG:4326 if there are no ee.Geometry inputs.
ee.Geometry.MultiPoint.area
Returns the area of the geometry. Area of points and line strings is 0, and the area of multi geometries is the sum of the areas of their components (intersecting areas are counted multiple times).
Usage
Returns
MultiPoint.area(maxError, proj)
Float
Argument
Type
Details
this: geometry
Geometry
The geometry input.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the result will be in the units of the coordinate system of this projection. Otherwise it will be in square meters.
ee.Geometry.MultiPoint.aside
Calls a function passing this object as the first argument, and returning itself. Convenient e.g. when debugging:
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the result will be in this projection. Otherwise it will be in WGS84.
ee.Geometry.MultiPoint.buffer
Returns the input buffered by a given distance. If the distance is positive, the geometry is expanded, and if the distance is negative, the geometry is contracted.
Usage
Returns
MultiPoint.buffer(distance, maxError, proj)
Geometry
Argument
Type
Details
this: geometry
Geometry
The geometry being buffered.
distance
Float
The distance of the buffering, which may be negative. If no projection is specified, the unit is meters. Otherwise the unit is in the coordinate system of the projection.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when approximating the buffering circle and performing any necessary reprojection. If unspecified, defaults to 1% of the distance.
proj
Projection, default: null
If specified, the buffering will be performed in this projection and the distance will be interpreted as units of the coordinate system of this projection. Otherwise the distance is interpereted as meters and the buffering is performed in a spherical coordinate system.
ee.Geometry.MultiPoint.centroid
Returns a point at the center of the highest-dimension components of the geometry. Lower-dimensional components are ignored, so the centroid of a geometry containing two polygons, three lines and a point is equivalent to the centroid of a geometry containing just the two polygons.
Usage
Returns
MultiPoint.centroid(maxError, proj)
Geometry
Argument
Type
Details
this: geometry
Geometry
Calculates the centroid of this geometry.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the result will be in this projection. Otherwise it will be in WGS84.
ee.Geometry.MultiPoint.containedIn
Returns true if and only if one geometry is contained in the other.
Usage
Returns
MultiPoint.containedIn(right, maxError, proj)
Boolean
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.MultiPoint.contains
Returns true if and only if one geometry contains the other.
Usage
Returns
MultiPoint.contains(right, maxError, proj)
Boolean
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.MultiPoint.convexHull
Returns the convex hull of the given geometry. The convex hull of a single point is the point itself, the convex hull of collinear points is a line, and the convex hull of everything else is a polygon. Note that a degenerate polygon with all vertices on the same line will result in a line segment.
Usage
Returns
MultiPoint.convexHull(maxError, proj)
Geometry
Argument
Type
Details
this: geometry
Geometry
Calculates the convex hull of this geometry.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.MultiPoint.coordinates
Returns a GeoJSON-style list of the geometry's coordinates.
Usage
Returns
MultiPoint.coordinates()
List
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.MultiPoint.coveringGrid
Returns a collection of features that cover this geometry, where each feature is a rectangle in the grid defined by the given projection.
Usage
Returns
MultiPoint.coveringGrid(proj, scale)
FeatureCollection
Argument
Type
Details
this: geometry
Geometry
The result is the grid cells that intersect with this region.
proj
Projection
The projection in which to construct the grid. A feature is generated for each grid cell that intersects 'geometry', where cell corners are at integer-valued positions in the projection. If the projection is scaled in meters, the points will be on a grid of that size at the point of true scale.
scale
Float, default: null
Overrides the scale of the projection, if provided. May be required if the projection isn't already scaled.
ee.Geometry.MultiPoint.cutLines
Converts LineString, MultiLineString, and LinearRing geometries into a MultiLineString by cutting them into parts no longer than the given distance along their length. All other geometry types will be converted to an empty MultiLineString.
Usage
Returns
MultiPoint.cutLines(distances, maxError, proj)
Geometry
Argument
Type
Details
this: geometry
Geometry
Cuts the lines of this geometry.
distances
List
Distances along each LineString to cut the line into separate pieces, measured in units of the given proj, or meters if proj is unspecified.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
Projection of the result and distance measurements, or WGS84 if unspecified.
ee.Geometry.MultiPoint.difference
Returns the result of subtracting the 'right' geometry from the 'left' geometry.
Usage
Returns
MultiPoint.difference(right, maxError, proj)
Geometry
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.MultiPoint.disjoint
Returns true if and only if the geometries are disjoint.
Usage
Returns
MultiPoint.disjoint(right, maxError, proj)
Boolean
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.MultiPoint.dissolve
Returns the union of the geometry. This leaves single geometries untouched, and unions multi geometries.
Usage
Returns
MultiPoint.dissolve(maxError, proj)
Geometry
Argument
Type
Details
this: geometry
Geometry
The geometry to union.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the union will be performed in this projection. Otherwise it will be performed in a spherical coordinate system.
ee.Geometry.MultiPoint.distance
Returns the minimum distance between two geometries.
Usage
Returns
MultiPoint.distance(right, maxError, proj)
Float
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.MultiPoint.edgesAreGeodesics
Returns true if the geometry edges, if any, are geodesics along a spherical model of the earth; if false, any edges are straight lines in the projection.
Usage
Returns
MultiPoint.edgesAreGeodesics()
Boolean
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.MultiPoint.evaluate
Asynchronously retrieves the value of this object from the server and passes it to the provided callback function.
Usage
Returns
MultiPoint.evaluate(callback)
Argument
Type
Details
this: computedobject
ComputedObject
The ComputedObject instance.
callback
Function
A function of the form function(success, failure), called when the server returns an answer. If the request succeeded, the success argument contains the evaluated result. If the request failed, the failure argument will contains an error message.
ee.Geometry.MultiPoint.geodesic
If false, edges are straight in the projection. If true, edges are curved to follow the shortest path on the surface of the Earth.
Usage
Returns
MultiPoint.geodesic()
Boolean
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.MultiPoint.geometries
Returns the list of geometries in a GeometryCollection, or a singleton list of the geometry for single geometries.
Usage
Returns
MultiPoint.geometries()
List
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.MultiPoint.getInfo
Retrieves the value of this object from the server.
If no callback function is provided, the request is made synchronously. If a callback is provided, the request is made asynchronously.
The asynchronous mode is preferred because the synchronous mode stops all other code (for example, the EE Code Editor UI) while waiting for the server. To make an asynchronous request, evaluate() is preferred over getInfo().
Returns the computed value of this object.
Usage
Returns
MultiPoint.getInfo(callback)
Object
Argument
Type
Details
this: computedobject
ComputedObject
The ComputedObject instance.
callback
Function, optional
An optional callback. If not supplied, the call is made synchronously.
ee.Geometry.MultiPoint.intersection
Returns the intersection of the two geometries.
Usage
Returns
MultiPoint.intersection(right, maxError, proj)
Geometry
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.MultiPoint.intersects
Returns true if and only if the geometries intersect.
Usage
Returns
MultiPoint.intersects(right, maxError, proj)
Boolean
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.MultiPoint.isUnbounded
Returns whether the geometry is unbounded.
Usage
Returns
MultiPoint.isUnbounded()
Boolean
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.MultiPoint.length
Returns the length of the linear parts of the geometry. Polygonal parts are ignored. The length of multi geometries is the sum of the lengths of their components.
Usage
Returns
MultiPoint.length(maxError, proj)
Float
Argument
Type
Details
this: geometry
Geometry
The input geometry.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the result will be in the units of the coordinate system of this projection. Otherwise it will be in meters.
ee.Geometry.MultiPoint.perimeter
Returns the length of the perimeter of the polygonal parts of the geometry. The perimeter of multi geometries is the sum of the perimeters of their components.
Usage
Returns
MultiPoint.perimeter(maxError, proj)
Float
Argument
Type
Details
this: geometry
Geometry
The input geometry.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the result will be in the units of the coordinate system of this projection. Otherwise it will be in meters.
ee.Geometry.MultiPoint.projection
Returns the projection of the geometry.
Usage
Returns
MultiPoint.projection()
Projection
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.MultiPoint.serialize
Returns the serialized representation of this object.
Usage
Returns
MultiPoint.serialize(legacy)
String
Argument
Type
Details
this: geometry
Geometry
The Geometry instance.
legacy
Boolean, optional
Enables legacy format.
ee.Geometry.MultiPoint.simplify
Simplifies the geometry to within a given error margin. Note that this does not respect the error margin requested by the consumer of this algorithm, unless maxError is explicitly specified to be null.
This overrides the default Earth Engine policy for propagating error margins, so regardless of the geometry accuracy requested from the output, the inputs will be requested with the error margin specified in the arguments to this algorithm. This results in consistent rendering at all zoom levels of a rendered vector map, but at lower zoom levels (i.e. zoomed out), the geometry won't be simplified, which may harm performance.
Usage
Returns
MultiPoint.simplify(maxError, proj)
Geometry
Argument
Type
Details
this: geometry
Geometry
The geometry to simplify.
maxError
ErrorMargin
The maximum amount of error by which the result may differ from the input.
proj
Projection, default: null
If specified, the result will be in this projection. Otherwise it will be in the same projection as the input. If the error margin is in projected units, the margin will be interpreted as units of this projection
ee.Geometry.MultiPoint.symmetricDifference
Returns the symmetric difference between two geometries.
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.MultiPoint.toGeoJSON
Returns a GeoJSON representation of the geometry.
Usage
Returns
MultiPoint.toGeoJSON()
GeoJSONGeometry
Argument
Type
Details
this: geometry
Geometry
The Geometry instance.
ee.Geometry.MultiPoint.toGeoJSONString
Returns a GeoJSON string representation of the geometry.
Usage
Returns
MultiPoint.toGeoJSONString()
String
Argument
Type
Details
this: geometry
Geometry
The Geometry instance.
ee.Geometry.MultiPoint.transform
Transforms the geometry to a specific projection.
Usage
Returns
MultiPoint.transform(proj, maxError)
Geometry
Argument
Type
Details
this: geometry
Geometry
The geometry to reproject.
proj
Projection, optional
The target projection. Defaults to WGS84. If this has a geographic CRS, the edges of the geometry will be interpreted as geodesics. Otherwise they will be interpreted as straight lines in the projection.
maxError
ErrorMargin, default: null
The maximum projection error.
ee.Geometry.MultiPoint.type
Returns the GeoJSON type of the geometry.
Usage
Returns
MultiPoint.type()
String
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.MultiPoint.union
Returns the union of the two geometries.
Usage
Returns
MultiPoint.union(right, maxError, proj)
Geometry
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.MultiPoint.withinDistance
Returns true if and only if the geometries are within a specified distance.
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
distance
Float
The distance threshold. If a projection is specified, the distance is in units of that projected coordinate system, otherwise it is in meters.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.MultiPolygon
Constructs an ee.Geometry describing a MultiPolygon.
For convenience, varargs may be used when all arguments are numbers. This allows creating geodesic EPSG:4326 MultiPolygons with a single Polygon with a single LinearRing given an even number of arguments, e.g. ee.Geometry.MultiPolygon(aLng, aLat, bLng, bLat, ..., aLng, aLat).
A list of polygons. May be a list of coordinates in the GeoJSON
'MultiPolygon' format, a list of ee.Geometry objects describing a Polygon, or a list of numbers defining a single polygon boundary.
proj
Projection, optional
The projection of this geometry. The default is the projection of the inputs, where Numbers are assumed to be EPSG:4326.
geodesic
Boolean, optional
If false, edges are straight in the projection. If true, edges are curved to follow the shortest path on the surface of the Earth. The default is the geodesic state of the inputs, or true if the inputs are numbers.
maxError
ErrorMargin, optional
Max error when input geometry must be reprojected to an explicitly requested result projection or geodesic state.
evenOdd
Boolean, optional
If true, polygon interiors will be determined by the even/odd rule, where a point is inside if it crosses an odd number of edges to reach a point at infinity. Otherwise polygons use the left- inside rule, where interiors are on the left side of the shell's edges when walking the vertices in the given order. If unspecified, defaults to true.
ee.Geometry.MultiPolygon.area
Returns the area of the geometry. Area of points and line strings is 0, and the area of multi geometries is the sum of the areas of their components (intersecting areas are counted multiple times).
Usage
Returns
MultiPolygon.area(maxError, proj)
Float
Argument
Type
Details
this: geometry
Geometry
The geometry input.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the result will be in the units of the coordinate system of this projection. Otherwise it will be in square meters.
ee.Geometry.MultiPolygon.aside
Calls a function passing this object as the first argument, and returning itself. Convenient e.g. when debugging:
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the result will be in this projection. Otherwise it will be in WGS84.
ee.Geometry.MultiPolygon.buffer
Returns the input buffered by a given distance. If the distance is positive, the geometry is expanded, and if the distance is negative, the geometry is contracted.
Usage
Returns
MultiPolygon.buffer(distance, maxError, proj)
Geometry
Argument
Type
Details
this: geometry
Geometry
The geometry being buffered.
distance
Float
The distance of the buffering, which may be negative. If no projection is specified, the unit is meters. Otherwise the unit is in the coordinate system of the projection.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when approximating the buffering circle and performing any necessary reprojection. If unspecified, defaults to 1% of the distance.
proj
Projection, default: null
If specified, the buffering will be performed in this projection and the distance will be interpreted as units of the coordinate system of this projection. Otherwise the distance is interpereted as meters and the buffering is performed in a spherical coordinate system.
ee.Geometry.MultiPolygon.centroid
Returns a point at the center of the highest-dimension components of the geometry. Lower-dimensional components are ignored, so the centroid of a geometry containing two polygons, three lines and a point is equivalent to the centroid of a geometry containing just the two polygons.
Usage
Returns
MultiPolygon.centroid(maxError, proj)
Geometry
Argument
Type
Details
this: geometry
Geometry
Calculates the centroid of this geometry.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the result will be in this projection. Otherwise it will be in WGS84.
ee.Geometry.MultiPolygon.containedIn
Returns true if and only if one geometry is contained in the other.
Usage
Returns
MultiPolygon.containedIn(right, maxError, proj)
Boolean
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.MultiPolygon.contains
Returns true if and only if one geometry contains the other.
Usage
Returns
MultiPolygon.contains(right, maxError, proj)
Boolean
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.MultiPolygon.convexHull
Returns the convex hull of the given geometry. The convex hull of a single point is the point itself, the convex hull of collinear points is a line, and the convex hull of everything else is a polygon. Note that a degenerate polygon with all vertices on the same line will result in a line segment.
Usage
Returns
MultiPolygon.convexHull(maxError, proj)
Geometry
Argument
Type
Details
this: geometry
Geometry
Calculates the convex hull of this geometry.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.MultiPolygon.coordinates
Returns a GeoJSON-style list of the geometry's coordinates.
Usage
Returns
MultiPolygon.coordinates()
List
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.MultiPolygon.coveringGrid
Returns a collection of features that cover this geometry, where each feature is a rectangle in the grid defined by the given projection.
Usage
Returns
MultiPolygon.coveringGrid(proj, scale)
FeatureCollection
Argument
Type
Details
this: geometry
Geometry
The result is the grid cells that intersect with this region.
proj
Projection
The projection in which to construct the grid. A feature is generated for each grid cell that intersects 'geometry', where cell corners are at integer-valued positions in the projection. If the projection is scaled in meters, the points will be on a grid of that size at the point of true scale.
scale
Float, default: null
Overrides the scale of the projection, if provided. May be required if the projection isn't already scaled.
ee.Geometry.MultiPolygon.cutLines
Converts LineString, MultiLineString, and LinearRing geometries into a MultiLineString by cutting them into parts no longer than the given distance along their length. All other geometry types will be converted to an empty MultiLineString.
Usage
Returns
MultiPolygon.cutLines(distances, maxError, proj)
Geometry
Argument
Type
Details
this: geometry
Geometry
Cuts the lines of this geometry.
distances
List
Distances along each LineString to cut the line into separate pieces, measured in units of the given proj, or meters if proj is unspecified.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
Projection of the result and distance measurements, or WGS84 if unspecified.
ee.Geometry.MultiPolygon.difference
Returns the result of subtracting the 'right' geometry from the 'left' geometry.
Usage
Returns
MultiPolygon.difference(right, maxError, proj)
Geometry
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.MultiPolygon.disjoint
Returns true if and only if the geometries are disjoint.
Usage
Returns
MultiPolygon.disjoint(right, maxError, proj)
Boolean
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.MultiPolygon.dissolve
Returns the union of the geometry. This leaves single geometries untouched, and unions multi geometries.
Usage
Returns
MultiPolygon.dissolve(maxError, proj)
Geometry
Argument
Type
Details
this: geometry
Geometry
The geometry to union.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the union will be performed in this projection. Otherwise it will be performed in a spherical coordinate system.
ee.Geometry.MultiPolygon.distance
Returns the minimum distance between two geometries.
Usage
Returns
MultiPolygon.distance(right, maxError, proj)
Float
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.MultiPolygon.edgesAreGeodesics
Returns true if the geometry edges, if any, are geodesics along a spherical model of the earth; if false, any edges are straight lines in the projection.
Usage
Returns
MultiPolygon.edgesAreGeodesics()
Boolean
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.MultiPolygon.evaluate
Asynchronously retrieves the value of this object from the server and passes it to the provided callback function.
Usage
Returns
MultiPolygon.evaluate(callback)
Argument
Type
Details
this: computedobject
ComputedObject
The ComputedObject instance.
callback
Function
A function of the form function(success, failure), called when the server returns an answer. If the request succeeded, the success argument contains the evaluated result. If the request failed, the failure argument will contains an error message.
ee.Geometry.MultiPolygon.geodesic
If false, edges are straight in the projection. If true, edges are curved to follow the shortest path on the surface of the Earth.
Usage
Returns
MultiPolygon.geodesic()
Boolean
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.MultiPolygon.geometries
Returns the list of geometries in a GeometryCollection, or a singleton list of the geometry for single geometries.
Usage
Returns
MultiPolygon.geometries()
List
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.MultiPolygon.getInfo
Retrieves the value of this object from the server.
If no callback function is provided, the request is made synchronously. If a callback is provided, the request is made asynchronously.
The asynchronous mode is preferred because the synchronous mode stops all other code (for example, the EE Code Editor UI) while waiting for the server. To make an asynchronous request, evaluate() is preferred over getInfo().
Returns the computed value of this object.
Usage
Returns
MultiPolygon.getInfo(callback)
Object
Argument
Type
Details
this: computedobject
ComputedObject
The ComputedObject instance.
callback
Function, optional
An optional callback. If not supplied, the call is made synchronously.
ee.Geometry.MultiPolygon.intersection
Returns the intersection of the two geometries.
Usage
Returns
MultiPolygon.intersection(right, maxError, proj)
Geometry
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.MultiPolygon.intersects
Returns true if and only if the geometries intersect.
Usage
Returns
MultiPolygon.intersects(right, maxError, proj)
Boolean
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.MultiPolygon.isUnbounded
Returns whether the geometry is unbounded.
Usage
Returns
MultiPolygon.isUnbounded()
Boolean
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.MultiPolygon.length
Returns the length of the linear parts of the geometry. Polygonal parts are ignored. The length of multi geometries is the sum of the lengths of their components.
Usage
Returns
MultiPolygon.length(maxError, proj)
Float
Argument
Type
Details
this: geometry
Geometry
The input geometry.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the result will be in the units of the coordinate system of this projection. Otherwise it will be in meters.
ee.Geometry.MultiPolygon.perimeter
Returns the length of the perimeter of the polygonal parts of the geometry. The perimeter of multi geometries is the sum of the perimeters of their components.
Usage
Returns
MultiPolygon.perimeter(maxError, proj)
Float
Argument
Type
Details
this: geometry
Geometry
The input geometry.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the result will be in the units of the coordinate system of this projection. Otherwise it will be in meters.
ee.Geometry.MultiPolygon.projection
Returns the projection of the geometry.
Usage
Returns
MultiPolygon.projection()
Projection
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.MultiPolygon.serialize
Returns the serialized representation of this object.
Usage
Returns
MultiPolygon.serialize(legacy)
String
Argument
Type
Details
this: geometry
Geometry
The Geometry instance.
legacy
Boolean, optional
Enables legacy format.
ee.Geometry.MultiPolygon.simplify
Simplifies the geometry to within a given error margin. Note that this does not respect the error margin requested by the consumer of this algorithm, unless maxError is explicitly specified to be null.
This overrides the default Earth Engine policy for propagating error margins, so regardless of the geometry accuracy requested from the output, the inputs will be requested with the error margin specified in the arguments to this algorithm. This results in consistent rendering at all zoom levels of a rendered vector map, but at lower zoom levels (i.e. zoomed out), the geometry won't be simplified, which may harm performance.
Usage
Returns
MultiPolygon.simplify(maxError, proj)
Geometry
Argument
Type
Details
this: geometry
Geometry
The geometry to simplify.
maxError
ErrorMargin
The maximum amount of error by which the result may differ from the input.
proj
Projection, default: null
If specified, the result will be in this projection. Otherwise it will be in the same projection as the input. If the error margin is in projected units, the margin will be interpreted as units of this projection
ee.Geometry.MultiPolygon.symmetricDifference
Returns the symmetric difference between two geometries.
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.MultiPolygon.toGeoJSON
Returns a GeoJSON representation of the geometry.
Usage
Returns
MultiPolygon.toGeoJSON()
GeoJSONGeometry
Argument
Type
Details
this: geometry
Geometry
The Geometry instance.
ee.Geometry.MultiPolygon.toGeoJSONString
Returns a GeoJSON string representation of the geometry.
Usage
Returns
MultiPolygon.toGeoJSONString()
String
Argument
Type
Details
this: geometry
Geometry
The Geometry instance.
ee.Geometry.MultiPolygon.transform
Transforms the geometry to a specific projection.
Usage
Returns
MultiPolygon.transform(proj, maxError)
Geometry
Argument
Type
Details
this: geometry
Geometry
The geometry to reproject.
proj
Projection, optional
The target projection. Defaults to WGS84. If this has a geographic CRS, the edges of the geometry will be interpreted as geodesics. Otherwise they will be interpreted as straight lines in the projection.
maxError
ErrorMargin, default: null
The maximum projection error.
ee.Geometry.MultiPolygon.type
Returns the GeoJSON type of the geometry.
Usage
Returns
MultiPolygon.type()
String
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.MultiPolygon.union
Returns the union of the two geometries.
Usage
Returns
MultiPolygon.union(right, maxError, proj)
Geometry
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.MultiPolygon.withinDistance
Returns true if and only if the geometries are within a specified distance.
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
distance
Float
The distance threshold. If a projection is specified, the distance is in units of that projected coordinate system, otherwise it is in meters.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.Point
Constructs an ee.Geometry describing a point.
For convenience, varargs may be used when all arguments are numbers. This allows creating EPSG:4326 points, e.g. ee.Geometry.Point(lng, lat).
Usage
Returns
ee.Geometry.Point(coords, proj)
Geometry.Point
Argument
Type
Details
coords
List
A list of two [x,y] coordinates in the given projection.
proj
Projection, optional
The projection of this geometry, or EPSG:4326 if unspecified.
ee.Geometry.Point.area
Returns the area of the geometry. Area of points and line strings is 0, and the area of multi geometries is the sum of the areas of their components (intersecting areas are counted multiple times).
Usage
Returns
Point.area(maxError, proj)
Float
Argument
Type
Details
this: geometry
Geometry
The geometry input.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the result will be in the units of the coordinate system of this projection. Otherwise it will be in square meters.
ee.Geometry.Point.aside
Calls a function passing this object as the first argument, and returning itself. Convenient e.g. when debugging:
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the result will be in this projection. Otherwise it will be in WGS84.
ee.Geometry.Point.buffer
Returns the input buffered by a given distance. If the distance is positive, the geometry is expanded, and if the distance is negative, the geometry is contracted.
Usage
Returns
Point.buffer(distance, maxError, proj)
Geometry
Argument
Type
Details
this: geometry
Geometry
The geometry being buffered.
distance
Float
The distance of the buffering, which may be negative. If no projection is specified, the unit is meters. Otherwise the unit is in the coordinate system of the projection.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when approximating the buffering circle and performing any necessary reprojection. If unspecified, defaults to 1% of the distance.
proj
Projection, default: null
If specified, the buffering will be performed in this projection and the distance will be interpreted as units of the coordinate system of this projection. Otherwise the distance is interpereted as meters and the buffering is performed in a spherical coordinate system.
ee.Geometry.Point.centroid
Returns a point at the center of the highest-dimension components of the geometry. Lower-dimensional components are ignored, so the centroid of a geometry containing two polygons, three lines and a point is equivalent to the centroid of a geometry containing just the two polygons.
Usage
Returns
Point.centroid(maxError, proj)
Geometry
Argument
Type
Details
this: geometry
Geometry
Calculates the centroid of this geometry.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the result will be in this projection. Otherwise it will be in WGS84.
ee.Geometry.Point.containedIn
Returns true if and only if one geometry is contained in the other.
Usage
Returns
Point.containedIn(right, maxError, proj)
Boolean
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.Point.contains
Returns true if and only if one geometry contains the other.
Usage
Returns
Point.contains(right, maxError, proj)
Boolean
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.Point.convexHull
Returns the convex hull of the given geometry. The convex hull of a single point is the point itself, the convex hull of collinear points is a line, and the convex hull of everything else is a polygon. Note that a degenerate polygon with all vertices on the same line will result in a line segment.
Usage
Returns
Point.convexHull(maxError, proj)
Geometry
Argument
Type
Details
this: geometry
Geometry
Calculates the convex hull of this geometry.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.Point.coordinates
Returns a GeoJSON-style list of the geometry's coordinates.
Usage
Returns
Point.coordinates()
List
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.Point.coveringGrid
Returns a collection of features that cover this geometry, where each feature is a rectangle in the grid defined by the given projection.
Usage
Returns
Point.coveringGrid(proj, scale)
FeatureCollection
Argument
Type
Details
this: geometry
Geometry
The result is the grid cells that intersect with this region.
proj
Projection
The projection in which to construct the grid. A feature is generated for each grid cell that intersects 'geometry', where cell corners are at integer-valued positions in the projection. If the projection is scaled in meters, the points will be on a grid of that size at the point of true scale.
scale
Float, default: null
Overrides the scale of the projection, if provided. May be required if the projection isn't already scaled.
ee.Geometry.Point.cutLines
Converts LineString, MultiLineString, and LinearRing geometries into a MultiLineString by cutting them into parts no longer than the given distance along their length. All other geometry types will be converted to an empty MultiLineString.
Usage
Returns
Point.cutLines(distances, maxError, proj)
Geometry
Argument
Type
Details
this: geometry
Geometry
Cuts the lines of this geometry.
distances
List
Distances along each LineString to cut the line into separate pieces, measured in units of the given proj, or meters if proj is unspecified.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
Projection of the result and distance measurements, or WGS84 if unspecified.
ee.Geometry.Point.difference
Returns the result of subtracting the 'right' geometry from the 'left' geometry.
Usage
Returns
Point.difference(right, maxError, proj)
Geometry
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.Point.disjoint
Returns true if and only if the geometries are disjoint.
Usage
Returns
Point.disjoint(right, maxError, proj)
Boolean
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.Point.dissolve
Returns the union of the geometry. This leaves single geometries untouched, and unions multi geometries.
Usage
Returns
Point.dissolve(maxError, proj)
Geometry
Argument
Type
Details
this: geometry
Geometry
The geometry to union.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the union will be performed in this projection. Otherwise it will be performed in a spherical coordinate system.
ee.Geometry.Point.distance
Returns the minimum distance between two geometries.
Usage
Returns
Point.distance(right, maxError, proj)
Float
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.Point.edgesAreGeodesics
Returns true if the geometry edges, if any, are geodesics along a spherical model of the earth; if false, any edges are straight lines in the projection.
Usage
Returns
Point.edgesAreGeodesics()
Boolean
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.Point.evaluate
Asynchronously retrieves the value of this object from the server and passes it to the provided callback function.
Usage
Returns
Point.evaluate(callback)
Argument
Type
Details
this: computedobject
ComputedObject
The ComputedObject instance.
callback
Function
A function of the form function(success, failure), called when the server returns an answer. If the request succeeded, the success argument contains the evaluated result. If the request failed, the failure argument will contains an error message.
ee.Geometry.Point.geodesic
If false, edges are straight in the projection. If true, edges are curved to follow the shortest path on the surface of the Earth.
Usage
Returns
Point.geodesic()
Boolean
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.Point.geometries
Returns the list of geometries in a GeometryCollection, or a singleton list of the geometry for single geometries.
Usage
Returns
Point.geometries()
List
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.Point.getInfo
Retrieves the value of this object from the server.
If no callback function is provided, the request is made synchronously. If a callback is provided, the request is made asynchronously.
The asynchronous mode is preferred because the synchronous mode stops all other code (for example, the EE Code Editor UI) while waiting for the server. To make an asynchronous request, evaluate() is preferred over getInfo().
Returns the computed value of this object.
Usage
Returns
Point.getInfo(callback)
Object
Argument
Type
Details
this: computedobject
ComputedObject
The ComputedObject instance.
callback
Function, optional
An optional callback. If not supplied, the call is made synchronously.
ee.Geometry.Point.intersection
Returns the intersection of the two geometries.
Usage
Returns
Point.intersection(right, maxError, proj)
Geometry
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.Point.intersects
Returns true if and only if the geometries intersect.
Usage
Returns
Point.intersects(right, maxError, proj)
Boolean
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.Point.isUnbounded
Returns whether the geometry is unbounded.
Usage
Returns
Point.isUnbounded()
Boolean
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.Point.length
Returns the length of the linear parts of the geometry. Polygonal parts are ignored. The length of multi geometries is the sum of the lengths of their components.
Usage
Returns
Point.length(maxError, proj)
Float
Argument
Type
Details
this: geometry
Geometry
The input geometry.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the result will be in the units of the coordinate system of this projection. Otherwise it will be in meters.
ee.Geometry.Point.perimeter
Returns the length of the perimeter of the polygonal parts of the geometry. The perimeter of multi geometries is the sum of the perimeters of their components.
Usage
Returns
Point.perimeter(maxError, proj)
Float
Argument
Type
Details
this: geometry
Geometry
The input geometry.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the result will be in the units of the coordinate system of this projection. Otherwise it will be in meters.
ee.Geometry.Point.projection
Returns the projection of the geometry.
Usage
Returns
Point.projection()
Projection
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.Point.serialize
Returns the serialized representation of this object.
Usage
Returns
Point.serialize(legacy)
String
Argument
Type
Details
this: geometry
Geometry
The Geometry instance.
legacy
Boolean, optional
Enables legacy format.
ee.Geometry.Point.simplify
Simplifies the geometry to within a given error margin. Note that this does not respect the error margin requested by the consumer of this algorithm, unless maxError is explicitly specified to be null.
This overrides the default Earth Engine policy for propagating error margins, so regardless of the geometry accuracy requested from the output, the inputs will be requested with the error margin specified in the arguments to this algorithm. This results in consistent rendering at all zoom levels of a rendered vector map, but at lower zoom levels (i.e. zoomed out), the geometry won't be simplified, which may harm performance.
Usage
Returns
Point.simplify(maxError, proj)
Geometry
Argument
Type
Details
this: geometry
Geometry
The geometry to simplify.
maxError
ErrorMargin
The maximum amount of error by which the result may differ from the input.
proj
Projection, default: null
If specified, the result will be in this projection. Otherwise it will be in the same projection as the input. If the error margin is in projected units, the margin will be interpreted as units of this projection
ee.Geometry.Point.symmetricDifference
Returns the symmetric difference between two geometries.
Usage
Returns
Point.symmetricDifference(right, maxError, proj)
Geometry
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.Point.toGeoJSON
Returns a GeoJSON representation of the geometry.
Usage
Returns
Point.toGeoJSON()
GeoJSONGeometry
Argument
Type
Details
this: geometry
Geometry
The Geometry instance.
ee.Geometry.Point.toGeoJSONString
Returns a GeoJSON string representation of the geometry.
Usage
Returns
Point.toGeoJSONString()
String
Argument
Type
Details
this: geometry
Geometry
The Geometry instance.
ee.Geometry.Point.transform
Transforms the geometry to a specific projection.
Usage
Returns
Point.transform(proj, maxError)
Geometry
Argument
Type
Details
this: geometry
Geometry
The geometry to reproject.
proj
Projection, optional
The target projection. Defaults to WGS84. If this has a geographic CRS, the edges of the geometry will be interpreted as geodesics. Otherwise they will be interpreted as straight lines in the projection.
maxError
ErrorMargin, default: null
The maximum projection error.
ee.Geometry.Point.type
Returns the GeoJSON type of the geometry.
Usage
Returns
Point.type()
String
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.Point.union
Returns the union of the two geometries.
Usage
Returns
Point.union(right, maxError, proj)
Geometry
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.Point.withinDistance
Returns true if and only if the geometries are within a specified distance.
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
distance
Float
The distance threshold. If a projection is specified, the distance is in units of that projected coordinate system, otherwise it is in meters.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.Polygon
Constructs an ee.Geometry describing a polygon.
For convenience, varargs may be used when all arguments are numbers. This allows creating geodesic EPSG:4326 Polygons with a single LinearRing given an even number of arguments, e.g. ee.Geometry.Polygon(aLng, aLat, bLng, bLat, ..., aLng, aLat).
A list of rings defining the boundaries of the polygon. May be a list of coordinates in the GeoJSON 'Polygon' format, a list of ee.Geometry objects describing a LinearRing, or a list of numbers defining a single polygon boundary.
proj
Projection, optional
The projection of this geometry. The default is the projection of the inputs, where Numbers are assumed to be EPSG:4326.
geodesic
Boolean, optional
If false, edges are straight in the projection. If true, edges are curved to follow the shortest path on the surface of the Earth. The default is the geodesic state of the inputs, or true if the inputs are numbers.
maxError
ErrorMargin, optional
Max error when input geometry must be reprojected to an explicitly requested result projection or geodesic state.
evenOdd
Boolean, optional
If true, polygon interiors will be determined by the even/odd rule, where a point is inside if it crosses an odd number of edges to reach a point at infinity. Otherwise polygons use the left- inside rule, where interiors are on the left side of the shell's edges when walking the vertices in the given order. If unspecified, defaults to true.
ee.Geometry.Polygon.area
Returns the area of the geometry. Area of points and line strings is 0, and the area of multi geometries is the sum of the areas of their components (intersecting areas are counted multiple times).
Usage
Returns
Polygon.area(maxError, proj)
Float
Argument
Type
Details
this: geometry
Geometry
The geometry input.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the result will be in the units of the coordinate system of this projection. Otherwise it will be in square meters.
ee.Geometry.Polygon.aside
Calls a function passing this object as the first argument, and returning itself. Convenient e.g. when debugging:
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the result will be in this projection. Otherwise it will be in WGS84.
ee.Geometry.Polygon.buffer
Returns the input buffered by a given distance. If the distance is positive, the geometry is expanded, and if the distance is negative, the geometry is contracted.
Usage
Returns
Polygon.buffer(distance, maxError, proj)
Geometry
Argument
Type
Details
this: geometry
Geometry
The geometry being buffered.
distance
Float
The distance of the buffering, which may be negative. If no projection is specified, the unit is meters. Otherwise the unit is in the coordinate system of the projection.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when approximating the buffering circle and performing any necessary reprojection. If unspecified, defaults to 1% of the distance.
proj
Projection, default: null
If specified, the buffering will be performed in this projection and the distance will be interpreted as units of the coordinate system of this projection. Otherwise the distance is interpereted as meters and the buffering is performed in a spherical coordinate system.
ee.Geometry.Polygon.centroid
Returns a point at the center of the highest-dimension components of the geometry. Lower-dimensional components are ignored, so the centroid of a geometry containing two polygons, three lines and a point is equivalent to the centroid of a geometry containing just the two polygons.
Usage
Returns
Polygon.centroid(maxError, proj)
Geometry
Argument
Type
Details
this: geometry
Geometry
Calculates the centroid of this geometry.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the result will be in this projection. Otherwise it will be in WGS84.
ee.Geometry.Polygon.containedIn
Returns true if and only if one geometry is contained in the other.
Usage
Returns
Polygon.containedIn(right, maxError, proj)
Boolean
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.Polygon.contains
Returns true if and only if one geometry contains the other.
Usage
Returns
Polygon.contains(right, maxError, proj)
Boolean
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.Polygon.convexHull
Returns the convex hull of the given geometry. The convex hull of a single point is the point itself, the convex hull of collinear points is a line, and the convex hull of everything else is a polygon. Note that a degenerate polygon with all vertices on the same line will result in a line segment.
Usage
Returns
Polygon.convexHull(maxError, proj)
Geometry
Argument
Type
Details
this: geometry
Geometry
Calculates the convex hull of this geometry.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.Polygon.coordinates
Returns a GeoJSON-style list of the geometry's coordinates.
Usage
Returns
Polygon.coordinates()
List
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.Polygon.coveringGrid
Returns a collection of features that cover this geometry, where each feature is a rectangle in the grid defined by the given projection.
Usage
Returns
Polygon.coveringGrid(proj, scale)
FeatureCollection
Argument
Type
Details
this: geometry
Geometry
The result is the grid cells that intersect with this region.
proj
Projection
The projection in which to construct the grid. A feature is generated for each grid cell that intersects 'geometry', where cell corners are at integer-valued positions in the projection. If the projection is scaled in meters, the points will be on a grid of that size at the point of true scale.
scale
Float, default: null
Overrides the scale of the projection, if provided. May be required if the projection isn't already scaled.
ee.Geometry.Polygon.cutLines
Converts LineString, MultiLineString, and LinearRing geometries into a MultiLineString by cutting them into parts no longer than the given distance along their length. All other geometry types will be converted to an empty MultiLineString.
Usage
Returns
Polygon.cutLines(distances, maxError, proj)
Geometry
Argument
Type
Details
this: geometry
Geometry
Cuts the lines of this geometry.
distances
List
Distances along each LineString to cut the line into separate pieces, measured in units of the given proj, or meters if proj is unspecified.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
Projection of the result and distance measurements, or WGS84 if unspecified.
ee.Geometry.Polygon.difference
Returns the result of subtracting the 'right' geometry from the 'left' geometry.
Usage
Returns
Polygon.difference(right, maxError, proj)
Geometry
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.Polygon.disjoint
Returns true if and only if the geometries are disjoint.
Usage
Returns
Polygon.disjoint(right, maxError, proj)
Boolean
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.Polygon.dissolve
Returns the union of the geometry. This leaves single geometries untouched, and unions multi geometries.
Usage
Returns
Polygon.dissolve(maxError, proj)
Geometry
Argument
Type
Details
this: geometry
Geometry
The geometry to union.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the union will be performed in this projection. Otherwise it will be performed in a spherical coordinate system.
ee.Geometry.Polygon.distance
Returns the minimum distance between two geometries.
Usage
Returns
Polygon.distance(right, maxError, proj)
Float
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.Polygon.edgesAreGeodesics
Returns true if the geometry edges, if any, are geodesics along a spherical model of the earth; if false, any edges are straight lines in the projection.
Usage
Returns
Polygon.edgesAreGeodesics()
Boolean
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.Polygon.evaluate
Asynchronously retrieves the value of this object from the server and passes it to the provided callback function.
Usage
Returns
Polygon.evaluate(callback)
Argument
Type
Details
this: computedobject
ComputedObject
The ComputedObject instance.
callback
Function
A function of the form function(success, failure), called when the server returns an answer. If the request succeeded, the success argument contains the evaluated result. If the request failed, the failure argument will contains an error message.
ee.Geometry.Polygon.geodesic
If false, edges are straight in the projection. If true, edges are curved to follow the shortest path on the surface of the Earth.
Usage
Returns
Polygon.geodesic()
Boolean
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.Polygon.geometries
Returns the list of geometries in a GeometryCollection, or a singleton list of the geometry for single geometries.
Usage
Returns
Polygon.geometries()
List
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.Polygon.getInfo
Retrieves the value of this object from the server.
If no callback function is provided, the request is made synchronously. If a callback is provided, the request is made asynchronously.
The asynchronous mode is preferred because the synchronous mode stops all other code (for example, the EE Code Editor UI) while waiting for the server. To make an asynchronous request, evaluate() is preferred over getInfo().
Returns the computed value of this object.
Usage
Returns
Polygon.getInfo(callback)
Object
Argument
Type
Details
this: computedobject
ComputedObject
The ComputedObject instance.
callback
Function, optional
An optional callback. If not supplied, the call is made synchronously.
ee.Geometry.Polygon.intersection
Returns the intersection of the two geometries.
Usage
Returns
Polygon.intersection(right, maxError, proj)
Geometry
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.Polygon.intersects
Returns true if and only if the geometries intersect.
Usage
Returns
Polygon.intersects(right, maxError, proj)
Boolean
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.Polygon.isUnbounded
Returns whether the geometry is unbounded.
Usage
Returns
Polygon.isUnbounded()
Boolean
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.Polygon.length
Returns the length of the linear parts of the geometry. Polygonal parts are ignored. The length of multi geometries is the sum of the lengths of their components.
Usage
Returns
Polygon.length(maxError, proj)
Float
Argument
Type
Details
this: geometry
Geometry
The input geometry.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the result will be in the units of the coordinate system of this projection. Otherwise it will be in meters.
ee.Geometry.Polygon.perimeter
Returns the length of the perimeter of the polygonal parts of the geometry. The perimeter of multi geometries is the sum of the perimeters of their components.
Usage
Returns
Polygon.perimeter(maxError, proj)
Float
Argument
Type
Details
this: geometry
Geometry
The input geometry.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the result will be in the units of the coordinate system of this projection. Otherwise it will be in meters.
ee.Geometry.Polygon.projection
Returns the projection of the geometry.
Usage
Returns
Polygon.projection()
Projection
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.Polygon.serialize
Returns the serialized representation of this object.
Usage
Returns
Polygon.serialize(legacy)
String
Argument
Type
Details
this: geometry
Geometry
The Geometry instance.
legacy
Boolean, optional
Enables legacy format.
ee.Geometry.Polygon.simplify
Simplifies the geometry to within a given error margin. Note that this does not respect the error margin requested by the consumer of this algorithm, unless maxError is explicitly specified to be null.
This overrides the default Earth Engine policy for propagating error margins, so regardless of the geometry accuracy requested from the output, the inputs will be requested with the error margin specified in the arguments to this algorithm. This results in consistent rendering at all zoom levels of a rendered vector map, but at lower zoom levels (i.e. zoomed out), the geometry won't be simplified, which may harm performance.
Usage
Returns
Polygon.simplify(maxError, proj)
Geometry
Argument
Type
Details
this: geometry
Geometry
The geometry to simplify.
maxError
ErrorMargin
The maximum amount of error by which the result may differ from the input.
proj
Projection, default: null
If specified, the result will be in this projection. Otherwise it will be in the same projection as the input. If the error margin is in projected units, the margin will be interpreted as units of this projection
ee.Geometry.Polygon.symmetricDifference
Returns the symmetric difference between two geometries.
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.Polygon.toGeoJSON
Returns a GeoJSON representation of the geometry.
Usage
Returns
Polygon.toGeoJSON()
GeoJSONGeometry
Argument
Type
Details
this: geometry
Geometry
The Geometry instance.
ee.Geometry.Polygon.toGeoJSONString
Returns a GeoJSON string representation of the geometry.
Usage
Returns
Polygon.toGeoJSONString()
String
Argument
Type
Details
this: geometry
Geometry
The Geometry instance.
ee.Geometry.Polygon.transform
Transforms the geometry to a specific projection.
Usage
Returns
Polygon.transform(proj, maxError)
Geometry
Argument
Type
Details
this: geometry
Geometry
The geometry to reproject.
proj
Projection, optional
The target projection. Defaults to WGS84. If this has a geographic CRS, the edges of the geometry will be interpreted as geodesics. Otherwise they will be interpreted as straight lines in the projection.
maxError
ErrorMargin, default: null
The maximum projection error.
ee.Geometry.Polygon.type
Returns the GeoJSON type of the geometry.
Usage
Returns
Polygon.type()
String
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.Polygon.union
Returns the union of the two geometries.
Usage
Returns
Polygon.union(right, maxError, proj)
Geometry
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.Polygon.withinDistance
Returns true if and only if the geometries are within a specified distance.
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
distance
Float
The distance threshold. If a projection is specified, the distance is in units of that projected coordinate system, otherwise it is in meters.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.Rectangle
Constructs an ee.Geometry describing a rectangular polygon.
For convenience, varargs may be used when all arguments are numbers. This allows creating EPSG:4326 Polygons given exactly four coordinates, e.g. ee.Geometry.Rectangle(minLng, minLat, maxLng, maxLat).
The minimum and maximum corners of the rectangle, as a list of two points each in the format of GeoJSON 'Point' coordinates, or a list of two ee.Geometry objects describing a point, or a list of four numbers in the order xMin, yMin, xMax, yMax.
proj
Projection, optional
The projection of this geometry. If unspecified, the default is the projection of the input ee.Geometry, or EPSG:4326 if there are no ee.Geometry inputs.
geodesic
Boolean, optional
If false, edges are straight in the projection. If true, edges are curved to follow the shortest path on the surface of the Earth. The default is the geodesic state of the inputs, or true if the inputs are numbers.
evenOdd
Boolean, optional
If true, polygon interiors will be determined by the even/odd rule, where a point is inside if it crosses an odd number of edges to reach a point at infinity. Otherwise polygons use the left- inside rule, where interiors are on the left side of the shell's edges when walking the vertices in the given order. If unspecified, defaults to true.
ee.Geometry.Rectangle.area
Returns the area of the geometry. Area of points and line strings is 0, and the area of multi geometries is the sum of the areas of their components (intersecting areas are counted multiple times).
Usage
Returns
Rectangle.area(maxError, proj)
Float
Argument
Type
Details
this: geometry
Geometry
The geometry input.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the result will be in the units of the coordinate system of this projection. Otherwise it will be in square meters.
ee.Geometry.Rectangle.aside
Calls a function passing this object as the first argument, and returning itself. Convenient e.g. when debugging:
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the result will be in this projection. Otherwise it will be in WGS84.
ee.Geometry.Rectangle.buffer
Returns the input buffered by a given distance. If the distance is positive, the geometry is expanded, and if the distance is negative, the geometry is contracted.
Usage
Returns
Rectangle.buffer(distance, maxError, proj)
Geometry
Argument
Type
Details
this: geometry
Geometry
The geometry being buffered.
distance
Float
The distance of the buffering, which may be negative. If no projection is specified, the unit is meters. Otherwise the unit is in the coordinate system of the projection.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when approximating the buffering circle and performing any necessary reprojection. If unspecified, defaults to 1% of the distance.
proj
Projection, default: null
If specified, the buffering will be performed in this projection and the distance will be interpreted as units of the coordinate system of this projection. Otherwise the distance is interpereted as meters and the buffering is performed in a spherical coordinate system.
ee.Geometry.Rectangle.centroid
Returns a point at the center of the highest-dimension components of the geometry. Lower-dimensional components are ignored, so the centroid of a geometry containing two polygons, three lines and a point is equivalent to the centroid of a geometry containing just the two polygons.
Usage
Returns
Rectangle.centroid(maxError, proj)
Geometry
Argument
Type
Details
this: geometry
Geometry
Calculates the centroid of this geometry.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the result will be in this projection. Otherwise it will be in WGS84.
ee.Geometry.Rectangle.containedIn
Returns true if and only if one geometry is contained in the other.
Usage
Returns
Rectangle.containedIn(right, maxError, proj)
Boolean
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.Rectangle.contains
Returns true if and only if one geometry contains the other.
Usage
Returns
Rectangle.contains(right, maxError, proj)
Boolean
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.Rectangle.convexHull
Returns the convex hull of the given geometry. The convex hull of a single point is the point itself, the convex hull of collinear points is a line, and the convex hull of everything else is a polygon. Note that a degenerate polygon with all vertices on the same line will result in a line segment.
Usage
Returns
Rectangle.convexHull(maxError, proj)
Geometry
Argument
Type
Details
this: geometry
Geometry
Calculates the convex hull of this geometry.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.Rectangle.coordinates
Returns a GeoJSON-style list of the geometry's coordinates.
Usage
Returns
Rectangle.coordinates()
List
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.Rectangle.coveringGrid
Returns a collection of features that cover this geometry, where each feature is a rectangle in the grid defined by the given projection.
Usage
Returns
Rectangle.coveringGrid(proj, scale)
FeatureCollection
Argument
Type
Details
this: geometry
Geometry
The result is the grid cells that intersect with this region.
proj
Projection
The projection in which to construct the grid. A feature is generated for each grid cell that intersects 'geometry', where cell corners are at integer-valued positions in the projection. If the projection is scaled in meters, the points will be on a grid of that size at the point of true scale.
scale
Float, default: null
Overrides the scale of the projection, if provided. May be required if the projection isn't already scaled.
ee.Geometry.Rectangle.cutLines
Converts LineString, MultiLineString, and LinearRing geometries into a MultiLineString by cutting them into parts no longer than the given distance along their length. All other geometry types will be converted to an empty MultiLineString.
Usage
Returns
Rectangle.cutLines(distances, maxError, proj)
Geometry
Argument
Type
Details
this: geometry
Geometry
Cuts the lines of this geometry.
distances
List
Distances along each LineString to cut the line into separate pieces, measured in units of the given proj, or meters if proj is unspecified.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
Projection of the result and distance measurements, or WGS84 if unspecified.
ee.Geometry.Rectangle.difference
Returns the result of subtracting the 'right' geometry from the 'left' geometry.
Usage
Returns
Rectangle.difference(right, maxError, proj)
Geometry
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.Rectangle.disjoint
Returns true if and only if the geometries are disjoint.
Usage
Returns
Rectangle.disjoint(right, maxError, proj)
Boolean
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.Rectangle.dissolve
Returns the union of the geometry. This leaves single geometries untouched, and unions multi geometries.
Usage
Returns
Rectangle.dissolve(maxError, proj)
Geometry
Argument
Type
Details
this: geometry
Geometry
The geometry to union.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the union will be performed in this projection. Otherwise it will be performed in a spherical coordinate system.
ee.Geometry.Rectangle.distance
Returns the minimum distance between two geometries.
Usage
Returns
Rectangle.distance(right, maxError, proj)
Float
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.Rectangle.edgesAreGeodesics
Returns true if the geometry edges, if any, are geodesics along a spherical model of the earth; if false, any edges are straight lines in the projection.
Usage
Returns
Rectangle.edgesAreGeodesics()
Boolean
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.Rectangle.evaluate
Asynchronously retrieves the value of this object from the server and passes it to the provided callback function.
Usage
Returns
Rectangle.evaluate(callback)
Argument
Type
Details
this: computedobject
ComputedObject
The ComputedObject instance.
callback
Function
A function of the form function(success, failure), called when the server returns an answer. If the request succeeded, the success argument contains the evaluated result. If the request failed, the failure argument will contains an error message.
ee.Geometry.Rectangle.geodesic
If false, edges are straight in the projection. If true, edges are curved to follow the shortest path on the surface of the Earth.
Usage
Returns
Rectangle.geodesic()
Boolean
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.Rectangle.geometries
Returns the list of geometries in a GeometryCollection, or a singleton list of the geometry for single geometries.
Usage
Returns
Rectangle.geometries()
List
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.Rectangle.getInfo
Retrieves the value of this object from the server.
If no callback function is provided, the request is made synchronously. If a callback is provided, the request is made asynchronously.
The asynchronous mode is preferred because the synchronous mode stops all other code (for example, the EE Code Editor UI) while waiting for the server. To make an asynchronous request, evaluate() is preferred over getInfo().
Returns the computed value of this object.
Usage
Returns
Rectangle.getInfo(callback)
Object
Argument
Type
Details
this: computedobject
ComputedObject
The ComputedObject instance.
callback
Function, optional
An optional callback. If not supplied, the call is made synchronously.
ee.Geometry.Rectangle.intersection
Returns the intersection of the two geometries.
Usage
Returns
Rectangle.intersection(right, maxError, proj)
Geometry
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.Rectangle.intersects
Returns true if and only if the geometries intersect.
Usage
Returns
Rectangle.intersects(right, maxError, proj)
Boolean
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.Rectangle.isUnbounded
Returns whether the geometry is unbounded.
Usage
Returns
Rectangle.isUnbounded()
Boolean
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.Rectangle.length
Returns the length of the linear parts of the geometry. Polygonal parts are ignored. The length of multi geometries is the sum of the lengths of their components.
Usage
Returns
Rectangle.length(maxError, proj)
Float
Argument
Type
Details
this: geometry
Geometry
The input geometry.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the result will be in the units of the coordinate system of this projection. Otherwise it will be in meters.
ee.Geometry.Rectangle.perimeter
Returns the length of the perimeter of the polygonal parts of the geometry. The perimeter of multi geometries is the sum of the perimeters of their components.
Usage
Returns
Rectangle.perimeter(maxError, proj)
Float
Argument
Type
Details
this: geometry
Geometry
The input geometry.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the result will be in the units of the coordinate system of this projection. Otherwise it will be in meters.
ee.Geometry.Rectangle.projection
Returns the projection of the geometry.
Usage
Returns
Rectangle.projection()
Projection
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.Rectangle.serialize
Returns the serialized representation of this object.
Usage
Returns
Rectangle.serialize(legacy)
String
Argument
Type
Details
this: geometry
Geometry
The Geometry instance.
legacy
Boolean, optional
Enables legacy format.
ee.Geometry.Rectangle.simplify
Simplifies the geometry to within a given error margin. Note that this does not respect the error margin requested by the consumer of this algorithm, unless maxError is explicitly specified to be null.
This overrides the default Earth Engine policy for propagating error margins, so regardless of the geometry accuracy requested from the output, the inputs will be requested with the error margin specified in the arguments to this algorithm. This results in consistent rendering at all zoom levels of a rendered vector map, but at lower zoom levels (i.e. zoomed out), the geometry won't be simplified, which may harm performance.
Usage
Returns
Rectangle.simplify(maxError, proj)
Geometry
Argument
Type
Details
this: geometry
Geometry
The geometry to simplify.
maxError
ErrorMargin
The maximum amount of error by which the result may differ from the input.
proj
Projection, default: null
If specified, the result will be in this projection. Otherwise it will be in the same projection as the input. If the error margin is in projected units, the margin will be interpreted as units of this projection
ee.Geometry.Rectangle.symmetricDifference
Returns the symmetric difference between two geometries.
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.Rectangle.toGeoJSON
Returns a GeoJSON representation of the geometry.
Usage
Returns
Rectangle.toGeoJSON()
GeoJSONGeometry
Argument
Type
Details
this: geometry
Geometry
The Geometry instance.
ee.Geometry.Rectangle.toGeoJSONString
Returns a GeoJSON string representation of the geometry.
Usage
Returns
Rectangle.toGeoJSONString()
String
Argument
Type
Details
this: geometry
Geometry
The Geometry instance.
ee.Geometry.Rectangle.transform
Transforms the geometry to a specific projection.
Usage
Returns
Rectangle.transform(proj, maxError)
Geometry
Argument
Type
Details
this: geometry
Geometry
The geometry to reproject.
proj
Projection, optional
The target projection. Defaults to WGS84. If this has a geographic CRS, the edges of the geometry will be interpreted as geodesics. Otherwise they will be interpreted as straight lines in the projection.
maxError
ErrorMargin, default: null
The maximum projection error.
ee.Geometry.Rectangle.type
Returns the GeoJSON type of the geometry.
Usage
Returns
Rectangle.type()
String
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.Rectangle.union
Returns the union of the two geometries.
Usage
Returns
Rectangle.union(right, maxError, proj)
Geometry
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.Rectangle.withinDistance
Returns true if and only if the geometries are within a specified distance.
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
distance
Float
The distance threshold. If a projection is specified, the distance is in units of that projected coordinate system, otherwise it is in meters.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.area
Returns the area of the geometry. Area of points and line strings is 0, and the area of multi geometries is the sum of the areas of their components (intersecting areas are counted multiple times).
Usage
Returns
Geometry.area(maxError, proj)
Float
Argument
Type
Details
this: geometry
Geometry
The geometry input.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the result will be in the units of the coordinate system of this projection. Otherwise it will be in square meters.
ee.Geometry.aside
Calls a function passing this object as the first argument, and returning itself. Convenient e.g. when debugging:
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the result will be in this projection. Otherwise it will be in WGS84.
ee.Geometry.buffer
Returns the input buffered by a given distance. If the distance is positive, the geometry is expanded, and if the distance is negative, the geometry is contracted.
Usage
Returns
Geometry.buffer(distance, maxError, proj)
Geometry
Argument
Type
Details
this: geometry
Geometry
The geometry being buffered.
distance
Float
The distance of the buffering, which may be negative. If no projection is specified, the unit is meters. Otherwise the unit is in the coordinate system of the projection.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when approximating the buffering circle and performing any necessary reprojection. If unspecified, defaults to 1% of the distance.
proj
Projection, default: null
If specified, the buffering will be performed in this projection and the distance will be interpreted as units of the coordinate system of this projection. Otherwise the distance is interpereted as meters and the buffering is performed in a spherical coordinate system.
ee.Geometry.centroid
Returns a point at the center of the highest-dimension components of the geometry. Lower-dimensional components are ignored, so the centroid of a geometry containing two polygons, three lines and a point is equivalent to the centroid of a geometry containing just the two polygons.
Usage
Returns
Geometry.centroid(maxError, proj)
Geometry
Argument
Type
Details
this: geometry
Geometry
Calculates the centroid of this geometry.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the result will be in this projection. Otherwise it will be in WGS84.
ee.Geometry.containedIn
Returns true if and only if one geometry is contained in the other.
Usage
Returns
Geometry.containedIn(right, maxError, proj)
Boolean
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.contains
Returns true if and only if one geometry contains the other.
Usage
Returns
Geometry.contains(right, maxError, proj)
Boolean
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.convexHull
Returns the convex hull of the given geometry. The convex hull of a single point is the point itself, the convex hull of collinear points is a line, and the convex hull of everything else is a polygon. Note that a degenerate polygon with all vertices on the same line will result in a line segment.
Usage
Returns
Geometry.convexHull(maxError, proj)
Geometry
Argument
Type
Details
this: geometry
Geometry
Calculates the convex hull of this geometry.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.coordinates
Returns a GeoJSON-style list of the geometry's coordinates.
Usage
Returns
Geometry.coordinates()
List
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.coveringGrid
Returns a collection of features that cover this geometry, where each feature is a rectangle in the grid defined by the given projection.
Usage
Returns
Geometry.coveringGrid(proj, scale)
FeatureCollection
Argument
Type
Details
this: geometry
Geometry
The result is the grid cells that intersect with this region.
proj
Projection
The projection in which to construct the grid. A feature is generated for each grid cell that intersects 'geometry', where cell corners are at integer-valued positions in the projection. If the projection is scaled in meters, the points will be on a grid of that size at the point of true scale.
scale
Float, default: null
Overrides the scale of the projection, if provided. May be required if the projection isn't already scaled.
ee.Geometry.cutLines
Converts LineString, MultiLineString, and LinearRing geometries into a MultiLineString by cutting them into parts no longer than the given distance along their length. All other geometry types will be converted to an empty MultiLineString.
Usage
Returns
Geometry.cutLines(distances, maxError, proj)
Geometry
Argument
Type
Details
this: geometry
Geometry
Cuts the lines of this geometry.
distances
List
Distances along each LineString to cut the line into separate pieces, measured in units of the given proj, or meters if proj is unspecified.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
Projection of the result and distance measurements, or WGS84 if unspecified.
ee.Geometry.difference
Returns the result of subtracting the 'right' geometry from the 'left' geometry.
Usage
Returns
Geometry.difference(right, maxError, proj)
Geometry
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.disjoint
Returns true if and only if the geometries are disjoint.
Usage
Returns
Geometry.disjoint(right, maxError, proj)
Boolean
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.dissolve
Returns the union of the geometry. This leaves single geometries untouched, and unions multi geometries.
Usage
Returns
Geometry.dissolve(maxError, proj)
Geometry
Argument
Type
Details
this: geometry
Geometry
The geometry to union.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the union will be performed in this projection. Otherwise it will be performed in a spherical coordinate system.
ee.Geometry.distance
Returns the minimum distance between two geometries.
Usage
Returns
Geometry.distance(right, maxError, proj)
Float
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.edgesAreGeodesics
Returns true if the geometry edges, if any, are geodesics along a spherical model of the earth; if false, any edges are straight lines in the projection.
Usage
Returns
Geometry.edgesAreGeodesics()
Boolean
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.evaluate
Asynchronously retrieves the value of this object from the server and passes it to the provided callback function.
Usage
Returns
Geometry.evaluate(callback)
Argument
Type
Details
this: computedobject
ComputedObject
The ComputedObject instance.
callback
Function
A function of the form function(success, failure), called when the server returns an answer. If the request succeeded, the success argument contains the evaluated result. If the request failed, the failure argument will contains an error message.
ee.Geometry.geodesic
If false, edges are straight in the projection. If true, edges are curved to follow the shortest path on the surface of the Earth.
Usage
Returns
Geometry.geodesic()
Boolean
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.geometries
Returns the list of geometries in a GeometryCollection, or a singleton list of the geometry for single geometries.
Usage
Returns
Geometry.geometries()
List
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.getInfo
Retrieves the value of this object from the server.
If no callback function is provided, the request is made synchronously. If a callback is provided, the request is made asynchronously.
The asynchronous mode is preferred because the synchronous mode stops all other code (for example, the EE Code Editor UI) while waiting for the server. To make an asynchronous request, evaluate() is preferred over getInfo().
Returns the computed value of this object.
Usage
Returns
Geometry.getInfo(callback)
Object
Argument
Type
Details
this: computedobject
ComputedObject
The ComputedObject instance.
callback
Function, optional
An optional callback. If not supplied, the call is made synchronously.
ee.Geometry.intersection
Returns the intersection of the two geometries.
Usage
Returns
Geometry.intersection(right, maxError, proj)
Geometry
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.intersects
Returns true if and only if the geometries intersect.
Usage
Returns
Geometry.intersects(right, maxError, proj)
Boolean
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.isUnbounded
Returns whether the geometry is unbounded.
Usage
Returns
Geometry.isUnbounded()
Boolean
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.length
Returns the length of the linear parts of the geometry. Polygonal parts are ignored. The length of multi geometries is the sum of the lengths of their components.
Usage
Returns
Geometry.length(maxError, proj)
Float
Argument
Type
Details
this: geometry
Geometry
The input geometry.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the result will be in the units of the coordinate system of this projection. Otherwise it will be in meters.
ee.Geometry.perimeter
Returns the length of the perimeter of the polygonal parts of the geometry. The perimeter of multi geometries is the sum of the perimeters of their components.
Usage
Returns
Geometry.perimeter(maxError, proj)
Float
Argument
Type
Details
this: geometry
Geometry
The input geometry.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
If specified, the result will be in the units of the coordinate system of this projection. Otherwise it will be in meters.
ee.Geometry.projection
Returns the projection of the geometry.
Usage
Returns
Geometry.projection()
Projection
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.serialize
Returns the serialized representation of this object.
Usage
Returns
Geometry.serialize(legacy)
String
Argument
Type
Details
this: geometry
Geometry
The Geometry instance.
legacy
Boolean, optional
Enables legacy format.
ee.Geometry.simplify
Simplifies the geometry to within a given error margin. Note that this does not respect the error margin requested by the consumer of this algorithm, unless maxError is explicitly specified to be null.
This overrides the default Earth Engine policy for propagating error margins, so regardless of the geometry accuracy requested from the output, the inputs will be requested with the error margin specified in the arguments to this algorithm. This results in consistent rendering at all zoom levels of a rendered vector map, but at lower zoom levels (i.e. zoomed out), the geometry won't be simplified, which may harm performance.
Usage
Returns
Geometry.simplify(maxError, proj)
Geometry
Argument
Type
Details
this: geometry
Geometry
The geometry to simplify.
maxError
ErrorMargin
The maximum amount of error by which the result may differ from the input.
proj
Projection, default: null
If specified, the result will be in this projection. Otherwise it will be in the same projection as the input. If the error margin is in projected units, the margin will be interpreted as units of this projection
ee.Geometry.symmetricDifference
Returns the symmetric difference between two geometries.
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.toGeoJSON
Returns a GeoJSON representation of the geometry.
Usage
Returns
Geometry.toGeoJSON()
GeoJSONGeometry
Argument
Type
Details
this: geometry
Geometry
The Geometry instance.
ee.Geometry.toGeoJSONString
Returns a GeoJSON string representation of the geometry.
Usage
Returns
Geometry.toGeoJSONString()
String
Argument
Type
Details
this: geometry
Geometry
The Geometry instance.
ee.Geometry.transform
Transforms the geometry to a specific projection.
Usage
Returns
Geometry.transform(proj, maxError)
Geometry
Argument
Type
Details
this: geometry
Geometry
The geometry to reproject.
proj
Projection, optional
The target projection. Defaults to WGS84. If this has a geographic CRS, the edges of the geometry will be interpreted as geodesics. Otherwise they will be interpreted as straight lines in the projection.
maxError
ErrorMargin, default: null
The maximum projection error.
ee.Geometry.type
Returns the GeoJSON type of the geometry.
Usage
Returns
Geometry.type()
String
Argument
Type
Details
this: geometry
Geometry
ee.Geometry.union
Returns the union of the two geometries.
Usage
Returns
Geometry.union(right, maxError, proj)
Geometry
Argument
Type
Details
this: left
Geometry
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Geometry.withinDistance
Returns true if and only if the geometries are within a specified distance.
The geometry used as the left operand of the operation.
right
Geometry
The geometry used as the right operand of the operation.
distance
Float
The distance threshold. If a projection is specified, the distance is in units of that projected coordinate system, otherwise it is in meters.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when performing any necessary reprojection.
proj
Projection, default: null
The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere.
ee.Image
An object to represent an Earth Engine image. This constructor accepts a variety of arguments:
- A string: an EarthEngine asset id,
- A string and a number: an EarthEngine asset id and version,
- A number or ee.Array: creates a constant image,
- A list: creates an image out of each list element and combines them into a single image,
- An ee.Image: returns the argument,
- Nothing: results in an empty transparent image.
Usage
Returns
ee.Image(args)
Image
Argument
Type
Details
args
Image|List, optional
Constructor argument.
ee.Image.abs
Computes the absolute value of the input.
Usage
Returns
Image.abs()
Image
Argument
Type
Details
this: value
Image
The image to which the operation is applied.
ee.Image.acos
Computes the arc cosine in radians of the input.
Usage
Returns
Image.acos()
Image
Argument
Type
Details
this: value
Image
The image to which the operation is applied.
ee.Image.add
Adds the first value to the second for each matched pair of bands in image1 and image2. If either image1 or image2 has only 1 band, then it is used against all the bands in the other image. If the images have the same number of bands, but not the same names, they're used pairwise in the natural order. The output bands are named for the longer of the two inputs, or if they're equal in length, in image1's order. The type of the output pixels is the union of the input types.
Usage
Returns
Image.add(image2)
Image
Argument
Type
Details
this: image1
Image
The image from which the left operand bands are taken.
image2
Image
The image from which the right operand bands are taken.
ee.Image.addBands
Returns an image containing all bands copied from the first input and selected bands from the second input, optionally overwriting bands in the first image with the same name. The new image has the metadata and footprint from the first input image.
Usage
Returns
Image.addBands(srcImg, names, overwrite)
Image
Argument
Type
Details
this: dstImg
Image
An image into which to copy bands.
srcImg
Image
An image containing bands to copy.
names
List, default: null
Optional list of band names to copy. If names is omitted, all bands from srcImg will be copied over.
overwrite
Boolean, default: false
If true, bands from `srcImg` will override bands with the same names in `dstImg`. Otherwise the new band will be renamed with a numerical suffix (`foo` to `foo_1` unless `foo_1` exists, then `foo_2` unless it exists, etc).
ee.Image.and
Returns 1 if and only if both values are non-zero for each matched pair of bands in image1 and image2. If either image1 or image2 has only 1 band, then it is used against all the bands in the other image. If the images have the same number of bands, but not the same names, they're used pairwise in the natural order. The output bands are named for the longer of the two inputs, or if they're equal in length, in image1's order. The type of the output pixels is boolean.
Usage
Returns
Image.and(image2)
Image
Argument
Type
Details
this: image1
Image
The image from which the left operand bands are taken.
image2
Image
The image from which the right operand bands are taken.
ee.Image.arrayAccum
Accumulates elements of each array pixel along the given axis, by setting each element of the result array pixel to the reduction of elements in that pixel along the given axis, up to and including the current position on the axis. May be used to make a cumulative sum, a monotonically increasing sequence, etc.
Usage
Returns
Image.arrayAccum(axis, reducer)
Image
Argument
Type
Details
this: input
Image
Input image.
axis
Integer
Axis along which to perform the cumulative sum.
reducer
Reducer, default: null
Reducer to accumulate values. Default is SUM, to produce the cumulative sum of each vector along the given axis.
ee.Image.arrayArgmax
Computes the positional indices of the maximum value in image of array values. If there are multiple occurrences of the maximum, the indices reflect the first.
Usage
Returns
Image.arrayArgmax()
Image
Argument
Type
Details
this: image
Image
The input image.
ee.Image.arrayCat
Creates an array image by concatenating each array pixel along the given axis in each band.
Usage
Returns
Image.arrayCat(image2, axis)
Image
Argument
Type
Details
this: image1
Image
First array image to concatenate.
image2
Image
Second array image to concatenate.
axis
Integer
Axis to concatenate along.
ee.Image.arrayDimensions
Returns the number of dimensions in each array band, and 0 for scalar image bands.
Usage
Returns
Image.arrayDimensions()
Image
Argument
Type
Details
this: input
Image
Input image.
ee.Image.arrayDotProduct
Computes the dot product of each pair of 1-D arrays in the bands of the input images.
Usage
Returns
Image.arrayDotProduct(image2)
Image
Argument
Type
Details
this: image1
Image
First array image of 1-D vectors.
image2
Image
Second array image of 1-D vectors.
ee.Image.arrayFlatten
Converts a single band image of equal-shape multidimensional pixels to an image of scalar pixels, with one band for each element of the array.
Usage
Returns
Image.arrayFlatten(coordinateLabels, separator)
Image
Argument
Type
Details
this: image
Image
Image of multidimensional pixels to flatten.
coordinateLabels
List
Name of each position along each axis. For example, 2x2 arrays with axes meaning 'day' and 'color' could have labels like [['monday', 'tuesday'], ['red', 'green']], resulting in band names'monday_red', 'monday_green', 'tuesday_red', and 'tuesday_green'.
separator
String, default: "_"
Separator between array labels in each band name.
ee.Image.arrayGet
For each band, an output band of the same name is created with the value at the given position extracted from the input multidimensional pixel in that band.
Usage
Returns
Image.arrayGet(position)
Image
Argument
Type
Details
this: image
Image
Array to get an element from.
position
Image
The coordinates of the element to get. There must be as many scalar bands as there are dimensions in the input image.
ee.Image.arrayLength
Returns the length of each pixel's array along the given axis.
Usage
Returns
Image.arrayLength(axis)
Image
Argument
Type
Details
this: input
Image
Input image.
axis
Integer
The axis along which to take the length.
ee.Image.arrayLengths
Returns a 1D array image with the length of each array axis.
Usage
Returns
Image.arrayLengths()
Image
Argument
Type
Details
this: input
Image
Input image.
ee.Image.arrayMask
Creates an array image where each array-valued pixel is masked with another array-valued pixel, retaining only the elements where the mask is non-zero. If the mask image has one band it will be applied to all the bands of 'input', otherwise they must have the same number of bands.
Usage
Returns
Image.arrayMask(mask)
Image
Argument
Type
Details
this: input
Image
Array image to mask.
mask
Image
Array image to mask with.
ee.Image.arrayPad
Pads the array values in each pixel to be a fixed length. The pad value will be appended to each array to extend it to given length along each axis. All bands of the image must be array-valued and have the same dimensions.
Usage
Returns
Image.arrayPad(lengths, pad)
Image
Argument
Type
Details
this: image
Image
Array image to pad.
lengths
List
A list of desired lengths for each axis in the output arrays. Arrays are already as large or larger than the given length will be unchanged along that axis
pad
Number, default: 0
The value to pad with.
ee.Image.arrayProject
Projects the array in each pixel to a lower dimensional space by specifying the axes to retain. Dropped axes must be at most length 1.
Usage
Returns
Image.arrayProject(axes)
Image
Argument
Type
Details
this: input
Image
Input image.
axes
List
The axes to retain. Other axes will be discarded and must be at most length 1.
ee.Image.arrayReduce
Reduces elements of each array pixel.
Usage
Returns
Image.arrayReduce(reducer, axes, fieldAxis)
Image
Argument
Type
Details
this: input
Image
Input image.
reducer
Reducer
The reducer to apply
axes
List
The list of array axes to reduce in each pixel. The output will have a length of 1 in all these axes.
fieldAxis
Integer, default: null
The axis for the reducer's input and output fields. Only required if the reducer has multiple inputs or outputs.
ee.Image.arrayRepeat
Repeats each array pixel along the given axis. Each output pixel will have the shape of the input pixel, except length along the repeated axis, which will be multiplied by the number of copies.
Usage
Returns
Image.arrayRepeat(axis, copies)
Image
Argument
Type
Details
this: input
Image
Image of array pixels to be repeated.
axis
Integer
Axis along which to repeat each pixel's array.
copies
Image
Number of copies of each pixel.
ee.Image.arrayReshape
Converts array bands of an image with equally-shaped, possibly multidimensional pixels to an image of arrays with a new shape.
Usage
Returns
Image.arrayReshape(lengths, dimensions)
Image
Argument
Type
Details
this: image
Image
The image of arrays to reshape.
lengths
Image
A 1 band image specifying the new lengths of each axis of the input image specified as a 1-D array per pixel. There should be 'dimensions' lengths values in each shape' array. If one of the lengths is -1, then the corresponding length for that axis will be computed such that the total size remains constant. In particular, a shape of [-1] flattens into 1-D. At most one component of shape can be -1.
dimensions
Integer
The number of dimensions shared by all output array pixels.
ee.Image.arraySlice
Creates a subarray by slicing out each position along the given axis from the 'start' (inclusive) to 'end' (exclusive) by increments of 'step'. The result will have as many dimensions as the input, and the same length in all directions except the slicing axis, where the length will be the number of positions from 'start' to 'end' by 'step' that are in range of the input array's length along 'axis'. This means the result can be length 0 along the given axis if start=end, or if the start or end values are entirely out of range.
Usage
Returns
Image.arraySlice(axis, start, end, step)
Image
Argument
Type
Details
this: input
Image
Input array image.
axis
Integer, default: 0
Axis to subset.
start
Image, default: null
The coordinate of the first slice (inclusive) along 'axis'. Negative numbers are used to position the start of slicing relative to the end of the array, where -1 starts at the last position on the axis, -2 starts at the next to last position, etc. There must one band for start indices, or one band per 'input' band. If this argument is not set or masked at some pixel, then the slice at that pixel will start at index 0.
end
Image, default: null
The coordinate (exclusive) at which to stop taking slices. By default this will be the length of the given axis. Negative numbers are used to position the end of slicing relative to the end of the array, where -1 will exclude the last position, -2 will exclude the last two positions, etc. There must be one band for end indices, or one band per 'input' band. If this argument is not set or masked at some pixel, then the slice at that pixel will end just after the last index.
step
Integer, default: 1
The separation between slices along 'axis'; a slice will be taken at each whole multiple of 'step' from 'start' (inclusive) to 'end' (exclusive). Must be positive.
ee.Image.arraySort
Sorts elements of each array pixel along one axis.
Usage
Returns
Image.arraySort(keys)
Image
Argument
Type
Details
this: image
Image
Array image to sort.
keys
Image, default: null
Optional keys to sort by. If not provided, the values are used as the keys. The keys can only have multiple elements along one axis, which determines the direction to sort in.
ee.Image.arrayTranspose
Transposes two dimensions of each array pixel.
Usage
Returns
Image.arrayTranspose(axis1, axis2)
Image
Argument
Type
Details
this: input
Image
Input image.
axis1
Integer, default: 0
First axis to swap.
axis2
Integer, default: 1
Second axis to swap.
ee.Image.aside
Calls a function passing this object as the first argument, and returning itself. Convenient e.g. when debugging:
Calculates the angle formed by the 2D vector [x, y] for each matched pair of bands in image1 and image2. If either image1 or image2 has only 1 band, then it is used against all the bands in the other image. If the images have the same number of bands, but not the same names, they're used pairwise in the natural order. The output bands are named for the longer of the two inputs, or if they're equal in length, in image1's order. The type of the output pixels is float.
Usage
Returns
Image.atan2(image2)
Image
Argument
Type
Details
this: image1
Image
The image from which the left operand bands are taken.
image2
Image
The image from which the right operand bands are taken.
ee.Image.bandNames
Returns a list containing the names of the bands of an image.
Usage
Returns
Image.bandNames()
List
Argument
Type
Details
this: image
Image
The image from which to get band names.
ee.Image.bandTypes
Returns a dictionary of the image's band types.
Usage
Returns
Image.bandTypes()
Dictionary
Argument
Type
Details
this: image
Image
The image from which to get band types.
ee.Image.bitCount
Calculates the number of one-bits in the 64-bit two's complement binary representation of the input.
Usage
Returns
Image.bitCount()
Image
Argument
Type
Details
this: value
Image
The image to which the operation is applied.
ee.Image.bitsToArrayImage
Turns the bits of an integer into a 1-D array. The array has a lengthup to the highest 'on' bit in the input.
Usage
Returns
Image.bitsToArrayImage()
Image
Argument
Type
Details
this: input
Image
Input image.
ee.Image.bitwiseAnd
Calculates the bitwise AND of the input values for each matched pair of bands in image1 and image2. If either image1 or image2 has only 1 band, then it is used against all the bands in the other image. If the images have the same number of bands, but not the same names, they're used pairwise in the natural order. The output bands are named for the longer of the two inputs, or if they're equal in length, in image1's order. The type of the output pixels is the union of the input types.
Usage
Returns
Image.bitwiseAnd(image2)
Image
Argument
Type
Details
this: image1
Image
The image from which the left operand bands are taken.
image2
Image
The image from which the right operand bands are taken.
ee.Image.bitwiseNot
Calculates the bitwise NOT of the input, in the smallest signed integer type that can hold the input.
Usage
Returns
Image.bitwiseNot()
Image
Argument
Type
Details
this: value
Image
The image to which the operation is applied.
ee.Image.bitwiseOr
Calculates the bitwise OR of the input values for each matched pair of bands in image1 and image2. If either image1 or image2 has only 1 band, then it is used against all the bands in the other image. If the images have the same number of bands, but not the same names, they're used pairwise in the natural order. The output bands are named for the longer of the two inputs, or if they're equal in length, in image1's order. The type of the output pixels is the union of the input types.
Usage
Returns
Image.bitwiseOr(image2)
Image
Argument
Type
Details
this: image1
Image
The image from which the left operand bands are taken.
image2
Image
The image from which the right operand bands are taken.
ee.Image.bitwiseXor
Calculates the bitwise XOR of the input values for each matched pair of bands in image1 and image2. If either image1 or image2 has only 1 band, then it is used against all the bands in the other image. If the images have the same number of bands, but not the same names, they're used pairwise in the natural order. The output bands are named for the longer of the two inputs, or if they're equal in length, in image1's order. The type of the output pixels is the union of the input types.
Usage
Returns
Image.bitwiseXor(image2)
Image
Argument
Type
Details
this: image1
Image
The image from which the left operand bands are taken.
image2
Image
The image from which the right operand bands are taken.
ee.Image.blend
Overlays one image on top of another. The images are blended together using the masks as opacity. If either of images has only 1 band, it is replicated to match the number of bands in the other image.
Usage
Returns
Image.blend(top)
Image
Argument
Type
Details
this: bottom
Image
The bottom image.
top
Image
The top image.
ee.Image.byte
Casts the input value to an unsigned 8-bit integer.
Usage
Returns
Image.byte()
Image
Argument
Type
Details
this: value
Image
The image to which the operation is applied.
ee.Image.cast
Casts some or all bands of an image to the specified types.
Usage
Returns
Image.cast(bandTypes, bandOrder)
Image
Argument
Type
Details
this: image
Image
The image to cast.
bandTypes
Dictionary
A dictionary from band name to band types. Types can be PixelTypes or strings. The valid strings are: 'int8', 'int16', 'int32', 'int64', 'uint8', 'uint16', 'uint32', 'byte', 'short', 'int', 'long', 'float' and 'double'. If bandTypes includes bands that are not already in the input image, they will be added to the image as transparent bands. If bandOrder isn't also specified, new bands will be appended in alphabetical order.
bandOrder
List, default: null
A list specifying the order of the bands in the result. If specified, must match the full list of bands in the result.
ee.Image.cat
Combines the given images into a single image which contains all bands from all of the images.
If two or more bands share a name, they are suffixed with an incrementing index.
The resulting image will have the metadata from the first input image, only.
This function will promote constant values into constant images.
Returns the combined image.
Usage
Returns
ee.Image.cat(var_args)
Image
Argument
Type
Details
var_args
VarArgs
The images to be combined.
ee.Image.cbrt
Computes the cubic root of the input.
Usage
Returns
Image.cbrt()
Image
Argument
Type
Details
this: value
Image
The image to which the operation is applied.
ee.Image.ceil
Computes the smallest integer greater than or equal to the input.
Usage
Returns
Image.ceil()
Image
Argument
Type
Details
this: value
Image
The image to which the operation is applied.
ee.Image.changeProj
Tweaks the projection of the input image, moving each pixel from its location in srcProj to the same coordinates in dstProj.
Usage
Returns
Image.changeProj(srcProj, dstProj)
Image
Argument
Type
Details
this: input
Image
srcProj
Projection
The original projection.
dstProj
Projection
The new projection.
ee.Image.clamp
Clamps the values in all bands of an image to all lie within the specified range.
Usage
Returns
Image.clamp(low, high)
Image
Argument
Type
Details
this: input
Image
The image to clamp.
low
Float
The minimum allowed value in the range.
high
Float
The maximum allowed value in the range.
ee.Image.classify
Classifies an image.
Usage
Returns
Image.classify(classifier, outputName)
Image
Argument
Type
Details
this: image
Image
The image to classify. Bands are extracted from this image by name, and it must contain all the bands named in the classifier's schema.
classifier
Classifier
The classifier to use.
outputName
String, default: "classification"
The name of the band to be added. If the classifier produces more than 1 output, this name is ignored.
ee.Image.clip
Clips an image to a Geometry or Feature.
The output bands correspond exactly to the input bands, except data not covered by the geometry is masked. The output image retains the metadata of the input image.
Use clipToCollection to clip an image to a FeatureCollection.
Returns the clipped image.
Usage
Returns
Image.clip(geometry)
Image
Argument
Type
Details
this: image
Image
The Image instance.
geometry
Feature|Geometry|Object
The Geometry or Feature to clip to.
ee.Image.clipToBoundsAndScale
Clips an image to the bounds of a Geometry, and scales the clipped image to a particular size or scale.
The Geometry to clip the image to. The image will be clipped to the bounding box, in the image's projection, of this geometry.
width
Integer, default: null
The width to scale the image to, in pixels. Must be provided along with "height". Exclusive with "maxDimension" and "scale".
height
Integer, default: null
The height to scale the image to, in pixels. Must be provided along with "width". Exclusive with "maxDimension" and "scale".
maxDimension
Integer, default: null
The maximum dimension to scale the image to, in pixels. Exclusive with "width", "height" and "scale".
scale
Float, default: null
If scale is specified, then the projection is scaled by dividing the specified scale value by the nominal size of a meter in the image's projection. Exclusive with "width", "height" and "maxDimension".
ee.Image.clipToCollection
Clips an image to a FeatureCollection. The output bands correspond exactly the input bands, except data not covered by the geometry of at least one feature from the collection is masked. The output image retains the metadata of the input image.
Usage
Returns
Image.clipToCollection(collection)
Image
Argument
Type
Details
this: input
Image
The image to clip.
collection
Object
The FeatureCollection to clip to.
ee.Image.cluster
Applies a clusterer to an image. Returns a new image with a single band containing values from 0 to N, indicating the cluster each pixel is assigned to.
Usage
Returns
Image.cluster(clusterer, outputName)
Image
Argument
Type
Details
this: image
Image
The image to cluster. Must contain all the bands in the clusterer's schema.
clusterer
Clusterer
The clusterer to use.
outputName
String, default: "cluster"
The name of the output band.
ee.Image.connectedComponents
Finds connected components with the same value of the first band of the input and labels them with a globally unique value. Connectedness is specified by the given kernel. Objects larger than maxSize are considered background, and are masked.
Usage
Returns
Image.connectedComponents(connectedness, maxSize)
Image
Argument
Type
Details
this: image
Image
The image to label.
connectedness
Kernel
Connectedness kernel.
maxSize
Integer
Maximum size of objects to be labeled.
ee.Image.connectedPixelCount
Generate an image where each pixel contains the number of 4- or 8-connected neighbors (including itself).
An image representing the cost to traverse each pixel. Masked pixels can't be traversed. When comparing pixel traversal costs, we use band-wise dictionary ordering. Ancillary cost bands are only considered when paths over primary bands are equal cost.
source
Image
A single-band image representing the sources. A pixel value different from 0 defines a source pixel.
maxDistance
Float
Maximum distance for computation, in meters.
geodeticDistance
Boolean, default: true
If true, geodetic distance along the curved surface is used, assuming a spherical Earth of radius 6378137.0. If false, euclidean distance in the 2D plane of the map projection is used (faster, but less accurate).
ee.Image.date
Returns the acquisition time of an image as a Date object. This helper function is equivalent to ee.Date(image.get('system:time_start')).
Usage
Returns
Image.date()
Date
Argument
Type
Details
this: image
Image
The image whose acquisition time to return.
ee.Image.derivative
Computes the X and Y discrete derivatives for each band in the input image, in pixel coordinates.
For each band of the input image, the output image will have two bands named with the suffixes _x and _y, containing the respective derivatives.
Usage
Returns
Image.derivative()
Image
Argument
Type
Details
this: image
Image
The input image.
ee.Image.digamma
Computes the digamma function of the input.
Usage
Returns
Image.digamma()
Image
Argument
Type
Details
this: value
Image
The image to which the operation is applied.
ee.Image.directionalDistanceTransform
For each zero-valued pixel in the source, get the distance to the nearest non-zero pixels in the given direction.
Returns a band of floating point distances called "distance".
The angle, in degrees, at which to search for non-zero pixels.
maxDistance
Integer
The maximum distance, in pixels, over which to search.
labelBand
String, default: null
If provided, multi-band inputs are permitted and only this band is used for searching. All other bands are returned and populated with the per-band values found at the searched non-zero pixels in the label band.
ee.Image.displace
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.
ee.Image.displacement
Determines displacements required to register an image to a reference image while allowing local, rubber sheet deformations. Displacements are computed in the CRS of the reference image, at a scale dictated by the lowest resolution of the following three projections: input image projection, reference image projection, and requested projection. The displacements are then transformed into the user-specified projection for output.
The maximum offset allowed when attempting to align the input images, in meters. Using a smaller value can reduce computation time significantly, but it must still be large enough to cover the greatest displacement within the entire image region.
projection
Projection, default: null
The projection in which to output displacement values. The default is the projection of the first band of the reference image.
patchWidth
Float, default: null
Patch size for detecting image offsets, in meters. This should be set large enough to capture texture, as well as large enough that ignorable objects are small within the patch. Default is null. Patch size will be determined automatically if not provided.
stiffness
Float, default: 5
Enforces a stiffness constraint on the solution. Valid values are in the range [0,10]. The stiffness is used for outlier rejection when determining displacements at adjacent grid points. Higher values move the solution towards a rigid transformation. Lower values allow more distortion or warping of the image during registration.
ee.Image.distance
Computes the distance to the nearest non-zero pixel in each band, using the specified distance kernel.
Usage
Returns
Image.distance(kernel, skipMasked)
Image
Argument
Type
Details
this: image
Image
The input image.
kernel
Kernel, default: null
The distance kernel. One of chebyshev, euclidean, or manhattan.
skipMasked
Boolean, default: true
Mask output pixels if the corresponding input pixel is masked.
ee.Image.divide
Divides the first value by the second, returning 0 for division by 0 for each matched pair of bands in image1 and image2. If either image1 or image2 has only 1 band, then it is used against all the bands in the other image. If the images have the same number of bands, but not the same names, they're used pairwise in the natural order. The output bands are named for the longer of the two inputs, or if they're equal in length, in image1's order. The type of the output pixels is the union of the input types.
Usage
Returns
Image.divide(image2)
Image
Argument
Type
Details
this: image1
Image
The image from which the left operand bands are taken.
image2
Image
The image from which the right operand bands are taken.
ee.Image.double
Casts the input value to a 64-bit float.
Usage
Returns
Image.double()
Image
Argument
Type
Details
this: value
Image
The image to which the operation is applied.
ee.Image.entropy
Computes the windowed entropy for each band using the specified kernel centered on each input pixel. Entropy is computed as -sum(p * log2(p)), where p is the normalized probability of occurrence of the values encountered in each window.
Usage
Returns
Image.entropy(kernel)
Image
Argument
Type
Details
this: image
Image
The image for which to compute the entropy.
kernel
Kernel
A kernel specifying the window in which to compute.
ee.Image.eq
Returns 1 if and only if the first value is equal to the second for each matched pair of bands in image1 and image2. If either image1 or image2 has only 1 band, then it is used against all the bands in the other image. If the images have the same number of bands, but not the same names, they're used pairwise in the natural order. The output bands are named for the longer of the two inputs, or if they're equal in length, in image1's order. The type of the output pixels is boolean.
Usage
Returns
Image.eq(image2)
Image
Argument
Type
Details
this: image1
Image
The image from which the left operand bands are taken.
image2
Image
The image from which the right operand bands are taken.
ee.Image.erf
Computes the error function of the input.
Usage
Returns
Image.erf()
Image
Argument
Type
Details
this: value
Image
The image to which the operation is applied.
ee.Image.erfInv
Computes the inverse error function of the input.
Usage
Returns
Image.erfInv()
Image
Argument
Type
Details
this: value
Image
The image to which the operation is applied.
ee.Image.erfc
Computes the complementary error function of the input.
Usage
Returns
Image.erfc()
Image
Argument
Type
Details
this: value
Image
The image to which the operation is applied.
ee.Image.erfcInv
Computes the inverse complementary error function of the input.