eemont.feature.PointFromQuery¶
- eemont.feature.PointFromQuery(query, geocoder='nominatim', **kwargs)[source]¶
Constructs an ee.Feature describing a point from a query submitted to a geodocer using the geopy package. This returns exactly one pair of coordinates. The properties of the feature correspond to the raw properties retrieved by the location of the query.
Tip
Check more info about constructors in the User Guide.
- Parameters
query (str) – Address, query or structured query to geocode.
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
Feature with a geometry describing a point from the specified query.
- Return type
ee.Feature
See also
BBoxFromQuery
Constructs an ee.Feature describing a bounding box from a query submitted to a geodocer using the geopy package.
Examples
>>> import ee, eemont >>> ee.Authenticate() >>> ee.Initialize() >>> ee.Feature.PointFromQuery('Mt. Rainier, USA',user_agent = 'my-gee-eemont-query').getInfo() {'type': 'Feature', 'geometry': {'type': 'Point', 'coordinates': [-121.757682, 46.8521484]}, 'properties': {'boundingbox': ['46.8520984', '46.8521984', '-121.757732', '-121.757632'], 'class': 'natural', 'display_name': 'Mount Rainier, Pierce County, Washington, United States', 'importance': 0.5853390667167165, 'lat': '46.8521484', 'licence': 'Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright', 'lon': '-121.757682', 'osm_id': 1744903493, 'osm_type': 'node', 'place_id': 17287419, 'type': 'volcano'}}