다음을 통해 공유


Scenes.GetScenesAsync Method

Definition

Returns a paginated list of scene resources.

public virtual Azure.AsyncPageable<BinaryData> GetScenesAsync (string provider, string partyId, string boundaryId, string source, DateTimeOffset? startDateTime = default, DateTimeOffset? endDateTime = default, double? maxCloudCoveragePercentage = default, double? maxDarkPixelCoveragePercentage = default, System.Collections.Generic.IEnumerable<string> imageNames = default, System.Collections.Generic.IEnumerable<double> imageResolutions = default, System.Collections.Generic.IEnumerable<string> imageFormats = default, int? maxPageSize = default, string skipToken = default, Azure.RequestContext context = default);
abstract member GetScenesAsync : string * string * string * string * Nullable<DateTimeOffset> * Nullable<DateTimeOffset> * Nullable<double> * Nullable<double> * seq<string> * seq<double> * seq<string> * Nullable<int> * string * Azure.RequestContext -> Azure.AsyncPageable<BinaryData>
override this.GetScenesAsync : string * string * string * string * Nullable<DateTimeOffset> * Nullable<DateTimeOffset> * Nullable<double> * Nullable<double> * seq<string> * seq<double> * seq<string> * Nullable<int> * string * Azure.RequestContext -> Azure.AsyncPageable<BinaryData>
Public Overridable Function GetScenesAsync (provider As String, partyId As String, boundaryId As String, source As String, Optional startDateTime As Nullable(Of DateTimeOffset) = Nothing, Optional endDateTime As Nullable(Of DateTimeOffset) = Nothing, Optional maxCloudCoveragePercentage As Nullable(Of Double) = Nothing, Optional maxDarkPixelCoveragePercentage As Nullable(Of Double) = Nothing, Optional imageNames As IEnumerable(Of String) = Nothing, Optional imageResolutions As IEnumerable(Of Double) = Nothing, Optional imageFormats As IEnumerable(Of String) = Nothing, Optional maxPageSize As Nullable(Of Integer) = Nothing, Optional skipToken As String = Nothing, Optional context As RequestContext = Nothing) As AsyncPageable(Of BinaryData)

Parameters

provider
String

Provider name of scene data.

partyId
String

PartyId.

boundaryId
String

BoundaryId.

source
String

Source name of scene data, Available Values: Sentinel_2_L2A, Sentinel_2_L1C.

startDateTime
Nullable<DateTimeOffset>

Scene start UTC datetime (inclusive), sample format: yyyy-MM-ddThh:mm:ssZ.

endDateTime
Nullable<DateTimeOffset>

Scene end UTC datetime (inclusive), sample format: yyyy-MM-dThh:mm:ssZ.

maxCloudCoveragePercentage
Nullable<Double>

Filter scenes with cloud coverage percentage less than max value. Range [0 to 100.0].

maxDarkPixelCoveragePercentage
Nullable<Double>

Filter scenes with dark pixel coverage percentage less than max value. Range [0 to 100.0].

imageNames
IEnumerable<String>

List of image names to be filtered.

imageResolutions
IEnumerable<Double>

List of image resolutions in meters to be filtered.

imageFormats
IEnumerable<String>

List of image formats to be filtered.

maxPageSize
Nullable<Int32>

Maximum number of items needed (inclusive). Minimum = 10, Maximum = 1000, Default value = 50.

skipToken
String

Skip token for getting next set of results.

context
RequestContext

The request context, which can override default behaviors of the client pipeline on a per-call basis.

Returns

The AsyncPageable<T> from the service containing a list of BinaryData objects. Details of the body schema for each item in the collection are in the Remarks section below.

Exceptions

provider, partyId, boundaryId or source is null.

Service returned a non-success status code.

Examples

This sample shows how to call GetScenesAsync with required parameters and parse the result.

var credential = new DefaultAzureCredential();
var client = new FarmBeatsClient(credential).GetScenesClient(<2022-11-01-preview>);

await foreach (var data in client.GetScenesAsync("<provider>", "<partyId>", "<boundaryId>", "<source>"))
{
    JsonElement result = JsonDocument.Parse(data.ToStream()).RootElement;
    Console.WriteLine(result.ToString());
}

This sample shows how to call GetScenesAsync with all parameters, and how to parse the result.

var credential = new DefaultAzureCredential();
var client = new FarmBeatsClient(credential).GetScenesClient(<2022-11-01-preview>);

await foreach (var data in client.GetScenesAsync("<provider>", "<partyId>", "<boundaryId>", "<source>", DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, 1234, new String[]{"<imageNames>"}, new Double[]{1234}, new String[]{"<imageFormats>"}, 1234, "<skipToken>"))
{
    JsonElement result = JsonDocument.Parse(data.ToStream()).RootElement;
    Console.WriteLine(result.GetProperty("sceneDateTime").ToString());
    Console.WriteLine(result.GetProperty("provider").ToString());
    Console.WriteLine(result.GetProperty("source").ToString());
    Console.WriteLine(result.GetProperty("imageFiles")[0].GetProperty("fileLink").ToString());
    Console.WriteLine(result.GetProperty("imageFiles")[0].GetProperty("name").ToString());
    Console.WriteLine(result.GetProperty("imageFiles")[0].GetProperty("imageFormat").ToString());
    Console.WriteLine(result.GetProperty("imageFiles")[0].GetProperty("resolution").ToString());
    Console.WriteLine(result.GetProperty("imageFormat").ToString());
    Console.WriteLine(result.GetProperty("cloudCoverPercentage").ToString());
    Console.WriteLine(result.GetProperty("darkPixelPercentage").ToString());
    Console.WriteLine(result.GetProperty("ndviMedianValue").ToString());
    Console.WriteLine(result.GetProperty("boundaryId").ToString());
    Console.WriteLine(result.GetProperty("partyId").ToString());
    Console.WriteLine(result.GetProperty("id").ToString());
    Console.WriteLine(result.GetProperty("eTag").ToString());
}

Remarks

Below is the JSON schema for one item in the pageable response.

Response Body:

Schema for SceneListResponseValue:

{
  sceneDateTime: string (ISO 8601 Format), # Optional. Date-time of the scene, sample format: yyyy-MM-ddTHH:mm:ssZ.
  provider: string, # Optional. Data provider of the scene.
  source: string, # Optional. Data source of the scene.
  imageFiles: [
    {
      fileLink: string, # Optional. Link of the image file.
      name: string, # Required. Name of the image file.
      imageFormat: "TIF", # Optional. ImageFormat. Available value: TIF.
      resolution: number, # Optional. Resolution of image file in meters.
    }
  ], # Optional. Collection of image files.
  imageFormat: "TIF", # Optional. ImageFormat. Available value: TIF.
  cloudCoverPercentage: number, # Optional. Cloud cover percentage of the scene.
  darkPixelPercentage: number, # Optional. Dark pixel percentage of the scene.
  ndviMedianValue: number, # Optional. Median of NDVI of the scene.
  boundaryId: string, # Optional. Boundary ID which belongs to the scene.
  partyId: string, # Optional. Party ID which belongs to the scene.
  id: string, # Optional. Unique scene resource ID.
  eTag: string, # Optional. The ETag value to implement optimistic concurrency.
}

Applies to