[go: up one dir, main page]

Skip to content

Draft: Resolve "Feature request: draped feature collection"

Draped features on terrain

Summary

This MR introduces the DrapedFeatureCollection entity, as well a a new data source: FeatureSource.

The objective is to circumvent limitations in the FeatureCollection entity:

  • the 2D tiling scheme does not work well in a truly 3D environment (with terrain),
  • out of the box draping features on terrain
  • working directly with OpenLayers VectorSource is very limited as we cannot optimize data loading for our needs

How it works

DrapedFeatureCollection listens to tile creation/deletion events from its attached Map. Whenever a tile is created, and if its LOD is greater or equal to the minLod property, we ask the FeatureSource to load features that overlap the tile's extent. Features are deduplicated at the entity level (provided they have a unique ID), so that we don't have to care about duplicated features coming from the FeatureSource.

When a Map tile is deleted, we delete all features that do not overlap with at least one map tile.

This way, features are not associated with map tiles at all.

FeatureSource

This source loads OpenLayers Features from a given source:

  • FileFeatureSource loads feature from a single remote file (in any format supported by OpenLayers)
  • StreamableFeatureSource loads features in a streamable way (such as OGC API Features), in any format supported by OpenLayers
  • StaticFeatureSource is a simple feature container that can be changed by the user, without loading anything from a source.
  • AggregateFeatureSource allows combining several feature sources into one (much like the AggregatePointCloudSource for point cloud data and AggregateImageSource for image data, see !836 (merged))

TODO

  • Feature sources
    • Refactor common code
    • Implement update event to signal that the content of the source has changed and must be reloaded
    • FeatureSource / FeatureSourceBase
      • Add unit tests
      • Add documentation
      • API re-exports
    • StaticFeatureSource
      • Add unit tests
      • Add documentation
      • API re-exports
    • FileFeatureSource
      • Add unit tests
      • Add documentation
      • API re-exports
    • AggregateFeatureSource
      • Add unit tests
      • Add documentation
      • API re-exports
    • StreamableFeatureSource
      • Add unit tests
      • Add documentation
      • API re-exports
  • DrapedFeatureCollection
    • Add unit tests
    • Add documentation
    • API re-exports
    • Implement picking
    • Implement dynamic updates of styles (see FeatureCollection.updateStyle())

Closes #624

Edited by Sébastien Guimmara

Merge request reports

Loading