public function Polygon::pointOnVertex in geoPHP 7
1 call to Polygon::pointOnVertex()
- Polygon::pointInPolygon in geoPHP/
lib/ geometry/ Polygon.class.php - For a given point, determine whether it's bounded by the given polygon. Adapted from http://www.assemblysys.com/dataServices/php_pointinpolygon.php
File
- geoPHP/
lib/ geometry/ Polygon.class.php, line 201
Class
- Polygon
- Polygon: A polygon is a plane figure that is bounded by a closed path, composed of a finite sequence of straight line segments
Code
public function pointOnVertex($point) {
foreach ($this
->getPoints() as $vertex) {
if ($point
->equals($vertex)) {
return true;
}
}
}