Skip to content

Commit 0c75ea6

Browse files
Merge pull request #33 from wgevaert/main
Remove srid from w84 point literals
2 parents bd64590 + 14aa85b commit 0c75ea6

File tree

2 files changed

+8
-12
lines changed

2 files changed

+8
-12
lines changed

src/Literals/Literal.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1178,7 +1178,6 @@ public static function point2d($x, $y): PointType
11781178
];
11791179

11801180
$map["crs"] = self::string("cartesian");
1181-
$map["srid"] = self::decimal(7203);
11821181

11831182
return FunctionCall::point(Query::map($map));
11841183
}
@@ -1214,7 +1213,6 @@ public static function point3d($x, $y, $z): PointType
12141213
];
12151214

12161215
$map["crs"] = self::string("cartesian-3D");
1217-
$map["srid"] = self::decimal(9157);
12181216

12191217
return FunctionCall::point(Query::map($map));
12201218
}
@@ -1244,7 +1242,6 @@ public static function point2dWGS84($longitude, $latitude): PointType
12441242
];
12451243

12461244
$map["crs"] = self::string("WGS-84");
1247-
$map["srid"] = self::decimal(4326);
12481245

12491246
return FunctionCall::point(Query::map($map));
12501247
}
@@ -1280,7 +1277,6 @@ public static function point3dWGS84($longitude, $latitude, $height): PointType
12801277
];
12811278

12821279
$map["crs"] = self::string("WGS-84-3D");
1283-
$map["srid"] = self::decimal(4979);
12841280

12851281
return FunctionCall::point(Query::map($map));
12861282
}

tests/Unit/Literals/LiteralTest.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -116,58 +116,58 @@ public function testPoint2d(): void
116116
{
117117
$point = Literal::point2d(1, 2);
118118

119-
$this->assertEquals(new Point(new PropertyMap(["x" => new Decimal(1), "y" => new Decimal(2), "crs" => new StringLiteral("cartesian"), "srid" => new Decimal(7203)])), $point);
119+
$this->assertEquals(new Point(new PropertyMap(["x" => new Decimal(1), "y" => new Decimal(2), "crs" => new StringLiteral("cartesian")])), $point);
120120

121121
$point = Literal::point2d(
122122
new Decimal(1),
123123
new Decimal(2)
124124
);
125125

126-
$this->assertEquals(new Point(new PropertyMap(["x" => new Decimal(1), "y" => new Decimal(2), "crs" => new StringLiteral("cartesian"), "srid" => new Decimal(7203)])), $point);
126+
$this->assertEquals(new Point(new PropertyMap(["x" => new Decimal(1), "y" => new Decimal(2), "crs" => new StringLiteral("cartesian")])), $point);
127127
}
128128

129129
public function testPoint3d(): void
130130
{
131131
$point = Literal::point3d(1, 2, 3);
132132

133-
$this->assertEquals(new Point(new PropertyMap(["x" => new Decimal(1), "y" => new Decimal(2), "z" => new Decimal(3), "crs" => new StringLiteral("cartesian-3D"), "srid" => new Decimal(9157)])), $point);
133+
$this->assertEquals(new Point(new PropertyMap(["x" => new Decimal(1), "y" => new Decimal(2), "z" => new Decimal(3), "crs" => new StringLiteral("cartesian-3D")])), $point);
134134

135135
$point = Literal::point3d(
136136
new Decimal(1),
137137
new Decimal(2),
138138
new Decimal(3)
139139
);
140140

141-
$this->assertEquals(new Point(new PropertyMap(["x" => new Decimal(1), "y" => new Decimal(2), "z" => new Decimal(3), "crs" => new StringLiteral("cartesian-3D"), "srid" => new Decimal(9157)])), $point);
141+
$this->assertEquals(new Point(new PropertyMap(["x" => new Decimal(1), "y" => new Decimal(2), "z" => new Decimal(3), "crs" => new StringLiteral("cartesian-3D")])), $point);
142142
}
143143

144144
public function testPoint2dWGS84(): void
145145
{
146146
$point = Literal::point2dWGS84(1, 2);
147147

148-
$this->assertEquals(new Point(new PropertyMap(["longitude" => new Decimal(1), "latitude" => new Decimal(2), "crs" => new StringLiteral("WGS-84"), "srid" => new Decimal(4326)])), $point);
148+
$this->assertEquals(new Point(new PropertyMap(["longitude" => new Decimal(1), "latitude" => new Decimal(2), "crs" => new StringLiteral("WGS-84")])), $point);
149149

150150
$point = Literal::point2dWGS84(
151151
new Decimal(1),
152152
new Decimal(2)
153153
);
154154

155-
$this->assertEquals(new Point(new PropertyMap(["longitude" => new Decimal(1), "latitude" => new Decimal(2), "crs" => new StringLiteral("WGS-84"), "srid" => new Decimal(4326)])), $point);
155+
$this->assertEquals(new Point(new PropertyMap(["longitude" => new Decimal(1), "latitude" => new Decimal(2), "crs" => new StringLiteral("WGS-84")])), $point);
156156
}
157157

158158
public function testPoint3dWGS84(): void
159159
{
160160
$point = Literal::point3dWGS84(1, 2, 3);
161161

162-
$this->assertEquals(new Point(new PropertyMap(["longitude" => new Decimal(1), "latitude" => new Decimal(2), "height" => new Decimal(3), "crs" => new StringLiteral("WGS-84-3D"), "srid" => new Decimal(4979)])), $point);
162+
$this->assertEquals(new Point(new PropertyMap(["longitude" => new Decimal(1), "latitude" => new Decimal(2), "height" => new Decimal(3), "crs" => new StringLiteral("WGS-84-3D")])), $point);
163163

164164
$point = Literal::point3dWGS84(
165165
new Decimal(1),
166166
new Decimal(2),
167167
new Decimal(3)
168168
);
169169

170-
$this->assertEquals(new Point(new PropertyMap(["longitude" => new Decimal(1), "latitude" => new Decimal(2), "height" => new Decimal(3), "crs" => new StringLiteral("WGS-84-3D"), "srid" => new Decimal(4979)])), $point);
170+
$this->assertEquals(new Point(new PropertyMap(["longitude" => new Decimal(1), "latitude" => new Decimal(2), "height" => new Decimal(3), "crs" => new StringLiteral("WGS-84-3D")])), $point);
171171
}
172172

173173
public function testDate(): void

0 commit comments

Comments
 (0)