WFS composite features: resolved ATKIS geometry and spatial query limitations

Hi ThinkGeo team,

We need to display and query adv:AX_Strasse from the public
Bayern ATKIS WFS.
It is a composite object: the street’s id and attributes belong to AX_Strasse,
while its geometry belongs to the objects referenced by bestehtAus.

Live response evidence (2026-10-09). Compare these two requests:

The first response has numberReturned="1", numberMatched="unknown", and
AX_Strasse id DEBYBDLMFV00000G, with bezeichnung=ST2179, widmung=1305
and seven bestehtAus references, but no geometry. The second response keeps that
same parent and adds seven AX_Strassenachse objects under
wfs:additionalObjects/wfs:SimpleFeatureCollection/wfs:member. Each has a
gml:LineString in EPSG:25832. All seven gml:id values match the parent’s
urn:adv:oid:... references. numberReturned still counts only the one parent.
The service advertises support for resolve=local in GetCapabilities.

Spatial requests fail at the service. The user also sees this exception when
connecting the layer:

InvalidParameterValue: at FILTER: Request rejected due to errors.
InternalExceptionCode: iiOperationParsingFailed.
The PropertyName "adv:position" (for FeatureType adv:AX_Strasse) is in step
"adv:position" not compliant with the Application schema (GML 3.2.1).

This is reproducible without the SDK and without an explicit FILTER or
PROPERTYNAME parameter:

curl --get 'https://geoservices.bayern.de/wfs/v1/ogc_atkis_basisdlm.cgi' \
  --data-urlencode 'SERVICE=WFS' \
  --data-urlencode 'VERSION=2.0.0' \
  --data-urlencode 'REQUEST=GetFeature' \
  --data-urlencode 'TYPENAMES=adv:AX_Strasse' \
  --data-urlencode 'NAMESPACES=xmlns(adv,http://www.adv-online.de/namespaces/adv/gid/7.1)' \
  --data-urlencode 'BBOX=725800,5566300,726300,5567200,urn:ogc:def:crs:EPSG::25832' \
  --data-urlencode 'COUNT=1'

Live checks on 2026-10-09:

Type / extra parameters Response
adv:AX_Strasse, BBOX above HTTP 200 OWS exception with the exact error above
adv:AX_Strasse, same BBOX plus RESOLVE=local&RESOLVEDEPTH=1 Same exception
adv:AX_Strassenachse, same BBOX One feature with a LineString

The installed SDK’s spatial request builder sends BBOX=...; it does not insert
adv:position into a spatial FILTER. The field name in this error originates
from the service’s handling of BBOX. Propagating the service error is correct.
AGK’s metadata connection and sampled preview do not request a BBOX; rendering
and spatial selection do. Without the user’s call stack, the exact UI trigger
is not established, but the service failure is independently reproduced.

Installed SDK inspection. In ThinkGeo.Core.dll version 15.0.0-beta208,
WfsV2AsyncFeatureSource.GetFeaturesAsync searches wfs:member descendants but
only parses objects whose local name equals the requested TypeName. It therefore
skips the additional AX_Strassenachse objects when requesting AX_Strasse.
The feature parser returns null for the parent because it finds no inline geometry;
it does not follow bestehtAus to the additional objects. Adding RESOLVE=local
to the request alone cannot produce a drawable parent feature through this reader.

The following uses only public SDK APIs to reproduce the read on Windows:

using System;
using System.Threading;
using System.Xml.Linq;
using ThinkGeo.Core;

using var timeout = new CancellationTokenSource(TimeSpan.FromSeconds(30));
var source = new WfsV2AsyncFeatureSource(
    "https://geoservices.bayern.de/wfs/v1/ogc_atkis_basisdlm.cgi", "adv:AX_Strasse")
{
    WfsAxisOrder = WfsAxisOrder.XY
};
try
{
    await source.OpenAsync(timeout.Token);
    string request = source.GetRequestUrl(null, 1, 0)
        + "&RESOLVE=local&RESOLVEDEPTH=1";
    var page = await source.GetFeaturesAsync(request, timeout.Token);
    var response = XDocument.Parse(source.LastXmlResponse);
    Console.WriteLine(response);
    Console.WriteLine($"SDK features: {page.Features.Count}");
}
finally
{
    await source.CloseAsync(CancellationToken.None);
}

