Table of Contents

Class HonuaOgcFeaturesClient

Namespace
Honua.Sdk.OgcFeatures
Assembly
Honua.Sdk.OgcFeatures.dll

HTTP client implementation for the Honua OGC API Features read/query API.

public sealed class HonuaOgcFeaturesClient : IHonuaOgcFeaturesClient, IHonuaOgcFeaturesEditClient, IHonuaOgcFeaturesPatchClient, IHonuaFeatureQueryClient, IHonuaFeatureEditClient, IHonuaFeatureDescriptorClient, IHonuaFeatureAttachmentClient
Inheritance
HonuaOgcFeaturesClient
Implements
Inherited Members
Extension Methods

Constructors

HonuaOgcFeaturesClient(HttpClient)

Initializes a new instance of the HonuaOgcFeaturesClient class.

public HonuaOgcFeaturesClient(HttpClient httpClient)

Parameters

httpClient HttpClient

The HTTP client configured with base address and auth handlers.

Properties

AttachmentCapabilities

Provider attachment capabilities exposed by this client.

public FeatureAttachmentCapabilities AttachmentCapabilities { get; }

Property Value

FeatureAttachmentCapabilities

EditCapabilities

Provider edit capabilities exposed by this client.

public FeatureEditCapabilities EditCapabilities { get; }

Property Value

FeatureEditCapabilities

ProviderName

Provider name for diagnostics and provider selection.

public string ProviderName { get; }

Property Value

string

QueryCapabilities

Provider query capabilities exposed by this client. A geoprocessing tool inspects these flags (for example SupportsTimeFilter or SupportsHaving) to pick a provider that supports a temporal or grouped-statistics query instead of catching a runtime NotSupportedException. The default implementation reports every facet as unsupported so providers must opt in explicitly.

public FeatureQueryCapabilities QueryCapabilities { get; }

Property Value

FeatureQueryCapabilities

Methods

AddAttachmentAsync(FeatureAttachmentAddRequest, CancellationToken)

Adds an attachment to one feature.

public Task<FeatureAttachmentResult> AddAttachmentAsync(FeatureAttachmentAddRequest request, CancellationToken cancellationToken = default)

Parameters

request FeatureAttachmentAddRequest

Provider-neutral attachment add request.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<FeatureAttachmentResult>

Attachment operation result.

ApplyEditsAsync(FeatureEditRequest, CancellationToken)

Applies add, update, and delete feature edits.

public Task<FeatureEditResponse> ApplyEditsAsync(FeatureEditRequest request, CancellationToken cancellationToken = default)

Parameters

request FeatureEditRequest

Provider-neutral edit request.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<FeatureEditResponse>

Provider-neutral edit response.

CreateItemAsync(string, OgcFeature, CancellationToken)

Creates a feature in a collection with the OGC API Features items endpoint.

public Task<OgcFeature> CreateItemAsync(string collectionId, OgcFeature feature, CancellationToken cancellationToken = default)

Parameters

collectionId string

The collection identifier.

feature OgcFeature

GeoJSON feature to create.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<OgcFeature>

The created feature representation returned by the server.

DeleteAttachmentAsync(FeatureAttachmentDeleteRequest, CancellationToken)

Deletes one attachment.

public Task<FeatureAttachmentResult> DeleteAttachmentAsync(FeatureAttachmentDeleteRequest request, CancellationToken cancellationToken = default)

Parameters

request FeatureAttachmentDeleteRequest

Provider-neutral attachment delete request.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<FeatureAttachmentResult>

Attachment operation result.

DeleteItemAsync(string, string, CancellationToken)

Deletes a feature from a collection with the OGC API Features item endpoint.

public Task DeleteItemAsync(string collectionId, string featureId, CancellationToken cancellationToken = default)

Parameters

collectionId string

The collection identifier.

featureId string

The feature identifier.

cancellationToken CancellationToken

Cancellation token.

Returns

Task

DownloadAttachmentAsync(FeatureAttachmentDownloadRequest, CancellationToken)

Downloads one attachment.

public Task<FeatureAttachmentContent> DownloadAttachmentAsync(FeatureAttachmentDownloadRequest request, CancellationToken cancellationToken = default)

