ee.Algorithms.GeometryConstructors.Polygon
Constructs a Polygon from the given coordinates.
Usage | Returns |
---|
ee.Algorithms.GeometryConstructors.Polygon(coordinates, crs, geodesic, maxError, evenOdd) | Geometry |
Argument | Type | Details |
---|
coordinates | List | 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. |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-07-13 UTC.
[null,null,["Last updated 2024-07-13 UTC."],[[["Creates a polygon geometry from a list of coordinates, representing its outer boundary (shell) and optionally inner boundaries (holes)."],["Allows customization of the coordinate system (`crs`), whether edges are straight or follow Earth's curvature (`geodesic`), and error tolerance during reprojection (`maxError`)."],["Defines polygon interiors using either the even/odd rule (default) or the left-inside rule, affecting how points within the polygon are identified."]]],[]]