공지사항:
2025년 4월 15일 전에 Earth Engine 사용을 위해 등록된 모든 비상업용 프로젝트는 Earth Engine 액세스를 유지하기 위해
비상업용 자격 요건을 인증해야 합니다.
ee.Geometry.Rectangle
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
직사각형 다각형을 설명하는 ee.Geometry를 생성합니다.
편의를 위해 모든 인수가 숫자인 경우 varargs를 사용할 수 있습니다. 이를 통해 정확히 4개의 좌표(예: ee.Geometry.Rectangle(minLng, minLat, maxLng, maxLat))가 주어지면 EPSG:4326 다각형을 만들 수 있습니다.
사용 | 반환 값 |
---|
ee.Geometry.Rectangle(coords, proj, geodesic, evenOdd) | Geometry.Rectangle |
인수 | 유형 | 세부정보 |
---|
coords | List<Geometry>|List<List<Number>>|List<Number> | 직사각형의 최소 및 최대 모서리입니다. GeoJSON 'Point' 좌표 형식의 점 두 개 목록, 점을 설명하는 ee.Geometry 객체 두 개 목록 또는 xMin, yMin, xMax, yMax 순서의 숫자 네 개 목록으로 지정됩니다. |
proj | 투영(선택사항) | 이 도형의 투영입니다. 지정하지 않으면 입력 ee.Geometry의 투영이 기본값으로 설정되며, ee.Geometry 입력이 없는 경우 EPSG:4326이 기본값으로 설정됩니다. |
geodesic | 불리언, 선택사항 | false인 경우 모서리가 투영에서 직선입니다. true인 경우 모서리가 지구 표면에서 가장 짧은 경로를 따라 곡선으로 표시됩니다. 기본값은 입력의 측지선 상태입니다. 입력이 숫자인 경우 기본값은 true입니다. |
evenOdd | 불리언, 선택사항 | true인 경우 다각형 내부는 홀수/짝수 규칙에 따라 결정됩니다. 무한대의 점에 도달하기 위해 홀수 개의 모서리를 교차하는 경우 점이 내부에 있습니다. 그렇지 않으면 다각형은 왼쪽 내부 규칙을 사용합니다. 이 규칙에 따라 지정된 순서로 꼭짓점을 따라 이동할 때 내부가 셸의 가장자리 왼쪽에 있습니다. 지정하지 않으면 기본값은 true입니다. |
예
코드 편집기 (JavaScript)
// Coordinates for the bounds of a rectangle.
var xMin = -122.09;
var yMin = 37.42;
var xMax = -122.08;
var yMax = 37.43;
// Construct a rectangle from a list of GeoJSON 'point' formatted coordinates.
var rectangleGeoJSON = ee.Geometry.Rectangle(
[
[xMin, yMin],
[xMax, yMax] // max x and y
]
);
Map.addLayer(rectangleGeoJSON, {}, 'rectangleGeoJSON');
// Construct a rectangle from a list of ee.Geometry.Point objects.
var rectanglePoint = ee.Geometry.Rectangle(
[
ee.Geometry.Point(xMin, yMin), // min x and y
ee.Geometry.Point(xMax, yMax) // max x and y
]
);
Map.addLayer(rectanglePoint, {}, 'rectanglePoint');
// Construct a rectangle from a list of bounding coordinates.
var rectangleBounds = ee.Geometry.Rectangle(
[xMin, yMin, xMax, yMax]
);
Map.addLayer(rectangleBounds, {}, 'rectangleBounds');
Map.setCenter(-122.085, 37.422, 15);
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-25(UTC)
[null,null,["최종 업데이트: 2025-07-25(UTC)"],[[["\u003cp\u003eDefines a rectangular polygon geometry in Earth Engine.\u003c/p\u003e\n"],["\u003cp\u003eAccepts coordinates as GeoJSON points, Earth Engine points, or bounding numbers.\u003c/p\u003e\n"],["\u003cp\u003eAllows specifying projection, geodesic nature, and polygon interior rules.\u003c/p\u003e\n"],["\u003cp\u003eProvides a convenient way to create EPSG:4326 polygons with four coordinates directly.\u003c/p\u003e\n"]]],[],null,["# ee.Geometry.Rectangle\n\n\u003cbr /\u003e\n\nConstructs an ee.Geometry describing a rectangular polygon.\n\n\u003cbr /\u003e\n\nFor 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).\n\n| Usage | Returns |\n|------------------------------------------------------------------------|--------------------|\n| `ee.Geometry.Rectangle(coords, `*proj* `, `*geodesic* `, `*evenOdd*`)` | Geometry.Rectangle |\n\n| Argument | Type | Details |\n|------------|----------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `coords` | List\\\u003cGeometry\\\u003e\\|List\\\u003cList\\\u003cNumber\\\u003e\\\u003e\\|List\\\u003cNumber\\\u003e | 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. |\n| `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. |\n| `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. |\n| `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. |\n\nExamples\n--------\n\n### Code Editor (JavaScript)\n\n```javascript\n// Coordinates for the bounds of a rectangle.\nvar xMin = -122.09;\nvar yMin = 37.42;\nvar xMax = -122.08;\nvar yMax = 37.43;\n\n// Construct a rectangle from a list of GeoJSON 'point' formatted coordinates.\nvar rectangleGeoJSON = ee.Geometry.Rectangle(\n [\n [xMin, yMin],\n [xMax, yMax] // max x and y\n ]\n);\nMap.addLayer(rectangleGeoJSON, {}, 'rectangleGeoJSON');\n\n// Construct a rectangle from a list of ee.Geometry.Point objects.\nvar rectanglePoint = ee.Geometry.Rectangle(\n [\n ee.Geometry.Point(xMin, yMin), // min x and y\n ee.Geometry.Point(xMax, yMax) // max x and y\n ]\n);\nMap.addLayer(rectanglePoint, {}, 'rectanglePoint');\n\n// Construct a rectangle from a list of bounding coordinates.\nvar rectangleBounds = ee.Geometry.Rectangle(\n [xMin, yMin, xMax, yMax]\n);\nMap.addLayer(rectangleBounds, {}, 'rectangleBounds');\n\nMap.setCenter(-122.085, 37.422, 15);\n```"]]