Could the SDK support an explicit composite-geometry mapping, or expose resolved
objects and their reference associations for that purpose? For this type we need
the geometry of all bestehtAus components together with the parent’s id
and attributes. Treating the components as independent street records would lose
the keys used by AGK links. Arbitrary references must not automatically become
geometry: the relationship to compose needs to be explicit.

Please cover preview reads, BBOX reads used by classic/GPU rendering, attribute
queries and id lookups. Paging must continue to count top-level parent records,
not the additional component objects. Spatial support also needs a supported
component-based query strategy or a change at the service: simply adding
RESOLVE=local to the existing BBOX request still fails. Please keep the
service-side spatial-query limitation distinct from the SDK’s missing reference
association support.

Hi Julian,

Thanks for the curl comparison — everything you reported checked out. Keeping the two causes apart, as you asked:

The service-side limit. adv:AX_Strasse has no geometry property of its own, so the service rejects a bounding box on it with or without RESOLVE: “The PropertyName “adv:position” (for FeatureType adv:AX_Strasse) is in step “adv:position” not compliant with the Application schema”. Rendering by extent therefore has to query the component type, which works today — in one extent we measured 14 adv:AX_Strassenachse features grouping into 4 streets by istTeilVon. No SDK change can make the parent type answer a bounding box.

What was ours, and is fixed. A reference property read as an empty string, because we read element text and the value is the xlink:href — bestehtAus, istTeilVon and eleven more on that type came back empty. A feature with no inline geometry was dropped whole, id and attributes with it, so the street record itself vanished from the read. And the synchronous WfsV2FeatureSource named every discovered property unprefixed, got ErrorInPropertyName, and read that refusal as “no features”; it now asks the way WFS intends and raises a service exception instead of mistaking it for an empty answer.

Resolved references are exposed. This is the second option you offered — the resolved objects and their associations — rather than us composing the geometry for you:

var source = new WfsV2AsyncFeatureSource(serviceUrl, "adv:AX_Strasse")
{
    Resolve = WfsResolve.Local,   // None by default; also Remote and All
    ResolveDepth = 1
};

await source.OpenAsync(cancellationToken);
var columnNames = (await source.GetColumnsAsync(cancellationToken)).Select(c => c.ColumnName).ToArray();
var page = await source.GetFeaturesPageAsync(null, columnNames, null, pageSize, cancellationToken);

foreach (var street in page.Features)
{
    var parts = page.ReferencedFeatures.Values
        .Where(part => part.ColumnValues["istTeilVon"] == "urn:adv:oid:" + street.Id)
        .ToList();
}

ReferencedFeatures is keyed by the identifier a reference holds: the object’s gml:identifier where it publishes one, its id otherwise, with nothing stripped or added — urn:adv:oid: is an AAA convention, not a WFS rule. Against your example, one request gives street DEBYBDLMFV00000G (bezeichnung=ST2179, widmung=1305, no geometry) plus its seven components, each with its geometry, its fifteen attributes and its istTeilVon. Paging is unaffected: the service counts only top-level records, and so do we.

Two edges. The join needs the URN form, since the parts name the record as urn:adv:oid:DEBYBDLMFV00000G while its own Id is DEBYBDLMFV00000G — the shape of an identifier belongs to your schema, so we leave both ends alone. And bestehtAus is not reported as a column at all: DescribeFeatureType gives istTeilVon a type="gml:ReferenceType" attribute but declares bestehtAus with a nested type, and our schema reader only picks up the former. Group the parts by their own istTeilVon until we change that.

Not done: composing the parent for you. Two answers would shape that API, so we would rather have them first. How should the relationship be declared — you were right that an arbitrary reference must not become geometry, so would you name the property on the source, or something more general? And what should paging count when a spatial read runs over components, given your constraint that a page counts top-level records but only the component type answers a bounding box?

All of the above is in ThinkGeo.Core 15.0.0-beta211 on nuget.org, and the output quoted here is from that package. If other types in your model keep their geometry behind a reference that is not named bestehtAus, tell us which — it decides how general the composition step needs to be.

Thanks,

Ben

Hi Ben! Happy to see you on the weekend again :smiley:

