get method
Gets solar information for a region surrounding a location.
Returns an error with code NOT_FOUND
if the location is outside the
coverage area.
Request parameters:
exactQualityRequired
- Optional. Whether to require exact quality of the
imagery. If set to false, the required_quality
field is interpreted as
the minimum required quality, such that HIGH quality imagery may be
returned when required_quality
is set to MEDIUM. If set to true,
required_quality
is interpreted as the exact required quality and only
MEDIUM
quality imagery is returned if required_quality
is set to
MEDIUM
.
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].
pixelSizeMeters
- Optional. The minimum scale, in meters per pixel, of
the data to return. Values of 0.1 (the default, if this field is not set
explicitly), 0.25, 0.5, and 1.0 are supported. Imagery components whose
normal resolution is less than pixel_size_meters
will be returned at the
resolution specified by pixel_size_meters
; imagery components whose
normal resolution is equal to or greater than pixel_size_meters
will be
returned at that normal resolution.
radiusMeters
- Required. The radius, in meters, defining the region
surrounding that centre point for which data should be returned. The
limitations on this value are: * Any value up to 100m can always be
specified. * Values over 100m can be specified, as long as radius_meters
<= pixel_size_meters * 1000
. * However, for values over 175m, the
DataLayerView
in the request must not include monthly flux or hourly
shade.
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.
view
- Optional. The desired subset of the data to return.
Possible string values are:
- "DATA_LAYER_VIEW_UNSPECIFIED" : Equivalent to FULL.
- "DSM_LAYER" : Get the DSM only.
- "IMAGERY_LAYERS" : Get the DSM, RGB, and mask.
- "IMAGERY_AND_ANNUAL_FLUX_LAYERS" : Get the DSM, RGB, mask, and annual flux.
- "IMAGERY_AND_ALL_FLUX_LAYERS" : Get the DSM, RGB, mask, annual flux, and monthly flux.
- "FULL_LAYERS" : Get all data.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a DataLayers.
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<DataLayers> get({
core.bool? exactQualityRequired,
core.double? location_latitude,
core.double? location_longitude,
core.double? pixelSizeMeters,
core.double? radiusMeters,
core.String? requiredQuality,
core.String? view,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (exactQualityRequired != null)
'exactQualityRequired': ['${exactQualityRequired}'],
if (location_latitude != null)
'location.latitude': ['${location_latitude}'],
if (location_longitude != null)
'location.longitude': ['${location_longitude}'],
if (pixelSizeMeters != null) 'pixelSizeMeters': ['${pixelSizeMeters}'],
if (radiusMeters != null) 'radiusMeters': ['${radiusMeters}'],
if (requiredQuality != null) 'requiredQuality': [requiredQuality],
if (view != null) 'view': [view],
if ($fields != null) 'fields': [$fields],
};
const url_ = 'v1/dataLayers:get';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return DataLayers.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}