Spatial Index

Optimised data structure for spatial search

Overview

Joule provides implementation of a spatial Index based on the Quad Tree data structure and algorithm. The search area is divided in to rectangle and thus the world is flattened from a sphere in to a rectangle spatial index.

This feature is provided as a service which can be embedded within custom processors and has its own DSL.

Example & DSL attributes

The below example creates a search tree of the world as flattened rectangle.

spatial index:
  top left coordinates: [-180f,-90f]
  width: 360
  area: 64800
  max levels: 24
  preferred max elements: 50

Attributes schema

Attribute
Description
Data Type
Required

top left coordinates

North west coordinate to create the spatial index

Float Default: [-180f, -90f]

width

Width of the search area in terms of degrees

Integer

Default: 360

area

Search area

Integer

Default: 64800

max levels

Maximun number of sub spatial indexes. Range must be within 0 to 24.

Integer

Default: 16

preferred max elements

Maximun number of elements within a bounded area.

Integer

Default: 500

API Example

This example demonstrates how to query initialise the spatial index and query it thereafter within a custom processor.

For further information how to use this service please contact fractalworks

Last updated

Was this helpful?