class Polygon implements PolygonInterface, Countable, IteratorAggregate, ArrayAccess, JsonSerializable

Constants

TYPE

Properties

protected CoordinatesCollection $coordinates
protected Bounds $bounds
protected bool $hasCoordinate
protected int $precision

Methods

__construct(null|array|CoordinatesCollection $coordinates = null)

No description

string
getGeometryType()

No description

getCoordinates()

Returns a collection containing the values of all the vertices for this geometry.

setCoordinates(CoordinatesCollection $coordinates)

{@inheritdoc}

int
getPrecision()

No description

$this
setPrecision(int $precision)

No description

getBounds()

No description

$this
setBounds(Bounds $bounds)

No description

get($key)

No description

put($key, CoordinatesInterface $coordinate = null)

No description

push(CoordinatesInterface $coordinate)

No description

forget($key)

No description

bool
pointInPolygon(CoordinatesInterface $coordinate)

No description

bool
pointOnBoundary(CoordinatesInterface $coordinate)

No description

bool
pointOnVertex(CoordinatesInterface $coordinate)

No description

bool
pointIsInside(CoordinatesInterface $coordinate)

No description

bool
isEmpty()

No description

array
toArray()

No description

jsonSerialize()

{@inheritdoc}

offsetExists($offset)

{@inheritdoc}

offsetGet($offset)

{@inheritdoc}

offsetSet($offset, $value)

{@inheritdoc}

offsetUnset($offset)

{@inheritdoc}

count()

{@inheritdoc}

getIterator()

{@inheritdoc}

Details

at line 34
__construct(null|array|CoordinatesCollection $coordinates = null)

No description

Parameters

null|array|CoordinatesCollection $coordinates

at line 55
string getGeometryType()

No description

Return Value

string

at line 63
CoordinatesInterface getCoordinate()

No description

Return Value

CoordinatesInterface

if there's a coordinate in the collection

at line 71
CoordinatesCollection getCoordinates()

Returns a collection containing the values of all the vertices for this geometry.

If the geometry is a composite, the array will contain all the vertices for the components, in the order in which the components occur in the geometry.

Return Value

CoordinatesCollection

the vertices of this Geometry

at line 79
setCoordinates(CoordinatesCollection $coordinates)

{@inheritdoc}

Parameters

CoordinatesCollection $coordinates

at line 90
int getPrecision()

No description

Return Value

int

at line 99
$this setPrecision(int $precision)

No description

Parameters

int $precision

Return Value

$this

at line 110
Bounds getBounds()

No description

Return Value

Bounds

at line 119
$this setBounds(Bounds $bounds)

No description

Parameters

Bounds $bounds

Return Value

$this

at line 130
get($key)

No description

Parameters

$key

at line 135
put($key, CoordinatesInterface $coordinate = null)

No description

Parameters

$key
CoordinatesInterface $coordinate

at line 159
push(CoordinatesInterface $coordinate)

No description

Parameters

CoordinatesInterface $coordinate

at line 168
forget($key)

No description

Parameters

$key

at line 181
bool pointInPolygon(CoordinatesInterface $coordinate)

No description

Parameters

CoordinatesInterface $coordinate

Return Value

bool

at line 202
protected bool pointOnBoundary(CoordinatesInterface $coordinate)

No description

Parameters

CoordinatesInterface $coordinate

Return Value

bool

at line 300
protected bool pointOnVertex(CoordinatesInterface $coordinate)

No description

Parameters

CoordinatesInterface $coordinate

Return Value

bool

at line 322
protected bool pointIsInside(CoordinatesInterface $coordinate)

No description

Parameters

CoordinatesInterface $coordinate

Return Value

bool

at line 360
bool isEmpty()

No description

Return Value

bool

at line 368
array toArray()

No description

Return Value

array

at line 376
jsonSerialize()

{@inheritdoc}

at line 384
offsetExists($offset)

{@inheritdoc}

Parameters

$offset

at line 392
offsetGet($offset)

{@inheritdoc}

Parameters

$offset

at line 400
offsetSet($offset, $value)

{@inheritdoc}

Parameters

$offset
$value

at line 409
offsetUnset($offset)

{@inheritdoc}

Parameters

$offset

at line 420
count()

{@inheritdoc}

at line 428
getIterator()

{@inheritdoc}