Lines Matching refs:geometry
220 * Determines weather the specified geometry is spatially equal to this Point
226 * @param Point|Geometry $geometry
230 public function equals($geometry)
232 return $geometry->geometryType() === Geometry::POINT
233 ? (abs($this->x() - $geometry->x()) <= 1.0E-9 && abs($this->y() - $geometry->y()) <= 1.0E-9)
252 * @param Geometry|Collection $geometry
255 public function distance($geometry)
257 if ($this->isEmpty() || $geometry->isEmpty()) {
263 return $this->getGeos()->distance($geometry->getGeos());
266 if ($geometry->geometryType() == Geometry::POINT) {
268 pow(($this->x() - $geometry->x()), 2)
269 + pow(($this->y() - $geometry->y()), 2)
272 if ($geometry instanceof MultiGeometry) {
274 foreach ($geometry->getComponents() as $component) {
289 // but it could also be somewhere along a line-segment that makes up the geometry (between vertices).
292 foreach ($geometry->explode(true) as $seg) {
294 // and http://paulbourke.net/geometry/pointline/
352 /* The following methods are not valid for this geometry type */