Constructs an ee.Geometry describing a point. Args: coords: A list of two [x,y] coordinates in the given projection. proj: The projection of this geometry, or EPSG:4326 if unspecified. *args: For convenience, varargs may be used when all arguments are numbers. This all
(
coords=_UNSPECIFIED, proj=_UNSPECIFIED, *args, **kwargs
)
| 183 | @staticmethod |
| 184 | # pylint: disable-next=keyword-arg-before-vararg |
| 185 | def Point( |
| 186 | coords=_UNSPECIFIED, proj=_UNSPECIFIED, *args, **kwargs |
| 187 | ) -> Geometry: |
| 188 | """Constructs an ee.Geometry describing a point. |
| 189 | |
| 190 | Args: |
| 191 | coords: A list of two [x,y] coordinates in the given projection. |
| 192 | proj: The projection of this geometry, or EPSG:4326 if unspecified. |
| 193 | *args: For convenience, varargs may be used when all arguments are |
| 194 | numbers. This allows creating EPSG:4326 points, e.g., |
| 195 | ee.Geometry.Point(lng, lat). |
| 196 | **kwargs: Keyword args that accept "lon" and "lat" for backward- |
| 197 | compatibility. |
| 198 | |
| 199 | Returns: |
| 200 | An ee.Geometry describing a point. |
| 201 | """ |
| 202 | init = Geometry._parseArgs( |
| 203 | 'Point', |
| 204 | 1, |
| 205 | Geometry._GetArgs((coords, proj) + args, ('lon', 'lat'), **kwargs), |
| 206 | ) |
| 207 | if not isinstance(init, computedobject.ComputedObject): |
| 208 | xy = init['coordinates'] |
| 209 | if not isinstance(xy, (list, tuple)) or len(xy) != 2: |
| 210 | raise ee_exception.EEException( |
| 211 | 'The Geometry.Point constructor requires 2 coordinates.') |
| 212 | return Geometry(init) |
| 213 | |
| 214 | @staticmethod |
| 215 | # pylint: disable-next=keyword-arg-before-vararg |