Parameters

request FeatureAttachmentDownloadRequest

Provider-neutral attachment download request.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<FeatureAttachmentContent>

Downloaded attachment content. Dispose the returned content stream when finished.

GetCollectionAsync(string, CancellationToken)

Gets metadata for a specific collection.

public Task<OgcCollection> GetCollectionAsync(string collectionId, CancellationToken cancellationToken = default)

Parameters

collectionId string

The collection identifier.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<OgcCollection>

Collection metadata including extent, CRS, and links.

GetConformanceAsync(CancellationToken)

Gets the conformance declaration listing supported OGC standards.

public Task<OgcConformance> GetConformanceAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Cancellation token.

Returns

Task<OgcConformance>

The conformance response with URIs of supported conformance classes.

GetDescriptorAsync(SourceDescriptor, CancellationToken)

Retrieves provider-neutral source schema and capability metadata for the supplied source descriptor.

public Task<SourceDescriptor> GetDescriptorAsync(SourceDescriptor descriptor, CancellationToken cancellationToken = default)

Parameters

descriptor SourceDescriptor

Source descriptor containing the provider-specific locator.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<SourceDescriptor>

The source descriptor enriched with discovered schema and capabilities.

GetItemAsync(string, string, CancellationToken)

Gets a single feature by ID from a collection.

public Task<OgcFeature> GetItemAsync(string collectionId, string featureId, CancellationToken cancellationToken = default)

Parameters

collectionId string

The collection identifier.

featureId string

The feature identifier.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<OgcFeature>

The requested GeoJSON feature.

GetItemsAsync(string, OgcItemsParams?, CancellationToken)

Gets a single page of features from a collection.

public Task<OgcFeatureCollection> GetItemsAsync(string collectionId, OgcItemsParams? query = null, CancellationToken cancellationToken = default)

Parameters

collectionId string

The collection identifier.

query OgcItemsParams

Optional query parameters for filtering, paging, and projection.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<OgcFeatureCollection>

A GeoJSON FeatureCollection with features and paging links.

GetItemsPagesAsync(string, OgcItemsParams?, CancellationToken)

Gets features from a collection with automatic paging via IAsyncEnumerable<T>. Follows HATEOAS "next" links for subsequent pages.

public IAsyncEnumerable<OgcFeatureCollection> GetItemsPagesAsync(string collectionId, OgcItemsParams? query = null, CancellationToken cancellationToken = default)

Parameters

collectionId string

The collection identifier.

query OgcItemsParams

Optional query parameters for filtering and projection.

cancellationToken CancellationToken

Cancellation token.

Returns

IAsyncEnumerable<OgcFeatureCollection>

An async enumerable of feature collection pages.

GetItemsRawAsync(string, OgcItemsParams?, CancellationToken)

Gets features in a raw HTTP response for non-JSON formats (GML, CSV, HTML, Parquet, Arrow); the caller owns response disposal.

public Task<HttpResponseMessage> GetItemsRawAsync(string collectionId, OgcItemsParams? query = null, CancellationToken cancellationToken = default)

Parameters

collectionId string
query OgcItemsParams
cancellationToken CancellationToken

Returns

Task<HttpResponseMessage>

GetItemsStreamAsync(string, OgcFeaturesFormat, CancellationToken)

Gets features as a status- and content-type-validated raw stream for the requested format (such as Parquet or Arrow); decoding is left to the caller and the returned stream owns response disposal.

public Task<Stream> GetItemsStreamAsync(string collectionId, OgcFeaturesFormat format, CancellationToken cancellationToken = default)

Parameters

collectionId string
format OgcFeaturesFormat
cancellationToken CancellationToken

Returns

Task<Stream>

GetItemsStreamAsync(string, OgcItemsParams?, CancellationToken)

Gets features as a status- and content-type-validated raw stream using query parameters (including columnar formats such as Parquet or Arrow); decoding is left to the caller and the returned stream owns response disposal.

public Task<Stream> GetItemsStreamAsync(string collectionId, OgcItemsParams? query = null, CancellationToken cancellationToken = default)

Parameters

