MCPcopy
hub / github.com/google/earthengine-api / Point

Method Point

python/ee/geometry.py:185–212  ·  view source on GitHub ↗

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
  )

Source from the content-addressed store, hash-verified

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

Calls 3

GeometryClass · 0.85
_parseArgsMethod · 0.80
_GetArgsMethod · 0.80