withinPolygon() 공개 메소드

Point coordinates are in x, y order (easting, northing for projected coordinates, longitude, latitude for geographic coordinates). The last point coordinate is implicitly connected with the first.
또한 보기: Expr::geoWithinPolygon()
또한 보기: http://docs.mongodb.org/manual/reference/operator/polygon/
사용 중단: 1.1 MongoDB 2.4 deprecated $within in favor of $geoWithin
public withinPolygon ( )
예제 #1
0
 /**
  * Add $within criteria with a $polygon shape to the query.
  *
  * Point coordinates are in x, y order (easting, northing for projected
  * coordinates, longitude, latitude for geographic coordinates).
  *
  * The last point coordinate is implicitly connected with the first.
  *
  * @deprecated 1.1 MongoDB 2.4 deprecated $within in favor of $geoWithin
  * @see Builder::geoWithinPolygon()
  * @see Expr::withinPolygon()
  * @see http://docs.mongodb.org/manual/reference/operator/polygon/
  * @param array $point,... Three or more point coordinate tuples
  * @return $this
  */
 public function withinPolygon()
 {
     $this->expr->withinPolygon(...func_get_args());
     return $this;
 }
예제 #2
0
파일: ExprTest.php 프로젝트: im286er/ent
 /**
  * @expectedException InvalidArgumentException
  */
 public function testWithinPolygonRequiresAtLeastThreePoints()
 {
     $expr = new Expr();
     $expr->withinPolygon(array(0, 0), array(1, 1));
 }
예제 #3
0
 /**
  * @expectedException InvalidArgumentException
  */
 public function testWithinPolygonRequiresAtLeastThreePoints()
 {
     $expr = new Expr();
     $expr->withinPolygon([0, 0], [1, 1]);
 }