You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*`MultiPoint(Point[] | Collection<Point>, int $srid = 0)` - [MySQL MultiPoint](https://dev.mysql.com/doc/refman/8.0/en/gis-class-multipoint.html)
7
+
*`LineString(Point[] | Collection<Point>, int $srid = 0)` - [MySQL LineString](https://dev.mysql.com/doc/refman/8.0/en/gis-class-linestring.html)
8
+
*`MultiLineString(LineString[] | Collection<LineString>, int $srid = 0)` - [MySQL MultiLineString](https://dev.mysql.com/doc/refman/8.0/en/gis-class-multilinestring.html)
9
+
*`Polygon(LineString[] | Collection<LineString>, int $srid = 0)` - [MySQL Polygon](https://dev.mysql.com/doc/refman/8.0/en/gis-class-polygon.html)
10
+
*`MultiPolygon(Polygon[] | Collection<Polygon>, int $srid = 0)` - [MySQL MultiPolygon](https://dev.mysql.com/doc/refman/8.0/en/gis-class-multipolygon.html)
11
+
*`GeometryCollection(Geometry[] | Collection<Geometry>, int $srid = 0)` - [MySQL GeometryCollection](https://dev.mysql.com/doc/refman/8.0/en/gis-class-geometrycollection.html)
12
12
13
-
## Available spatial functions
13
+
Geometry classes can be also created by these static methods:
14
14
15
-
Every geometry class has these functions:
15
+
*`fromJson(string $geoJson, int $srid = 0)` - Creates a geometry object from a [GeoJSON](https://en.wikipedia.org/wiki/GeoJSON) string.
16
+
*`fromWkt(string $wkt, int $srid = 0)` - Creates a geometry object from a [WKT](https://en.wikipedia.org/wiki/Well-known_text_representation_of_geometry).
17
+
*`fromWkb(string $wkb, int $srid = 0)` - Creates a geometry object from a [WKB](https://en.wikipedia.org/wiki/Well-known_text_representation_of_geometry#Well-known_binary).
18
+
19
+
## Available geometry class methods
16
20
17
21
*`toArray()` - Serializes the geometry object into a GeoJSON associative array.
18
22
*`toJson()` - Serializes the geometry object into an GeoJSON string.
19
-
*`fromJson(string $geoJson)` - Deserializes a geometry object from a GeoJSON string. (static method)
20
23
*`toFeatureCollectionJson()` - Serializes the geometry object into an GeoJSON's FeatureCollection string.
24
+
*`toWkt()` - Serializes the geometry object into a WKT.
25
+
*`toWkb()` - Serializes the geometry object into a WKB.
21
26
*`getCoordinates()` - Returns the coordinates of the geometry object.
22
27
23
28
In addition, `GeometryCollection` also has these functions:
@@ -40,7 +45,7 @@ $geometryCollection = new GeometryCollection([
0 commit comments