Features cut off on tile border with GPU rendering

Hi,

When using OgcApiAsyncFeatureSource and InMemoryFeatureSource with GPU rendering it seems that features from InMemoryFeatureSource are cut off on tile border. On below image black circles are from OgcApiAsyncFeatureSource and blue ones from InMemoryFeatureSource:

Also noticed that when zooming in/out same cut off can be seen also for features from OgcApiAsyncFeatureSource so that first cut off circle is drawn but quickly updated to full circle causing kind of blinking circles on tile edges.

Br, Simo

Hi Simo,

The tile cutter cuts several tiles at the same time, and it used to give each worker a copy of the feature source, made when the map opened. Points added to an InMemoryFeatureSource after that only go into the original, so only the worker holding the original could see them. A circle that spans two tiles then lands in one tile and not in the one beside it — the cut in your picture.

It’s fixed in beta190, in which an in-memory source is not copied any more. The cutter shares the one instance and the workers take turns on it, so nothing can go stale, and tiles that were already cut are thrown away when the source changes.

To be straight with you: what we reproduced and fixed is the dynamic-write case, I’m not sure if that’s the issue you have. Can you share your code if you still see issues with the latest beta.

Thanks,
Ben

Hi,

You can re-produce this issue with HowDol.v15 OGCAPIFeatureServer example simply by adding InMemoryFeatureSource e.g. like this:

    private void AddInMemory(MapStyle style)
    {
        FeatureSourceVectorTileSource inMemorySource = new FeatureSourceVectorTileSource();

        Collection<Feature> features = new Collection<Feature>()
        {
            new Feature(new PointShape(235710, 5057380)),
            new Feature(new PointShape(235730, 5057400)),
        };

        InMemoryFeatureSource inMemoryFeatureSource = new InMemoryFeatureSource(Array.Empty<FeatureSourceColumn>(), features);
        inMemorySource.FeatureSources.Add("test", inMemoryFeatureSource);

        style.AddStyleLayers(inMemorySource, "InMemorySource",
            i => StyleLayer.CreateCircle(
            "1", i, "InMemorySource", "test",
            paint: (_, _) => new CirclePaint(GeoColors.Black, GeoColors.Black, 14f, 2f, 1f)));
    }

Then if you zoom in to those point’s you should see something like this:

Also if you increase circle-radius for those poinst coming from ogc source e.g. to 25 you can see the same issue also on those:

Usually that cut off is not permanent for points from ogc but more like that blinking circle what I described earlier but I was also able to get it as permanent (stayed as half circle until next refresh ) when zooming and panning.

Br, Simo

Hi Simo,

Your repro found it — we could not reproduce anything until I put a second source on the map, and then it cut every time. It’s now fixed in beta192.

We fixed it for circles, labels and icons have the similar issues in some cases and we are on it.

Thanks,
Ben