eemont.feature.BBoxFromQuery

eemont.feature.BBoxFromQuery(query, geocoder='nominatim', **kwargs)[source]

Constructs an ee.Feature describing a bounding box from a query submitted to a geodocer using the geopy package. 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. One of ‘nominatim’ or ‘arcgis’. 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 bounding box from the specified query.

Return type

ee.Feature

See also

PointFromQuery

Constructs an ee.Feature describing a point from a query submitted to a geodocer using the geopy package.

Examples

>>> import ee, eemont
>>> ee.Authenticate()
>>> ee.Initialize()
>>> ee.Feature.BBoxFromQuery('Bogotá',user_agent = 'my-gee-eemont-query').getInfo()
{'type': 'Feature',
 'geometry': {'geodesic': False,
  'type': 'Polygon',
  'coordinates': [[[-74.22351370000001, 4.4711754],
    [-74.0102483, 4.4711754],
    [-74.0102483, 4.8331695],
    [-74.22351370000001, 4.8331695],
    [-74.22351370000001, 4.4711754]]]},
 'properties': {'boundingbox': ['4.4711754',
   '4.8331695',
   '-74.2235137',
   '-74.0102483'],
  'class': 'boundary',
  'display_name': 'Bogotá, Bogotá Distrito Capital, Región Andina, 11001, Colombia',
  'icon': 'https://nominatim.openstreetmap.org/ui/mapicons//poi_boundary_administrative.p.20.png',
  'importance': 0.7931743429157826,
  'lat': '4.6533326',
  'licence': 'Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright',
  'lon': '-74.083652',
  'osm_id': 7426387,
  'osm_type': 'relation',
  'place_id': 259216862,
  'type': 'administrative'}}