Thank you for the beta211 fixes and for keeping the service limitation separate.
We checked the installed assembly for Resolve, ResolveDepth and
FeaturePage.ReferencedFeatures. These give us the records and associations that
were previously missing. We understand that BBOX on AX_Strasse remains rejected
by the service, so spatial discovery must use the component types.

Our application lets users connect arbitrary WFS services. AX_Strasse is the
first failing example we found, not the only feature type we want the design to
support. We do not yet have a second confirmed example to supply. We would prefer
a reusable composite WFS source in the SDK, with AGK storing and supplying the
relationship configuration. Here are our answers to your two API questions.

1. Declare the relationship explicitly on the source.

A relationship descriptor would suit us better than a single property name. It
should specify:

  • The parent feature type and one or more component feature types, identified by
    namespace URI and local name rather than assuming a particular XML prefix.
  • The reference property or property path, its direction (parent to components or
    components to parents), and the component geometry property to use.
  • The identity used at each end: feature id, published gml:identifier, or an
    explicitly selected property. Where the wire reference needs a transformation,
    allow an explicit mapping/resolver rather than embedding AAA-specific rules.

For the current example, istTeilVon supplies the reverse relationship. The parent
must keep its original feature id for queries, while the join compares the exact
published identifier, such as urn:adv:oid:DEBYBDLMFV00000G. The SDK should not
assume either that prefix or the names bestehtAus and istTeilVon.

Please preserve all values of a repeated reference property as associations, along
with the referenced feature type. A single string per column cannot describe every
one-to-many or many-to-many relationship. This can be a separate association API;
we do not need existing scalar column APIs to change. The inline-type omission for
bestehtAus also needs to be addressed so configuration can discover forward
relationships instead of depending on every service publishing a reverse one.

Schema discovery can offer candidates, but only an explicitly selected relationship
should supply geometry. The composed feature should retain the parent’s id and
attributes, without child values overwriting them. Components should be collected
into an appropriate multipart geometry or geometry collection, without an implicit
geometric union that changes their shape. Missing or unresolved parts must be
reported; a partial result must not silently appear to be a complete parent.

2. Count the objects returned by each API.

Please keep the existing raw WFS page semantics: Features counts top-level
service records, and ReferencedFeatures does not contribute to that count.
A new API returning composed parent features should count distinct parents.
Component paging is an internal step of its spatial query:

  1. Query the configured component types by BBOX.
  2. Follow the declared relationships and deduplicate the parent identities.
  3. Fetch those parents and the components required by the requested geometry mode.
  4. Return pages of parent features, preserving continuation across component pages.

For your measured extent, 14 components associated with four streets should produce
four parent features, subject to the requested parent page size. A parent whose
components occur on several service pages must appear only once across the composed
result’s pages. An opaque continuation token can carry the necessary query state;
it should not expose a component offset as if it were a parent offset. Leave the
parent total unknown until it is known, rather than using the component count.

One related concern from beta211 assembly inspection: GetFeaturesPageAsync
requires Features.Count >= maxCount before returning a continuation token. If a
server caps a page below the requested size, that ends paging even when
NumberMatched says more records remain. Please cover that case too; this finding
is from code inspection, without a standalone Windows reproduction yet.

Geometry completeness needs an explicit contract too. We would use complete parent
geometry for selection, zoom-to-feature and export: BBOX selects the parents, but
their other components outside that BBOX are still included. For map rendering, an
explicit extent-limited mode may return only the relevant components. That result
must be identified as extent-limited so it cannot be reused as the full geometry
for a later id lookup or export. The full-parent behavior should be the default for
an API presented as returning composed parent features.

The query should remain cancellable, respect service page caps, and avoid an
unbounded whole-service download to fill a viewport. If a service cannot support
the configured relationship query, please expose that limitation clearly.

Useful regression cases would include one parent spanning multiple component
pages and extending outside the BBOX, shared components with multiple parent
references, different namespace prefixes and identifier formats, unresolved
references, and servers returning fewer records than requested. Preview reads,
attribute/id lookups, classic rendering and GPU rendering should use the same
relationship definition.

AGK can provide the configuration UI and persist the user’s choices. Would this
contract fit a reusable composite feature source built on the new reference API?

