Skip to content

FeaturePage

Namespace: ThinkGeo.Core

One page of features from a service, together with what the service said about the rest.

public sealed class FeaturePage

Inheritance object → FeaturePage

Remarks:

Paging is expressed with a continuation token rather than a start index because the two families of service disagree on how to page. WFS uses STARTINDEX and COUNT, so any page can be requested directly; OGC API - Features hands back a next link and can only be walked forwards. A token covers both: a WFS source encodes the next start index in it, an OGC API source puts the next link in it, and the caller only ever has to ask whether there is one.

Properties

Features

Gets the features in this page.

public Collection<Feature> Features { get; }

Property Value

Collection<Feature>

NumberMatched

Gets the total number of features matching the query, across every page.

public long NumberMatched { get; }

Property Value

long

Remarks:

This is -1 when the service did not report a total. WFS 2.0 always reports it as numberMatched on the response, so it costs nothing there; in OGC API - Features the equivalent field is optional and a server is allowed to omit it when counting would be expensive.

NextToken

Gets the token that fetches the following page, or null when this page is the last.

public string NextToken { get; }

Property Value

string

Remarks:

Treat it as opaque; only the source that issued it knows how to read it.

ReferencedFeatures

Gets the objects this page's features reference, keyed by the identifier they are referenced by. Empty unless the service resolved them.

public Dictionary<string, Feature> ReferencedFeatures { get; }

Property Value

Dictionary<string, Feature>

Remarks:

A property that associates one feature with another holds a reference, not a value, and a feature's own geometry or attributes may belong to the objects it references. Where WfsV2AsyncFeatureSource.Resolve asked the service to resolve them the referenced objects arrive in the same response and are collected here, so the value of such a property is the key that reads one back. They are not features of the type that was queried, they are not part of FeaturePage.Features, and the service does not count them in FeaturePage.NumberMatched.

Keyed by the object's gml:identifier where it publishes one, since that is the form a reference to it takes, and by its id otherwise. Nothing is stripped from or added to either: an identifier is compared as the service wrote it.

OGC API - Features has no equivalent, so a page from one of those sources is always empty here.

HasMore

Gets a value indicating whether another page follows this one.

public bool HasMore { get; }

Property Value

bool

Constructors

FeaturePage(Collection<Feature>, long, string)

Initializes a new instance of the FeaturePage class.

public FeaturePage(Collection<Feature> features, long numberMatched, string nextToken)

Parameters

features Collection<Feature>
The features in this page.

numberMatched long
The total number of features matching the query, or -1 when the service did not say.

nextToken string
The token that fetches the following page, or null when this is the last one.

FeaturePage(Collection<Feature>, long, string, Dictionary<string, Feature>)

Initializes a new instance of the FeaturePage class.

public FeaturePage(Collection<Feature> features, long numberMatched, string nextToken, Dictionary<string, Feature> referencedFeatures)

Parameters

features Collection<Feature>
The features in this page.

numberMatched long
The total number of features matching the query, or -1 when the service did not say.

nextToken string
The token that fetches the following page, or null when this is the last one.

referencedFeatures Dictionary<string, Feature>
The objects this page's features reference, keyed by the identifier they are referenced by.