findClosest method
Locates the closest building to a query point.
Returns an error with code NOT_FOUND
if there are no buildings within
approximately 50m of the query point.
Request parameters:
location_latitude
- The latitude in degrees. It must be in the range
[-90.0, +90.0].
location_longitude
- The longitude in degrees. It must be in the range
[-180.0, +180.0].
requiredQuality
- Optional. The minimum quality level allowed in the
results. No result with lower quality than this will be returned. Not
specifying this is equivalent to restricting to HIGH quality only.
Possible string values are:
- "IMAGERY_QUALITY_UNSPECIFIED" : No quality is known.
- "HIGH" : The underlying imagery and DSM data were processed at 0.1 m/pixel.
- "MEDIUM" : The underlying imagery and DSM data were processed at 0.25 m/pixel.
- "LOW" : The underlying imagery and DSM data were processed at 0.5 m/pixel.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a BuildingInsights.
Completes with a commons.ApiRequestError if the API endpoint returned an error.
If the used http.Client
completes with an error when making a REST call,
this method will complete with the same error.
Implementation
async.Future<BuildingInsights> findClosest({
core.double? location_latitude,
core.double? location_longitude,
core.String? requiredQuality,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (location_latitude != null)
'location.latitude': ['${location_latitude}'],
if (location_longitude != null)
'location.longitude': ['${location_longitude}'],
if (requiredQuality != null) 'requiredQuality': [requiredQuality],
if ($fields != null) 'fields': [$fields],
};
const url_ = 'v1/buildingInsights:findClosest';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return BuildingInsights.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}