Skip to content

WfsComponentRelation

Namespace: ThinkGeo.Core

Describes how the records of a composite WFS feature type are related to the components their geometry belongs to.

public class WfsComponentRelation

Inheritance object → WfsComponentRelation

Remarks:

A composite type keeps the id and the attributes of a record on the record, and the geometry on objects of another type, related to it by references. Nothing about the relation is guessed: the schema of a service can declare many references, and only the ones named here supply geometry.

Name both directions where the schema has both, as ATKIS does. The records inside an extent are found through the components, which is quick when each component names its record; and a record is completed with all of its parts, which is quick when it names them. With only one direction named, the other is a search on the service for the references that point back, and a service may not index those: the Bayern ATKIS service takes some fifteen seconds for each.

Properties

ComponentTypeNames

Gets the feature types the geometry belongs to, as the service's capabilities name them - adv:AX_Strassenachse and adv:AX_Fahrbahnachse for an ATKIS road.

public Collection<string> ComponentTypeNames { get; }

Property Value

Collection<string>

Remarks:

A record's components can be of several types, and a reference does not say which type it points at. Each type is searched in turn, and a component none of them returns is reported as unresolved. The reference properties and the key are the same for every type.

A type can also be named by its namespace URI and local name, {http://www.adv-online.de/namespaces/adv/gid/7.1}AX_Strassenachse, which does not depend on the prefix the service uses; see WfsV2AsyncFeatureSource.TypeName. The reference properties are given without a prefix and take the prefix of the type they belong to, so nothing in a relation depends on one.

ParentReferenceProperty

Gets or sets the property of a component that names the record it belongs to, without a prefix - istTeilVon in ATKIS. Null when components do not name their record.

public string ParentReferenceProperty { get; set; }

Property Value

string

Remarks:

It may repeat: a component naming several records belongs to each of them.

ComponentReferenceProperty

Gets or sets the property of a record that names its components, without a prefix - bestehtAus in ATKIS. Null when records do not name their components.

public string ComponentReferenceProperty { get; set; }

Property Value

string

Remarks:

It repeats, once for each component. Where it is named, a component the record names and the service does not return is reported through WfsV2CompositeAsyncFeatureSource.ComponentsUnresolved.

ReferenceKey

Gets or sets what the value of a reference is compared with on the feature it points at. The default is WfsReferenceKey.Identifier.

public WfsReferenceKey ReferenceKey { get; set; }

Property Value

WfsReferenceKey

ReferenceIdPrefix

Gets or sets the text a reference puts in front of the id it points at, when WfsComponentRelation.ReferenceKey is WfsReferenceKey.Id - urn:adv:oid: in an AAA schema. Null or empty when a reference holds the id itself.

public string ReferenceIdPrefix { get; set; }

Property Value

string

Remarks:

A feature is fetched by its id with a ResourceId filter, which a service answers from its primary key; comparing a published identifier can be many times slower. Where references hold an id behind a fixed prefix, naming the prefix here lets them be followed by id.

ReferenceKeyColumn

Gets or sets the column compared with when WfsComponentRelation.ReferenceKey is WfsReferenceKey.Column. Both the records and the components must carry it.

public string ReferenceKeyColumn { get; set; }

Property Value

string

ComponentGeometryProperty

Gets or sets the geometry property of the components to compose, without a prefix - position in ATKIS. Null, the default, takes the one each component type's schema declares.

public string ComponentGeometryProperty { get; set; }

Property Value

string

Remarks:

Only a type with more than one geometry property needs it. Every component type must have a geometry property of this name, or the source fails to open. The search over an extent tests this property too: it goes to the service as a fes:BBOX filter naming it, where a BBOX parameter would test whichever the service takes for the type's own.

Constructors

WfsComponentRelation()

Initializes a new instance of the WfsComponentRelation class.

public WfsComponentRelation()

WfsComponentRelation(string, string, string)

Initializes a new instance of the WfsComponentRelation class.

public WfsComponentRelation(string componentTypeName, string parentReferenceProperty, string componentReferenceProperty)

Parameters

componentTypeName string
A feature type the geometry belongs to, as the service names it. Add any others to .

parentReferenceProperty string
The property of a component that names its record, or null.

componentReferenceProperty string
The property of a record that names its components, or null.