Options
All
  • Public
  • Public/Protected
  • All
Menu

Type parameters

Hierarchy

  • Quadtree

Index

Properties

Readonly maxDepth

maxDepth: number
summary

maxDepth used to construct the Quadtree. *

Readonly minSize

minSize: number
summary

minSize used to construct the Quadtree.

Readonly scale

scale: number
summary

scale used to construct the Quadtree.

Readonly xMax

xMax: number
summary

xMax used to construct the Quadtree.

Readonly xMin

xMin: number
summary

xMin used to construct the Quadtree.

Readonly yMax

yMax: number
summary

yMax used to construct the Quadtree.

Readonly yMin

yMin: number
summary

yMin used to construct the Quadtree.

Accessors

isQuad

key

keyMap

length

  • summary

    The number of children or points in each quadrant or leaf node.

    If this is a non-leaf quadrant (i.e. isQuad is true), this is the number of children in the non-leaf quadrant.

    Otherwise this is the number of points contained in the leaf quadrant.

    Returns Uint32Series

level

offset

  • summary

    The position of the first child or point in each quadrant or leaf node.

    If this is a non-leaf quadrant (i.e. isQuad is true), this is the position of the non-leaf quadrant's first child.

    Otherwise this column's value is the position of the leaf quadrant's first point.

    Returns Uint32Series

pointX

pointY

points

x

y

Methods

pointInPolygon

  • pointInPolygon<R>(polygons: R, memoryResource?: MemoryResource): DataFrame<Object>
  • summary

    Find the subset of points in the Quadtree contained by the given polygons.

    Type parameters

    Parameters

    • polygons: R

      Series of Polygons to test.

    • Optional memoryResource: MemoryResource

      Optional resource used to allocate the output device memory.

    Returns DataFrame<Object>

    DataFrame Indices for each intersecting point and polygon pair.

pointToNearestPolyline

  • pointToNearestPolyline<R>(polylines: R, expansionRadius?: number, memoryResource?: MemoryResource): DataFrame<Object>
  • summary

    Finds the nearest polyline to each point, and computes the distances between each point/polyline pair.

    Type parameters

    Parameters

    • polylines: R

      Series of Polylines to test.

    • expansionRadius: number = 1

      Radius of each polyline point.

    • Optional memoryResource: MemoryResource

      Optional resource used to allocate the output device memory.

    Returns DataFrame<Object>

    DataFrame Indices for each point/nearest polyline pair, and distance between them.

pointsInPolygons

  • pointsInPolygons<R>(polygons: R, memoryResource?: MemoryResource): DataFrame<Object>
  • summary

    Find the subset of points in the Quadtree contained by the given polygons.

    Type parameters

    Parameters

    • polygons: R

      Series of Polygons to test.

    • Optional memoryResource: MemoryResource

      Optional resource used to allocate the output device memory.

    Returns DataFrame<Object>

    DataFrame x and y-coordinates of each found point

pointsNearestPolylines

  • pointsNearestPolylines<R>(polylines: R, expansionRadius?: number, memoryResource?: MemoryResource): DataFrame<Object>
  • summary

    Find a subset of points nearest to each given polyline.

    Type parameters

    Parameters

    • polylines: R

      Series of Polylines to test.

    • expansionRadius: number = 1

      Radius of each polyline point.

    • Optional memoryResource: MemoryResource

      Optional resource used to allocate the output device memory.

    Returns DataFrame<Object>

    DataFrame containing the closest point to each polyline.

polygonsWithPoints

  • polygonsWithPoints<R>(polygons: R, memoryResource?: MemoryResource): ListSeries<Polyline<T>>
  • summary

    Find the subset of the given polygons that contain points in the Quadtree.

    Type parameters

    Parameters

    • polygons: R

      Series of Polygons to test.

    • Optional memoryResource: MemoryResource

      Optional resource used to allocate the output device memory.

    Returns ListSeries<Polyline<T>>

    Series of each polygon that contains any points

spatialJoin

  • summary

    Search a quadtree for bounding box intersections.

    Parameters

    • boundingBoxes: BoundingBoxes<T>

      Minimum bounding boxes for a set of polygons or polylines.

    • Optional memoryResource: MemoryResource

      Optional resource used to allocate the output device memory.

    Returns DataFrame<Object>

    DataFrame Indices for each intersecting bounding box and leaf quadrant.

Static new

  • new<T>(options: { maxDepth: number; memoryResource?: MemoryResource; minSize: number; scale: number; x: T; xMax: number; xMin: number; y: T; yMax: number; yMin: number }): Quadtree<T["type"]>
  • summary

    Construct a quadtree from a set of points for a given area-of-interest bounding box.

    note

    Swaps xMin and xMax`` if xMin > xMax`

    note

    Swaps yMin and yMax`` if yMin > yMax`

    Type parameters

    Parameters

    • options: { maxDepth: number; memoryResource?: MemoryResource; minSize: number; scale: number; x: T; xMax: number; xMin: number; y: T; yMax: number; yMin: number }

      Object of quadtree options

      • maxDepth: number

        Maximum quadtree depth in range [0, 15)

      • Optional memoryResource?: MemoryResource

        Optional resource to use for output device memory allocations.

      • minSize: number

        Minimum number of points for a non-leaf quadtree node

      • scale: number

        Scale to apply to each point's distance from (x_min, y_min)

      • x: T

        Column of x-coordinates for each point

      • xMax: number

        The upper-right x-coordinate of the area of interest bounding box

      • xMin: number

        The lower-left x-coordinate of the area of interest bounding box

      • y: T

        Column of y-coordinates for each point

      • yMax: number

        The upper-right y-coordinate of the area of interest bounding box

      • yMin: number

        The lower-left y-coordinate of the area of interest bounding box

    Returns Quadtree<T["type"]>

    Quadtree