Skip to content

Complex Geometries: Generalise entries in entity_subdivided table #391

@ssadhu-sl

Description

@ssadhu-sl

Description:
Following the implementation and performance improvements of querying using subdivided geometries for the flood-risk-zone dataset (original ticket), we have confirmed that this approach also scales well when multiple datasets are involved.

We now want to generalise this optimisation so that it is not limited to a specific dataset (flood-risk-zone), but instead targets any geometry that is considered complex, regardless of its dataset.

Tech Approach:
Rather than subdividing all entities within a dataset, we will:

  • Define a complexity threshold to determine which geometries from any dataset require subdivision.
  • Store only these subdivided complex geometries in the entity_subdivided table. (here)
  • Update the query logic to dynamically check entity_subdivided if a subdivided version exists, and fall back to the original geometry in entity table otherwise. (in this method)

Acceptance Criteria

  • A threshold for "complexity" is defined.
  • Subdivision is applied only to geometries that exceed the threshold, across all datasets.
  • The entity_subdivided table contains entries from multiple datasets, not just FRZ.
  • Query logic uses subdivided geometries when available, falling back to entity table geoemtry otherwise.
  • Queries involving complex geometries across different datasets perform significantly better.
  • no impact on non-complex geometry queries

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

Status

Ice Box

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions