Hi Ben! We got a few new issues with the latest betas - here’s is an overview:
Thank you for the composite WFS work in beta218/219; AGK now uses several component
types, ReadUntilEmptyPage and the draw-scoped completion reuse. We have gone through
beta230 and collected everything still open for us in one post, most important first.
All of it applies to beta230 (Core, UI.Wpf, Gdal and Gpu).
1. Changing LayerOverlay.Layers during a draw throws “Collection was modified”.
LayerOverlay handles Layers.CollectionChanged by clearing and refilling the
DrawingLayers of every LayerTileView child. LayerTileView.DrawAsyncCore enumerates
drawingLayers and awaits each layer’s draw inside that loop. Adding or reordering a
layer while a tile draws therefore throws InvalidOperationException from
LayerTileView, through TileOverlay and LayerOverlay.DrawAsyncCore.
Reproduction: a MultiTile LayerOverlay with a slow async layer (a WFS layer is
enough), start a refresh, and call Layers.Add before it finishes. We hit it on every
layer add in our viewer.
Could a tile draw take a snapshot of its layers when it starts, or could the overlay
replace the list instead of changing it in place? A change would then apply from the next
draw. Today we cancel the draw and wait for it to finish before every change to
Layers.
2. A cancelled composite WFS extent read can return a partial result.
WfsV2CompositeFeatureSource.GetFeaturesInsideBoundingBoxAsync pages with
while (token != null && !cancellationToken.IsCancellationRequested) and then returns
the parents collected so far. AsyncFeatureSource.GetFeaturesInsideBoundingBoxAsync
does not check the token afterwards. A tile cancelled between two pages therefore gets
an incomplete feature list instead of OperationCanceledException. The raw
WfsV2AsyncFeatureSource read throws in the same situation. Could the composite throw
as well, so a cancelled draw can never cache or show a partial tile?
3. GPU polygon fills seem to draw above the border, covering it (cpu works)
4. Raw WFS column and id reads.
WfsV2AsyncFeatureSource.GetFeaturesByColumnValueAsync writes the column name into
fes:ValueReference without the type’s prefix or a namespace binding; the composite
source qualifies the same reference. Bayern’s ATKIS service rejects unqualified property
names, so we build our own prefixed FILTER for raw reads. GetFeaturesByIdsAsync
joins the ids into RESOURCEID without escaping them. Could the raw source qualify
column names the way the composite does, and escape the ids?
5. WFS schema lookup ignores namespaces.
When the source opens, it finds the feature type’s xs:element by the local part of
TypeName (case-insensitive) and its xs:complexType by local name, without comparing
namespaces. It does not follow xs:element ref, groups or imported schemas. Two types
with the same local name in different namespaces can therefore resolve to the wrong
one. A geometry declared through a reference, a group or an imported schema leaves
GeometryType at Invalid. Could the lookup resolve names against
targetNamespace and the type’s prefix, and follow references, groups and imports?
6. The GPU tile buffer is fixed at 8 px, and translation ignores DrawingMarginInPixel.
FeatureSourceVectorTileCutter passes a literal 8 as the tile buffer and pads its
queries by tileWidthInMapUnits * 8 / 512. FeatureLayerTranslator does not read
DrawingMarginInPixel (classic default: 50 px). FeatureSourceVectorTileSource
offers no buffer setting, while archive generation has
VectorTileLayerOptions.TileBufferPixel. Wide strokes and symbols near tile edges can
therefore be cut on GPU where classic draws them. Could the runtime source take a
configurable buffer, with the translator (including the async overloads and those that
take an existing source) honouring DrawingMarginInPixel? Please also say how a changed
buffer invalidates tiles that are already cut.
7. Label opacity.
Layer opacity applies to the labels as well. We need translucent geometry with opaque
labels: classic, we draw geometry and text in two passes; GPU, we translate the same
layer twice with filtered styles. The translator also ignores LabelDisplayMode.
Could labels keep full opacity independently of the layer (a text-style opacity or a
layer option), in classic drawing and in the translator? Could the translator also
honour LabelDisplayMode? This is a duplicated issue, we already had a thread regarding this. If you don’t plan on changing this, that’s fine.
8. Dynamic sources for highlights.
We draw selection highlights with DynamicSource (AddLine, AddArea, AddPoint).
Lines and areas take only colours and widths, so dash patterns, hatch and texture
fills, offsets, direction markers, group opacity and labels are not available.
Point styles are fine: we bake them with StyleImages.Add. A point drawn as a circle
with a dashed outline also has no dash path in the translator. Could dynamic features
take a translated style (the output of FeatureLayerTranslator), or could
AddLine/AddArea gain dash, pattern and offset settings?
9. Restyling a GPU map.
GpuBasemap.SetStyleAsync(MapStyle) takes no cancellation token, so closing a project
or switching away must wait for it. A different tile grid needs a new host. Sources a
restyle removes are not disposed; that is fine for us, since we own them, but it is not
documented. Could SetStyleAsync take a CancellationToken? Is a grid change on an
existing host planned? Could the documentation say who owns removed sources?
10. Tile replacement detection (low priority).
TileReplacementMode left at its default replaces tiles in groups only when a visible
layer, or a layer inside a GroupLayer, has Opacity < 1. Alpha in a style’s brushes
or pens is not seen, so translucent fills drawn at layer opacity 1 overlap old and new
tiles. We set TileReplacementMode.Grouped ourselves. Could the check consider style
alpha, or the documentation recommend setting the mode for such styles?
Two status questions.
- GDAL: we still call
GdalManager.ConfigureGdal()andConfigureOgr()at startup to
avoid the native load-order crash. beta230 still depends on
ThinkGeo.Gdal.Dependency.Windows14.5.4. Is the rename of the conflicting native DLLs
still planned, and in which version? - Shapefiles with PolyLineZ/PolygonZ: beta160 fixed point simplification, but line and
polygon labels for the reported Z-flagged files were still missing, so we flatten them
to 2D before labelling. Has the labelling of Z-flagged shapes changed since? Then we
would re-test without the adapter.
Thank you!