collectionId string
query OgcItemsParams
cancellationToken CancellationToken

Returns

Task<Stream>

GetItemsVectorAsync(string, OgcItemsParams?, VectorPayloadFormat?, CancellationToken)

public Task<VectorPayloadFeatureSet> GetItemsVectorAsync(string collectionId, OgcItemsParams? query = null, VectorPayloadFormat? format = null, CancellationToken cancellationToken = default)

Parameters

collectionId string
query OgcItemsParams
format VectorPayloadFormat?
cancellationToken CancellationToken

Returns

Task<VectorPayloadFeatureSet>

GetLandingPageAsync(CancellationToken)

Gets the OGC API landing page with service metadata and navigation links.

public Task<OgcLandingPage> GetLandingPageAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Cancellation token.

Returns

Task<OgcLandingPage>

The landing page response.

GetQueryablesAsync(string, CancellationToken)

Gets the queryable properties for a collection (JSON Schema).

public Task<OgcQueryables> GetQueryablesAsync(string collectionId, CancellationToken cancellationToken = default)

Parameters

collectionId string

The collection identifier.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<OgcQueryables>

Queryable properties as a JSON Schema object.

ListAttachmentsAsync(FeatureAttachmentListRequest, CancellationToken)

Lists attachments for one feature.

public Task<IReadOnlyList<FeatureAttachmentInfo>> ListAttachmentsAsync(FeatureAttachmentListRequest request, CancellationToken cancellationToken = default)

Parameters

request FeatureAttachmentListRequest

Provider-neutral attachment list request.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<IReadOnlyList<FeatureAttachmentInfo>>

Attachment metadata.

ListCollectionsAsync(CancellationToken)

Lists all available feature collections.

public Task<IReadOnlyList<OgcCollection>> ListCollectionsAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Cancellation token.

Returns

Task<IReadOnlyList<OgcCollection>>

A list of collections with metadata.

PatchItemAsync(string, string, JsonElement, CancellationToken)

Applies an RFC 7396 JSON Merge Patch payload to a feature in a collection.

public Task<OgcFeature> PatchItemAsync(string collectionId, string featureId, JsonElement patch, CancellationToken cancellationToken = default)

Parameters

collectionId string

The collection identifier.

featureId string

The feature identifier.

patch JsonElement

JSON Merge Patch payload.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<OgcFeature>

The patched feature representation returned by the server.

QueryAsync(FeatureQueryRequest, CancellationToken)

Executes a feature query and returns a single result page.

public Task<FeatureQueryResult> QueryAsync(FeatureQueryRequest request, CancellationToken cancellationToken = default)

Parameters

request FeatureQueryRequest

Provider-neutral query request.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<FeatureQueryResult>

A provider-neutral result page.

QueryPagesAsync(FeatureQueryRequest, CancellationToken)

Executes a feature query and returns provider-neutral result pages.

public IAsyncEnumerable<FeatureQueryResult> QueryPagesAsync(FeatureQueryRequest request, CancellationToken cancellationToken = default)

Parameters

request FeatureQueryRequest

Provider-neutral query request.

cancellationToken CancellationToken

Cancellation token.

Returns

IAsyncEnumerable<FeatureQueryResult>

Provider-neutral result pages.

UpdateAttachmentAsync(FeatureAttachmentUpdateRequest, CancellationToken)

Updates one attachment.

public Task<FeatureAttachmentResult> UpdateAttachmentAsync(FeatureAttachmentUpdateRequest request, CancellationToken cancellationToken = default)

Parameters

request FeatureAttachmentUpdateRequest

Provider-neutral attachment update request.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<FeatureAttachmentResult>

Attachment operation result.

UpdateItemAsync(string, string, OgcFeature, CancellationToken)

Updates or replaces a feature in a collection with the OGC API Features item endpoint.

public Task<OgcFeature> UpdateItemAsync(string collectionId, string featureId, OgcFeature feature, CancellationToken cancellationToken = default)

Parameters

collectionId string

The collection identifier.

featureId string

The feature identifier.

feature OgcFeature

GeoJSON feature payload.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<OgcFeature>

The updated feature representation returned by the server.