WfsClient class

A class that manages connections to an OGC Web Mapping Feature Service (WFS)

Constructors

WfsClient(WfsServiceOptions)

A class for connecting to a OGC Web Feature Services (WFS). May require CORs or a proxy via transformRequest.

Methods

describeFeatureTypes(string | string[])

Retrieves details about one or more feature types. The order of the results may not align with input.

getCapabilities()

Requests service metadata, which contains a description of the server’s information, content, and acceptable request parameter values.

getFeatureCount(WfsFeatureRequest)

Retrieves the number of features that match the query. Sets the WFS resultType parameter to "hits"

getFeatureInfo(WfsFeatureRequest)

Queries features from the service and returns a raw JSON response. This may not include geometery information depending on filter parameters. Sets the WFS resultType parameter to "results".

getFeatures(WfsFeatureRequest)

Queries features from the service and returns a GeoJSON FeatureCollection. Sets the WFS resultType parameter to "results". If geometry details are filtered out, null will be returned.

Constructor Details

WfsClient(WfsServiceOptions)

A class for connecting to a OGC Web Feature Services (WFS). May require CORs or a proxy via transformRequest.

new WfsClient(options: WfsServiceOptions)

Parameters

options
WfsServiceOptions

Options that define how to connect to a WFS service.

Method Details

describeFeatureTypes(string | string[])

Retrieves details about one or more feature types. The order of the results may not align with input.

function describeFeatureTypes(featureTypeNames: string | string[]): Promise<WfsFeatureTypeDescription[]>

Parameters

featureTypeNames

string | string[]

One or more feature type names to retrieve details for.

Returns

getCapabilities()

Requests service metadata, which contains a description of the server’s information, content, and acceptable request parameter values.

function getCapabilities(): Promise<WfsCapabilities>

Returns

Promise<WfsCapabilities>

getFeatureCount(WfsFeatureRequest)

Retrieves the number of features that match the query. Sets the WFS resultType parameter to "hits"

function getFeatureCount(request: WfsFeatureRequest): Promise<number>

Parameters

Returns

Promise<number>

getFeatureInfo(WfsFeatureRequest)

Queries features from the service and returns a raw JSON response. This may not include geometery information depending on filter parameters. Sets the WFS resultType parameter to "results".

function getFeatureInfo(request: WfsFeatureRequest): Promise<Record<string, any>>

Parameters

request
WfsFeatureRequest

The request details for the WFS service.

Returns

Promise<Record<string, any>>

getFeatures(WfsFeatureRequest)

Queries features from the service and returns a GeoJSON FeatureCollection. Sets the WFS resultType parameter to "results". If geometry details are filtered out, null will be returned.

function getFeatures(request: WfsFeatureRequest): Promise<azmaps.data.FeatureCollection>

Parameters

request
WfsFeatureRequest

The request details for the WFS service.

Returns

Promise<azmaps.data.FeatureCollection>