Stay organized with collections
Save and categorize content based on your preferences.
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-10-06 UTC."],[[["`ee.Geometry.Polygon` constructs a polygon geometry in Earth Engine, accepting coordinates, projection, geodesic, max error, and even/odd parameters for customization."],["Input coordinates can be provided as GeoJSON 'Polygon' format, a list of `ee.Geometry.LinearRing` objects, or a list of coordinate pairs for the boundary."],["By default, the projection is derived from inputs (numbers assumed as EPSG:4326), edges are straight unless `geodesic` is true, and interiors are determined using the even/odd rule."],["Optional parameters allow for specifying projection, geodesic behavior, maximum error for reprojection, and even/odd rule for polygon interiors."],["Conveniently, polygons can be created with a single LinearRing using varargs for providing coordinate pairs in EPSG:4326."]]],[]]