Table of Contents

Class HonuaGeocodingClient

Namespace
Honua.Sdk.Admin.Geocoding
Assembly
Honua.Sdk.Admin.dll

HTTP client implementation for the Honua Geocoding REST API (GeoServices-compatible).

public sealed class HonuaGeocodingClient : IHonuaBatchGeocodingClient, IHonuaGeocodingClient
Inheritance
HonuaGeocodingClient
Implements
Inherited Members

Constructors

HonuaGeocodingClient(HttpClient)

Initializes a new instance of the HonuaGeocodingClient class.

public HonuaGeocodingClient(HttpClient httpClient)

Parameters

httpClient HttpClient

The HTTP client configured with base address and auth handlers.

HonuaGeocodingClient(HttpClient, string)

Initializes a new instance of the HonuaGeocodingClient class with a custom locator name.

public HonuaGeocodingClient(HttpClient httpClient, string locatorName)

Parameters

httpClient HttpClient

The HTTP client configured with base address and auth handlers.

locatorName string

The geocode locator name. Defaults to "World".

Methods

BatchGeocodeAsync(IReadOnlyList<string>, BatchGeocodeOptions?, CancellationToken)

Geocodes multiple addresses in a single request.

public Task<IReadOnlyList<GeocodeResult>> BatchGeocodeAsync(IReadOnlyList<string> addresses, BatchGeocodeOptions? options = null, CancellationToken cancellationToken = default)

Parameters

addresses IReadOnlyList<string>

The list of addresses to geocode.

options BatchGeocodeOptions

Optional parameters to control the batch geocoding request.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<IReadOnlyList<GeocodeResult>>

A list of matched geocode results.

BatchGeocodeDetailedAsync(IReadOnlyList<string>, BatchGeocodeOptions?, CancellationToken)

Geocodes multiple addresses and returns one result envelope for each input address.

public Task<IReadOnlyList<BatchGeocodeResult>> BatchGeocodeDetailedAsync(IReadOnlyList<string> addresses, BatchGeocodeOptions? options = null, CancellationToken cancellationToken = default)

Parameters

addresses IReadOnlyList<string>

The list of addresses to geocode.

options BatchGeocodeOptions

Optional parameters to control the batch geocoding request.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<IReadOnlyList<BatchGeocodeResult>>

Batch geocode results keyed to the original input order.

ForwardGeocodeAsync(string, ForwardGeocodeOptions?, CancellationToken)

Geocodes an address string into one or more candidate locations.

public Task<IReadOnlyList<GeocodeResult>> ForwardGeocodeAsync(string address, ForwardGeocodeOptions? options = null, CancellationToken cancellationToken = default)

Parameters

address string

The address or place name to geocode.

options ForwardGeocodeOptions

Optional parameters to control the geocoding request.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<IReadOnlyList<GeocodeResult>>

A list of geocode results ordered by score descending.

ReverseGeocodeAsync(double, double, ReverseGeocodeOptions?, CancellationToken)

Reverse geocodes a latitude/longitude pair into a street address.

public Task<ReverseGeocodeResult?> ReverseGeocodeAsync(double latitude, double longitude, ReverseGeocodeOptions? options = null, CancellationToken cancellationToken = default)

Parameters

latitude double

The latitude (Y coordinate) of the location.

longitude double

The longitude (X coordinate) of the location.

options ReverseGeocodeOptions

Optional parameters to control the reverse geocoding request.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<ReverseGeocodeResult>

A reverse geocode result, or null if no address was found.

SuggestAsync(string, SuggestOptions?, CancellationToken)

Returns autocomplete suggestions for a partial address or place name.

public Task<IReadOnlyList<GeocodeSuggestion>> SuggestAsync(string text, SuggestOptions? options = null, CancellationToken cancellationToken = default)

Parameters

text string

The partial text to get suggestions for.

options SuggestOptions

Optional parameters to control the suggest request.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<IReadOnlyList<GeocodeSuggestion>>

A list of suggestions.