Thanks!

J

Hi Julian,

We are in the middle of the API review / updates and the next couple betas will not address this issue ( but introduce some api changes). I’d say do not upgrade until Monday, by then I’ll give you an update here. Enjoy your weekend!

Thanks,

Ben

Hi Julian,

Here is the update for your Monday. Short version: we accomplished your contract in v15.0.0-beta215.

1. Paging (your finding and one more)

You were right about GetFeaturesPageAsync: a page shorter than requested ended the paging, even when the service said there was more. There was a second cause too: the continuation advanced by the features left after records without geometry were dropped, so one such record in a page could end the paging early. Now the window moves by the records the service actually returned. Paging continues while the response carries a next link or numberMatched says there is more. With neither (Bayern answers numberMatched="unknown"), a short page is still taken as the end, since nothing else says otherwise.

2. bestehtAus is now a column

Its schema declares the type inline (an association to gml:AbstractFeatureMemberType), which the schema reader skipped. It now reports it as a ReferenceType column, like istTeilVon, so configuration can discover forward relationships too.

3. WfsV2CompositeFeatureSource / WfsV2CompositeAsyncLayer

These are new types, and nothing existing changed. The relationship is declared explicitly; nothing is guessed from the schema:

var relation = new WfsComponentRelation("adv:AX_Strassenachse",
    parentReferenceProperty: "istTeilVon",       // on a component, names its street
    componentReferenceProperty: "bestehtAus")    // on a street, names its components
{
    ReferenceKey = WfsReferenceKey.Id,           // or Identifier (default) or Column
    ReferenceIdPrefix = "urn:adv:oid:"           // the explicit mapping you asked for; nothing AAA-specific is built in
};

var source = new WfsV2CompositeFeatureSource(url, "adv:AX_Strasse", relation);
source.ComponentsUnresolved += (s, e) => { /* e.FeatureId, e.References */ };

How it maps to your points:

  • One feature per parent. It keeps the parent’s own id and attributes; component values never overwrite them. The geometry is the components collected into a multipart shape (a geometry collection if the kinds differ), with no union.
  • Complete geometry, always. A street found through a BBOX carries its components outside the box as well, so a feature can go straight to selection, zoom-to or export. There is no extent-limited mode in this first version.
  • BBOX queries go to the component type. The components inside the box are read, the parents are found through the declared reference and de-duplicated, then each parent is fetched along with all its components. Cancellable, it respects page caps, and it never downloads the whole service.
  • Paging counts distinct parents. The token is opaque. A parent whose components fall on several component pages comes back once. NumberMatched is -1. Features/ReferencedFeatures on the raw WfsV2AsyncFeatureSource are unchanged.
  • Missing parts are reported, never hidden. ComponentsUnresolved fires when a component names a parent the service doesn’t return (FeatureId is null), when a parent names components that don’t come back, or when a parent has none. The parent is returned either way — with the parts that did resolve, or with no geometry at all when none of them did, since its id and its attributes are half of what a composite type is read for. Missing components can only be detected when the parent names its components (componentReferenceProperty).
  • One definition for all paths. Preview/page reads, GetFeaturesByIdsAsync, GetFeaturesByColumnValueAsync, classic rendering through WfsV2CompositeAsyncLayer, and GPU rendering all use the same relation. For GPU, add the source to a FeatureSourceVectorTileSource or translate the layer as you would a WfsV2AsyncLayer.

One thing we measured on Bayern that shapes the configuration. Filtering on a reference (adv:istTeilVon/@xlink:href, or bestehtAus) takes about 15 s per value there; it looks unindexed. Filtering by gml:identifier is about 0.5 s per value. RESOURCEID returns 52 components in about 1 s. So:

  • Declare both directions where the schema has both. Parents are discovered through istTeilVon and completed through bestehtAus; with only one direction declared, the other one is a reverse search on the service.
  • Where references are an id behind a fixed prefix, ReferenceKey.Id + ReferenceIdPrefix follows them by RESOURCEID.

With that configuration, the extent from your curl comparison (725800,5566300 - 726300,5567200) returns its 4 streets, 52 components in total, in about 5 s. DEBYBDLMFV00000G (ST2179) comes back with all 7 parts.

