setasign\SetaPDF2\Extractor\Storage

SpatialStorage The implementation of a spatial storage

File: /SetaPDF v2/Extractor/Storage/SpatialStorage.php
Old class name (alias): \SetaPDF_Extractor_Storage_SpatialStorage

Class hierarchy

Implements

Summary

Properties

$_cellSize

protected int|float SpatialStorage::$_cellSize

The given cell-size that will be used to hash the points.

$_cells

protected array SpatialStorage::$_cells = array()

The cells.

$_hashes

protected array SpatialStorage::$_hashes = array()

All hashes.

$_objects

protected SpatialStorage::$_objects = array()

Methods

__construct()

public SpatialStorage::__construct (
int|float $cellSize
)

The constructor.

Parameters
$cellSize : int|float
 

_getCoordinateRange()

Creates a coordinate range for a geometry.

Parameters
$geometry : \SetaPDF_Core_Geometry_Rectangle|\SetaPDF_Core_Geometry_Point
 

_getHashes()

Gets the hashes for a storage entry.

Parameters
$entry : \SetaPDF_Extractor_Storage_StorageEntry
 

_hash()

Creates a hash for a given point.

Parameters
$p : \SetaPDF_Core_Geometry_Point
 

clear()

public SpatialStorage::clear (
void
): void

Removes all entries from the storage and cleans up.

getFirstAvailable()

Get the first available storage-entry or false.

getIntersecting()

insert()

Create a new entry for the data using the geometry and inserts it into the storage.

Parameters
$geometry : \SetaPDF_Core_Geometry_Point|\SetaPDF_Core_Geometry_Rectangle
 
$data : mixed