Ejemplo n.º 1
0
 /**
  * Determines whether a set of points represents an outer ring.
  * If points are in clockwise orientation then, they form an outer ring.
  *
  * @param array $ring array of points forming the ring
  *
  * @return bool whether a set of points represents an outer ring
  * @access public
  * @static
  */
 public static function isOuterRing($ring)
 {
     // If area is negative then it's in clockwise orientation,
     // i.e. it's an outer ring
     if (PMA_GIS_Polygon::area($ring) < 0) {
         return true;
     }
     return false;
 }
 /**
  * test for Area
  *
  * @param array $ring array of points forming the ring
  * @param fload $area area of the ring
  *
  * @dataProvider providerForTestArea
  * @return void
  */
 public function testArea($ring, $area)
 {
     $this->assertEquals($this->object->area($ring), $area);
 }