One thing to know about drawing it. The complete geometry is fetched per record, so a tiled overlay does that work again for every tile a record touches - a long street crossing four tiles is discovered and completed four times, about 5 s and a dozen requests each on Bayern - and ComponentsUnresolved fires once per tile per draw, on the drawing thread. Draw it with a single tile (LayerOverlay in SingleTile mode) and the extent is read once per draw. If you need it tiled, tell us: we would then cache the records a draw has already completed, and we would rather hear how often your data changes before we choose how long such a cache may hold them.

Not in this first version: several component types per parent, an extent-limited geometry mode, and a separate API for all values of a repeated reference on the raw source. The composite source reads all of them internally; a column still holds one value. Tell us if you need any of these.

The regression cases from your list are covered: a parent spanning several component pages and extending outside the box, a component shared by two parents, a different prefix and identifier format, unresolved references both ways, and servers returning fewer records than requested. They run against a stub service, plus live tests against Bayern.

4. Your diagnostic code on beta215

The API review narrowed a few members you use, so they will no longer compile:

beta211 beta215
GetRequestUrl(...) internal
GetFeaturesAsync(url) internal
LastXmlResponse obsolete (removed in v15.3)
FeaturePage.NumberMatched int long

The replacement is the two events on the source. They also let you change the outgoing request, which GetRequestUrl never could:

source.SendingHttpRequest += (s, e) => Console.WriteLine(e.HttpRequestMessage.RequestUri);
source.ReceivedHttpResponse += async (s, e) =>
{
    var xml = await e.ResponseMessage.Content.ReadAsStringAsync();
};

If the relation descriptor doesn’t fit how AGK stores its configuration, tell us before you build the UI on it.

Thanks,
Ben

Hi Ben, we implemented the changes, and have following findings:

The explicit relationship descriptor fits our storage: AGK already saves WFS
settings as JSON, so we can add optional relationship configuration without a
database schema change. Existing ordinary WFS layers can keep their current path.
Complete parent geometry, original parent ids/attributes and distinct-parent
paging are the right defaults for our selection, AGK links and export paths.

There are three remaining integration points:

1. We need tiled rendering in both classic and GPU mode.

Classic WFS layers share an ordered MultiTile overlay with other vectors and WMS.
GPU WFS layers use independent readers in FeatureSourceVectorTileSource. Switching
that shared overlay to SingleTile would change all those layers and would not
address GPU reads. Please add reuse of completed parents across tile queries,
including concurrent requests for the same parent, in both rendering paths.

A draw-scoped cache is a suitable starting point: coalesce concurrent completion
requests and reuse complete parents within that draw, then release that state.
Bayern documents daily updates for this service; its catalog explicitly classifies
adv:AX_Strasse as T (a table without geometry). Other user-configured WFS services
can have different update intervals, so we cannot specify one interval for all of
them. Please avoid a fixed cross-draw lifetime. If GPU tile scheduling needs a
longer-lived scope, expose explicit invalidation and a bounded configurable policy.
AGK already has a data-refresh operation that invalidates its classic tiles and
replaces affected GPU sources; source close/replacement must also discard SDK
completion state. Our configurable classic raster-tile expiry (24 hours by
default) is a separate policy, not a freshness guarantee for feature queries.
Please also define how duplicate ComponentsUnresolved notifications are handled
when several tiles request the same parent.

2. The configuration needs to allow several component types per parent.

This is now a confirmed failure in the original Bayern model, not just a future
requirement for other services. Direct HTTP reads on 2026-10-12 found street
DEBYBDLMXM0004VX (bezeichnung=A8) with 38 bestehtAus references: 15
AX_Strassenachse and 23 AX_Fahrbahnachse
. All 38 objects resolve with geometry
and an istTeilVon reference back to that parent.

Minimal service reproduction (no AGK or SDK required):

curl -G 'https://geoservices.bayern.de/wfs/v1/ogc_atkis_basisdlm.cgi' \
  --data-urlencode 'SERVICE=WFS' --data-urlencode 'VERSION=2.0.0' \
  --data-urlencode 'REQUEST=GetFeature' \
  --data-urlencode 'TYPENAMES=adv:AX_Strasse' \
  --data-urlencode 'RESOURCEID=DEBYBDLMXM0004VX' \
  --data-urlencode 'RESOLVE=local' --data-urlencode 'RESOLVEDEPTH=1'

