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).
Usage | Returns |
---|
ee.Geometry.LinearRing(coords, proj, geodesic, maxError) | Geometry.LinearRing |
Argument | Type | Details |
---|
coords | List | 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. |
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 2023-10-06 UTC.
[null,null,["Last updated 2023-10-06 UTC."],[[["Defines a closed ring on the Earth's surface, ensuring the last point connects back to the first."],["Allows simplified creation of geodesic (EPSG:4326) rings using a series of longitude and latitude values."],["Accepts various input formats for ring coordinates, including GeoJSON, ee.Geometry objects, or raw numerical coordinates."],["Projection and geodesic behavior can be customized; defaults to input projection or EPSG:4326 with geodesic edges if unspecified."],["Includes an optional parameter to control error during reprojection for precise geometry handling."]]],["This code constructs a `LinearRing` geometry. It takes a list of coordinates (`coords`), an optional projection (`proj`), an optional geodesic setting, and an optional maximum error (`maxError`). If the last point in `coords` isn't the same as the first, it adds a duplicate. Varargs can be used with numbers, creating geodesic EPSG:4326 LinearRings. `coords` can be a list of coordinates, point geometries, or numbers. `geodesic` determines if edges are straight or curved.\n"]]