Example #1
0
 /**
  * {@inheritdoc}
  */
 function load(ObjectManager $manager)
 {
     $point1 = new GeometryEntity();
     $point1->setGeometry(Point::xy(0, 0));
     $manager->persist($point1);
     $manager->flush();
 }
Example #2
0
 /**
  * {@inheritdoc}
  */
 function load(ObjectManager $manager)
 {
     $point1 = Point::xy(0, 0);
     $point2 = Point::xy(1, 0);
     $point3 = Point::xy(1, 1);
     $lineString1 = new LineStringEntity();
     $lineString1->setLineString(LineString::of($point1, $point2, $point3));
     $manager->persist($lineString1);
     $manager->flush();
 }
Example #3
0
 /**
  * {@inheritdoc}
  */
 function load(ObjectManager $manager)
 {
     $point1 = Point::xy(0, 0);
     $point2 = Point::xy(1, 0);
     $point3 = Point::xy(1, 1);
     $multiPoint1 = new MultiPointEntity();
     $multiPoint1->setMultiPoint(MultiPoint::of($point1, $point2, $point3));
     $manager->persist($multiPoint1);
     $manager->flush();
 }
Example #4
0
 /**
  * {@inheritdoc}
  */
 function load(ObjectManager $manager)
 {
     $point1 = Point::xy(0, 0);
     $point2 = Point::xy(1, 0);
     $point3 = Point::xy(1, 1);
     $point4 = Point::xy(0, 1);
     $point5 = Point::xy(0, 0);
     $ring = LineString::of($point1, $point2, $point3, $point4, $point5);
     $poly1 = new PolygonEntity();
     $poly1->setPolygon(Polygon::of($ring));
     $manager->persist($poly1);
     $manager->flush();
 }
Example #5
0
 /**
  * {@inheritdoc}
  */
 function load(ObjectManager $manager)
 {
     $point1 = Point::xy(0, 0);
     $point2 = Point::xy(1, 0);
     $point3 = Point::xy(1, 1);
     $lineString1 = LineString::of($point1, $point2, $point3);
     $point4 = Point::xy(2, 2);
     $point5 = Point::xy(3, 2);
     $point6 = Point::xy(3, 3);
     $lineString2 = LineString::of($point4, $point5, $point6);
     $multilineString1 = new MultiLineStringEntity();
     $multilineString1->setMultiLineString(MultiLineString::of($lineString1, $lineString2));
     $manager->persist($multilineString1);
     $manager->flush();
 }
Example #6
0
 /**
  * {@inheritdoc}
  */
 function load(ObjectManager $manager)
 {
     $point1 = Point::xy(0, 0);
     $point2 = Point::xy(1, 0);
     $point3 = Point::xy(1, 1);
     $point4 = Point::xy(0, 1);
     $point5 = Point::xy(0, 0);
     $ring1 = LineString::of($point1, $point2, $point3, $point4, $point5);
     $poly1 = Polygon::of($ring1);
     $point6 = Point::xy(2, 2);
     $point7 = Point::xy(3, 2);
     $point8 = Point::xy(3, 3);
     $point9 = Point::xy(2, 3);
     $point10 = Point::xy(2, 2);
     $ring2 = LineString::of($point6, $point7, $point8, $point9, $point10);
     $poly2 = Polygon::of($ring2);
     $multiPoly1 = new MultiPolygonEntity();
     $multiPoly1->setMultiPolygon(MultiPolygon::of($poly1, $poly2));
     $manager->persist($multiPoly1);
     $manager->flush();
 }
Example #7
0
 public function testXyWithSRID()
 {
     $point = Point::xy('1.2', '3.4', 123);
     $this->assertPointFactoryMethodAndAccessors($point, 1.2, 3.4, null, null, 123);
 }