One component is DEBYBDLMXM0002Oe. GetFeature with that RESOURCEID and
TYPENAMES=adv:AX_Strassenachse returns InvalidParameterValue at RESOURCEID:
“The value of parameter RESOURCEID is not compatible with the value of parameter
TYPENAMES.” The identical request with TYPENAMES=adv:AX_Fahrbahnachse returns
one feature. Both responses use HTTP 200; the first is an OWS ExceptionReport.

AGK’s settings match your example: parent adv:AX_Strasse, component
adv:AX_Strassenachse, istTeilVon / bestehtAus, key Id, prefix
urn:adv:oid:. Inspection of beta216 shows that the composite source sends all
forward-reference IDs to the single configured component type. That request
therefore fails for this parent, before ComponentsUnresolved can report it.
The first few streets contain only Strassenachse, so their successful preview
does not establish that the configuration covers the entire feature type.

Please support multiple explicit component types, querying them separately for
spatial discovery and resolving each forward reference against its actual type.
Combining the two names in a comma-separated TYPENAMES request is rejected here
as an unsupported join. Returning partial geometry or treating an entire batch
as missing would not satisfy the full-parent contract. Keep parent IDs and
attributes, deduplicate parents/components across types, and report genuinely
unresolved references only after considering every declared type. Include this
mixed street and a parent found only through the second component type in tests.

AGK’s discovery now offers settings based on resolved reciprocal links, rejects
mixed types in the inspected objects and explains the one-type limit. This helps
setup but cannot solve the SDK’s missing composition support for this street.

Keeping all repeated references internal to the composite source is sufficient
for our geometry workflow; a separate raw association API is not a prerequisite.
Likewise, an extent-limited rendering mode can wait if full-parent completion is
reused efficiently. Please confirm how namespace-qualified types/property paths
and an explicitly chosen component geometry property are represented; the example
does not show those parts of the earlier contract.

3. Unknown totals plus a server cap still need an exhaustive-read option.

Thanks for fixing advancement by wire records and continuation when numberMatched
or a next link indicates more. The remaining short-page rule can still truncate
an unknown-total service: request 2,000, receive the server cap of 100 without a
next link, and later records are never visited. AGK’s existing stub regression
uses five records, a cap of two, numberMatched=“unknown” and no next link; the
full read visits offsets 0, 2, 4 and 5. It also includes a geometry-free record.
This is an application regression case, not a new live Bayern finding.

Please expose an exhaustive mode that continues by returned service-record count
until an empty page when no stronger end signal is available, with cancellation
and repeated-page protection. It should apply inside composite discovery and
completion as well as raw reads. Bounded previews must retain their record budget.
AGK links and exports must not silently accept the first capped page as complete.

Finally, the newly internal request methods are used by our application query
reader as well as our diagnostics. Those raw-reader call sites now use public APIs
and HTTP events while preserving the existing capped-page behavior. Composite
reads use your opaque parent tokens instead, including in the preview. We have
wired the explicit relation into the dialog and all readers against beta216;

Thanks!

J

Hi Julian,

You were right on all three points, and all three are done in v15.0.0-beta218, along with the two contract items you asked us to confirm. First, a correction: in my last reply I wrote that missing parts are “reported, never hidden”. That was wrong for a street with parts of two types. With only adv:AX_Strassenachse declared, the A8 read failed outright instead of reporting the 23 AX_Fahrbahnachse parts.

1. Several component types per parent

WfsComponentRelation.ComponentTypeName is now ComponentTypeNames, a collection. The constructor is unchanged, so your configuration only adds the second type:

