1+ <?php
2+
3+ namespace Neo4j \QueryAPI \Objects ;
4+
5+ /**
6+ * Represents a geographical 3D point with longitude, latitude, altitude, and SRID (Spatial Reference System Identifier).
7+ */
8+ class Point_3D
9+ {
10+ /**
11+ * @param float $longitude The longitude of the point.
12+ * @param float $latitude The latitude of the point.
13+ * @param float $altitude The altitude of the point.
14+ * @param int $srid The Spatial Reference System Identifier (SRID).
15+ */
16+ public function __construct (
17+ public float $ longitude ,
18+ public float $ latitude ,
19+ public float $ altitude ,
20+ public int $ srid
21+ ) {
22+ }
23+
24+ /**
25+ * Get the longitude of the point.
26+ *
27+ * @return float Longitude value.
28+ */
29+ public function getLongitude (): float
30+ {
31+ return $ this ->longitude ;
32+ }
33+
34+ /**
35+ * Get the latitude of the point.
36+ *
37+ * @return float Latitude value.
38+ */
39+ public function getLatitude (): float
40+ {
41+ return $ this ->latitude ;
42+ }
43+
44+ /**
45+ * Get the altitude of the point.
46+ *
47+ * @return float Altitude value.
48+ */
49+ public function getAltitude (): float
50+ {
51+ return $ this ->altitude ;
52+ }
53+
54+ /**
55+ * Get the SRID (Spatial Reference System Identifier) of the point.
56+ *
57+ * @return int SRID value.
58+ */
59+ public function getSrid (): int
60+ {
61+ return $ this ->srid ;
62+ }
63+
64+ /**
65+ * Convert the Point3D object to a string representation.
66+ *
67+ * @return string String representation in the format: "SRID=<srid>;POINT ( <longitude> <latitude> <altitude> )".
68+ */
69+ public function __toString (): string
70+ {
71+ return "SRID= {$ this ->srid };POINT ( {$ this ->longitude } {$ this ->latitude } {$ this ->altitude }) " ;
72+ }
73+ }
0 commit comments