/** * Tell if the Node is inside the polygon defined by the Relation. * Note: Does not works with multipolygon (outer/inner/...) * * @param OSM_Objects_Node $node2test * @param OSM_Objects_Relation $relation * @return bool */ public function isNodeInsideRelationPolygon(OSM_Objects_Node $node2test, OSM_Objects_Relation $relation) { $poly1 = $this->getPolygon($relation); $poly2 = new \OSM\Tools\Polygon(); $poly2->addv($node2test->getLat(), $node2test->getLon()); return $poly1->isPolyInside($poly2); }