var relation = new WfsComponentRelation("adv:AX_Strassenachse", "istTeilVon", "bestehtAus")
{
    ReferenceKey = WfsReferenceKey.Id,
    ReferenceIdPrefix = "urn:adv:oid:"
};
relation.ComponentTypeNames.Add("adv:AX_Fahrbahnachse");
  • Spatial discovery searches each type in turn. The opaque token records which type it has reached, and parents are de-duplicated across types, so a parent found only through the second type still comes back once, on its own page.
  • Completion asks each type in turn for the forward references that are still missing. A reference counts as unresolved only after every declared type has been asked.
  • Components are now fetched by id with a FES ResourceId filter instead of the RESOURCEID parameter. As you found, Bayern refuses a whole RESOURCEID request when one id belongs to another type. The same ids in a ResourceId filter are accepted, and Bayern simply returns the ones of the requested type. That refusal is what made the A8 read fail.
  • Measured live on DEBYBDLMXM0004VX:
    • With both types declared: 38 parts, nothing unresolved.
    • With only AX_Strassenachse declared: the street comes back with its 15 parts, and ComponentsUnresolved lists the other 23.
  • The tests now include the mixed street, a parent found only through the second type, and parts of a type the relation leaves out. They run against a stub that refuses mixed RESOURCEID the way Bayern does, plus the live A8.

One thing you will notice on the A8: it has two bezeichnung values, “A8” and “E52”. A column holds one value, so bezeichnung reads “E52”.

Namespaces. TypeName and every entry in ComponentTypeNames also accept {namespaceUri}LocalName, for example {``http://www.adv-online.de/namespaces/adv/gid/7.1``}AX_Strasse. The source looks the type up in the capabilities when it opens and uses whatever prefix the service binds there. The reference properties (istTeilVon, bestehtAus) are given without a prefix and take the prefix of their own type. So once the types are written in this form, nothing in a relation depends on a prefix.

Component geometry property. WfsComponentRelation.ComponentGeometryProperty names it, without a prefix ("position" for ATKIS). Null takes the one the schema declares. Every component type must have it, or the source fails to open. When it is set, the extent search goes to the service as a fes:BBOX filter naming that property, because the BBOX parameter would test whichever geometry the service takes as the type’s own. Bayern accepts this, and returns the same 4 streets and 52 parts for your extent.

2. Tiled rendering, classic and GPU

Both paths read one source instance: every tile of a WfsV2CompositeAsyncLayer does, and so does every encode slot of FeatureSourceVectorTileSource (the source is declared safe for concurrent reads, so it is not cloned). So both paths get the following:

  • Within a draw (always on, no lifetime to set):
    • A record another read is still completing is waited for, not fetched again.
    • A record completed by a read is taken as-is by any read that overlaps it.
    • When the source has no read running, which is when the draw is over, it lets go of all of it.
    • Measured on Bayern: your extent cut into four tiles fetches 107 objects when the tiles are read one after the other, and 56 when they are drawn at once. 56 is the 4 streets plus their 52 parts, each fetched once.
  • Across draws (off by default): RecordCacheTimeout keeps complete records for the time you set.
    • ClearRecordCache() drops them all and is the hook for your data-refresh operation.
    • At most 10,000 records are kept.
    • A record with unresolved parts is never kept.
    • Close drops everything, so replacing a GPU source discards its state.
  • ComponentsUnresolved duplicates. It fires once per record per draw: overlapping tile reads share one completion, and so one notice. It is still raised on the reading thread.

If AGK builds a separate source instance per reader, each instance has its own state, and they share nothing.

3. Reading until an empty page

ReadUntilEmptyPage (default false) is on both WfsV2AsyncFeatureSource and WfsV2CompositeFeatureSource.

  • When a response has neither a total nor a next link, a short page no longer ends the read. The read moves on by the records the service returned, and stops only at an empty response.
  • Your stub case is a test: 5 records, a cap of 2, numberMatched="unknown", no next link, one record without geometry. It visits 0, 2, 4 and 5.
  • It applies everywhere:
    • GetFeaturesPageAsync tokens.
    • Reads that have no page of their own: by extent, by column value, by ids.
    • Composite discovery and completion.
  • A page still returns no more than the maxCount it was asked for. Only the token changes.
  • Cancellation is checked before every request.
  • A service that ignores STARTINDEX, and so answers with the same first record again, makes the read throw InvalidOperationException instead of looping or returning what it had.
  • The cost is one more request at the end of each read. Your extent on Bayern takes 10 requests instead of 5.

The new settings live on the source. From the layer, use ((WfsV2CompositeFeatureSource)layer.FeatureSource).ReadUntilEmptyPage = true;, and the same for RecordCacheTimeout.

Thanks,
Ben