phpDocumentor

EBoxBo extends EBox
in package

extension de EBox avec possibilité de création à partir du champ cornerCoordinates de gdalinfo

et création d'un GBox par déprojection du EBox

Table of Contents

Constants

ErrorDistOnEmptyEBox  = 'EBox::ErrorDistOnEmptyEBox'
ErrorIncorrectNbOfParams  = 'BBox::ErrorIncorrectNbOfParams'
ErrorIncorrectParams  = 'BBox::ErrorIncorrectParams'
ErrorIncorrectPosTypeInBound  = 'BBox::ErrorIncorrectPosTypeInBound'
ErrorIntersectsWithUndefBBox  = 'BBox::ErrorIntersectsWithUndefBBox'

Properties

$max  : TPos
$min  : TPos
$precision  : int
nbre de chiffres après la virgule à conserver pour les positions
$center  : TPos

Methods

__construct()  : mixed
__toString()  : string
affiche la BBox en utilisant le format GeoJSON d'un Bbox avec des coord. arrondies en fonction de la $precision définie dans la classe appelée
area()  : float
surface du Bbox
asArray()  : array<string, TPos>
bound()  : static
retourne la BBox contenant à la fois $this et la position
center()  : TPos
retourne le centre de la BBox ou [] si elle est vide
covers()  : float
taux de couverture du Bbox $right par le Bbox $this
dilate()  : self
retourne le rectangle dilaté de $dilate
dist()  : float
distance min. entre les positions de 2 BBox, génère une erreur si une des 2 BBox est vide
distTest()  : void
distVerbose()  : float
dx()  : float|null
dy()  : float|null
east()  : float|null
empty()  : bool
renvoit vrai ssi la bbox est vide
geo()  : GBoxBo
calcule les coord.géo. d'un EBox en utilisant $proj qui doit être défini comme projection dans coordsys
includes()  : bool
teste si $small est strictement inclus dans $this
inters()  : bool
version bouléenne de intersects()
intersects()  : static
intersection de 2 bbox, si $this intersecte $b2 alors retourne le GBox/EBox d'intersection, sinon retourne null.
intersectsTest()  : void
intersectsVerbose()  : BBox|null
north()  : float|null
polygon()  : TLLPos
retourne un array d'array avec les 5 positions du polygone de la BBox ou [] si elle est vide
round()  : static
si $this est indéfini alors le renvoit sinon crée un nouvel objet de la classe appelée avec des coord. arrondies en fonction de la $precision définie dans la classe appelée
size()  : float
taille max en unité ou retourne 0 si la EBox est vide
south()  : float|null
translateInX()  : self
renvoie le rectangle translaté en X
union()  : static
Retourne l'union de 2 BBox
unionVerbose()  : BBox
west()  : float|null

Constants

ErrorDistOnEmptyEBox

public mixed ErrorDistOnEmptyEBox = 'EBox::ErrorDistOnEmptyEBox'

ErrorIncorrectNbOfParams

public mixed ErrorIncorrectNbOfParams = 'BBox::ErrorIncorrectNbOfParams'

ErrorIncorrectParams

public mixed ErrorIncorrectParams = 'BBox::ErrorIncorrectParams'

ErrorIncorrectPosTypeInBound

public mixed ErrorIncorrectPosTypeInBound = 'BBox::ErrorIncorrectPosTypeInBound'

ErrorIntersectsWithUndefBBox

public mixed ErrorIntersectsWithUndefBBox = 'BBox::ErrorIntersectsWithUndefBBox'

Properties

$max read-only

public TPos $max

[number, number] ou [], [] ssi $min == []

$min read-only

public TPos $min

[number, number] ou []

$precision

nbre de chiffres après la virgule à conserver pour les positions

public static int $precision = 1

Methods

__construct()

public __construct([string|TPos|TLPos|TLLPos|array<string, array<int, number>> $param = [] ]) : mixed
Parameters
$param : string|TPos|TLPos|TLLPos|array<string, array<int, number>> = []

__toString()

affiche la BBox en utilisant le format GeoJSON d'un Bbox avec des coord. arrondies en fonction de la $precision définie dans la classe appelée

public __toString() : string
Return values
string

area()

surface du Bbox

public area() : float
Return values
float

asArray()

public asArray() : array<string, TPos>
Return values
array<string, TPos>

bound()

retourne la BBox contenant à la fois $this et la position

public bound(TPos $pos) : static
Parameters
$pos : TPos
Return values
static

center()

retourne le centre de la BBox ou [] si elle est vide

public center() : TPos
Return values
TPos

covers()

taux de couverture du Bbox $right par le Bbox $this

public covers(EBox $right) : float
Parameters
$right : EBox
Return values
float

dilate()

retourne le rectangle dilaté de $dilate

public dilate(float $dilate) : self
Parameters
$dilate : float
Return values
self

dist()

distance min. entre les positions de 2 BBox, génère une erreur si une des 2 BBox est vide

public dist(EBox $b2) : float
Parameters
$b2 : EBox
Return values
float

distVerbose()

public distVerbose(EBox $b2) : float
Parameters
$b2 : EBox
Return values
float

dx()

public dx() : float|null
Return values
float|null

dy()

public dy() : float|null
Return values
float|null

east()

public east() : float|null
Return values
float|null

empty()

renvoit vrai ssi la bbox est vide

public empty() : bool
Return values
bool

geo()

calcule les coord.géo. d'un EBox en utilisant $proj qui doit être défini comme projection dans coordsys

public geo(string $proj) : GBoxBo
Parameters
$proj : string
Return values
GBoxBo

includes()

teste si $small est strictement inclus dans $this

public includes(BBox $small[, bool $show = false ]) : bool
Parameters
$small : BBox
$show : bool = false
Return values
bool

inters()

version bouléenne de intersects()

public inters(BBox $b2) : bool
Parameters
$b2 : BBox
Return values
bool

intersects()

intersection de 2 bbox, si $this intersecte $b2 alors retourne le GBox/EBox d'intersection, sinon retourne null.

public intersects(BBox $b2) : static
Parameters
$b2 : BBox
Return values
static

intersectsTest()

public static intersectsTest() : void

north()

public north() : float|null
Return values
float|null

polygon()

retourne un array d'array avec les 5 positions du polygone de la BBox ou [] si elle est vide

public polygon() : TLLPos
Return values
TLLPos

round()

si $this est indéfini alors le renvoit sinon crée un nouvel objet de la classe appelée avec des coord. arrondies en fonction de la $precision définie dans la classe appelée

public round() : static
Return values
static

size()

taille max en unité ou retourne 0 si la EBox est vide

public size() : float
Return values
float

south()

public south() : float|null
Return values
float|null

translateInX()

renvoie le rectangle translaté en X

public translateInX(float $dx) : self
Parameters
$dx : float
Return values
self

union()

Retourne l'union de 2 BBox

public union(BBox $b2) : static
Parameters
$b2 : BBox
Return values
static

west()

public west() : float|null
Return values
float|null

        
On this page

Search results