eemont.geometry.MultiPolygonFromPlusCodes
- eemont.geometry.MultiPolygonFromPlusCodes(pluscodes, geocoder='nominatim', **kwargs)[source]
Constructs an ee.Geometry describing multiple polygons from a list of lists of Plus Codes.
If the Plus Codes are full, they will be decoded directly using the openlocationcode package. If they are short Codes with reference locations, the references will be geocoded using the geopy package.
Tip
Check more info about constructors in the User Guide.
- Parameters
pluscodes (str) – A list of lists of full Plus Codes or short Plus Codes with geocodable reference locations appended to them.
geocoder (str, default = 'nominatim') – Geocoder to use. Please visit https://geopy.readthedocs.io/ for more info.
**kwargs – Keywords arguments for geolocator.geocode(). The user_agent argument is mandatory (this argument can be set as user_agent = ‘my-gee-username’ or user_agent = ‘my-gee-app-name’). Please visit https://geopy.readthedocs.io/ for more info.
- Returns
Geometry describing multiple polygons from the Plus Code centroids.
- Return type
ee.Geometry.MultiPolygon
See also
PointFromPlusCodeConstructs an ee.Geometry describing a point from a Plus Code.
MultiPointFromPlusCodesConstructs an ee.Geometry describing multiple points from a list of Plus Codes.
PolygonFromPlusCodesConstructs an ee.Geometry describing a polygon from a list of Plus Codes.
LineStringFromPlusCodesConstructs an ee.Geometry describing a line from a list of Plus Codes.
MultiLineStringFromPlusCodesConstructs an ee.Geometry describing multiple lines from a list of lists of Plus Codes.
LinearRingFromPlusCodesConstructs an ee.Geometry describing a linear ring from a list of Plus Codes.
RectangleFromPlusCodesConstructs an ee.Geometry describing a rectangle from a list of two Plus Code corners.
Examples
>>> import ee, eemont >>> ee.Authenticate() >>> ee.Initialize() >>> geom = ee.Geometry.MultiPolygonFromPlusCodes([ ... ['85FQ2222+22', '85FR2222+22', '85GR2222+22'], ... ['85FP8PC2+G2', '85FPJF23+G4', '85FPMW2R+RP'] ... ]) >>> geom.coordinates().getInfo() [[[[-104.9999375, 39.0000625], [-103.9999375, 39.0000625], [-103.9999375, 40.0000625], [-104.9999375, 39.0000625]], [[-105.2999375, 39.321312500000005], [-105.5471875, 39.6013125], [-105.0581875, 39.6520625], [-105.2999375, 39.321312500000005]]]]