ee.Geometry.LinearRing.bounds

Returns the bounding rectangle of the geometry.
UsageReturns
LinearRing.bounds(maxError, proj)Geometry
ArgumentTypeDetails
this: geometryGeometryReturn the bounding box of this geometry.
maxErrorErrorMargin, default: nullThe maximum amount of error tolerated when performing any necessary reprojection.
projProjection, default: nullIf specified, the result will be in this projection. Otherwise it will be in WGS84.

Examples

Code Editor (JavaScript)

// Define a LinearRing object.
var linearRing = ee.Geometry.LinearRing(
    [[-122.091, 37.420],
     [-122.085, 37.422],
     [-122.080, 37.430]]);

// Apply the bounds method to the LinearRing object.
var linearRingBounds = linearRing.bounds();

// Print the result to the console.
print('linearRing.bounds(...) =', linearRingBounds);

// Display relevant geometries on the map.
Map.setCenter(-122.085, 37.422, 15);
Map.addLayer(linearRing,
             {'color': 'black'},
             'Geometry [black]: linearRing');
Map.addLayer(linearRingBounds,
             {'color': 'red'},
             'Result [red]: linearRing.bounds');