@@ -14,31 +14,31 @@ public static function polylineDataProvider(): array
1414 return [
1515 'Karlsruhe ' => [
1616 [
17- Point::make (x: 49.01353 , y: 8.40437 , srid: 4326 ), Point::make (x: 49.00984 , y: 8.39736 , srid: 4326 ), Point::make (x: 49.00979 , y: 8.39951 , srid: 4326 ), Point::make (x: 49.01148 , y: 8.40157 , srid: 4326 ), Point::make (x: 49.01107 , y: 8.40234 , srid: 4326 ), Point::make (x: 49.00971 , y: 8.40126 , srid: 4326 ), Point::make (x: 49.00966 , y: 8.40271 , srid: 4326 ), Point::make (x: 49.01087 , y: 8.40316 , srid: 4326 ), Point::make (x: 49.01074 , y: 8.40415 , srid: 4326 ), Point::make (x: 49.00957 , y: 8.40395 , srid: 4326 ), Point::make (x: 49.01074 , y: 8.40415 , srid: 4326 ), Point::make (x: 49.01074 , y: 8.40504 , srid: 4326 ), Point::make (x: 49.00953 , y: 8.40531 , srid: 4326 ), Point::make (x: 49.00941 , y: 8.40682 , srid: 4326 ), Point::make (x: 49.01090 , y: 8.40599 , srid: 4326 ), Point::make (x: 49.01118 , y: 8.40688 , srid: 4326 ), Point::make (x: 49.00935 , y: 8.40842 , srid: 4326 ), Point::make (x: 49.00931 , y: 8.41035 , srid: 4326 ), Point::make (x: 49.01353 , y: 8.40437 , srid: 4326 ),
17+ Point::make (x: 8.40437 , y: 49.01353 , srid: 4326 ), Point::make (x: 8.39736 , y: 49.00984 , srid: 4326 ), Point::make (x: 8.39951 , y: 49.00979 , srid: 4326 ), Point::make (x: 8.40157 , y: 49.01148 , srid: 4326 ), Point::make (x: 8.40234 , y: 49.01107 , srid: 4326 ), Point::make (x: 8.40126 , y: 49.00971 , srid: 4326 ), Point::make (x: 8.40271 , y: 49.00966 , srid: 4326 ), Point::make (x: 8.40316 , y: 49.01087 , srid: 4326 ), Point::make (x: 8.40415 , y: 49.01074 , srid: 4326 ), Point::make (x: 8.40395 , y: 49.00957 , srid: 4326 ), Point::make (x: 8.40415 , y: 49.01074 , srid: 4326 ), Point::make (x: 8.40504 , y: 49.01074 , srid: 4326 ), Point::make (x: 8.40531 , y: 49.00953 , srid: 4326 ), Point::make (x: 8.40682 , y: 49.00941 , srid: 4326 ), Point::make (x: 8.40599 , y: 49.01090 , srid: 4326 ), Point::make (x: 8.40688 , y: 49.01118 , srid: 4326 ), Point::make (x: 8.40842 , y: 49.00935 , srid: 4326 ), Point::make (x: 8.41035 , y: 49.00931 , srid: 4326 ), Point::make (x: 8.40437 , y: 49.01353 , srid: 4326 ),
1818 ],
1919 'q}cjHinhr@`Vxj@HmLqI{KpAyCnGvEHaHqFyAXeEhFf@iFg@?qDpFu@VmHiHdDw@qDlJsHFaKkYjd@ ' ,
2020 ],
2121 'Chicago ' => [
2222 [
23- Point::make (x: 41.85555 , y: - 87.70262 , srid: 4326 ), Point::make (x: 41.85555 , y: - 87.69524 , srid: 4326 ), Point::make (x: 41.86623 , y: - 87.69550 , srid: 4326 ), Point::make (x: 41.86642 , y: - 87.70297 , srid: 4326 ), Point::make (x: 41.86309 , y: - 87.70305 , srid: 4326 ), Point::make (x: 41.86284 , y: - 87.71953 , srid: 4326 ), Point::make (x: 41.86194 , y: - 87.71953 , srid: 4326 ), Point::make (x: 41.86252 , y: - 87.70301 , srid: 4326 ), Point::make (x: 41.85552 , y: - 87.70280 , srid: 4326 ),
23+ Point::make (x: - 87.70262 , y: 41.85555 , srid: 4326 ), Point::make (x: - 87.69524 , y: 41.85555 , srid: 4326 ), Point::make (x: - 87.69550 , y: 41.86623 , srid: 4326 ), Point::make (x: - 87.70297 , y: 41.86642 , srid: 4326 ), Point::make (x: - 87.70305 , y: 41.86309 , srid: 4326 ), Point::make (x: - 87.71953 , y: 41.86284 , srid: 4326 ), Point::make (x: - 87.71953 , y: 41.86194 , srid: 4326 ), Point::make (x: - 87.70301 , y: 41.86252 , srid: 4326 ), Point::make (x: - 87.70280 , y: 41.85552 , srid: 4326 ),
2424 ],
2525 'e|m~FjlhvO?cm@waAr@e@tm@xSNp@~eBrD?sBgfBvj@i@ '
2626 ],
2727 'Jumping the prime meridian ' => [
2828 [
29- Point::make (x: 51.47806 , y: - 0.00158 , srid: 4326 ), Point::make (x: 51.47836 , y: 0.00096 , srid: 4326 ), Point::make (x: 51.47725 , y: - 0.00298 , srid: 4326 ), Point::make (x: 51.47720 , y: 0.00129 , srid: 4326 ),
29+ Point::make (x: - 0.00158 , y: 51.47806 , srid: 4326 ), Point::make (x: 0.00096 , y: 51.47836 , srid: 4326 ), Point::make (x: - 0.00298 , y: 51.47725 , srid: 4326 ), Point::make (x: 0.00129 , y: 51.47720 , srid: 4326 ),
3030 ],
3131 '{heyHzH{@{N|ErWHuY '
3232 ],
3333 'Jumping the equator ' => [
3434 [
35- Point::make (x: -3.72815 , y: -14.64739 , srid: 4326 ), Point::make (x: 4.00034 , y: - 4.80364 , srid: 4326 ), Point::make (x: - 2.67512 , y: 3.63386 , srid: 4326 ), Point::make (x: 3.64956 , y: 16.29011 , srid: 4326 ), Point::make (x: - 1.62119 , y: 23.67293 , srid: 4326 ),
35+ Point::make (x: -14.64739 , y: -3.72815 , srid: 4326 ), Point::make (x: - 4.80364 , y: 4.00034 , srid: 4326 ), Point::make (x: 3.63386 , y: - 2.67512 , srid: 4326 ), Point::make (x: 16.29011 , y: 3.64956 , srid: 4326 ), Point::make (x: 23.67293 , y: - 1.62119 , srid: 4326 ),
3636 ],
3737 '|cwUdykxAandn@mra{@rxvg@k}nr@ghre@q|flAdmd_@s}`l@ '
3838 ],
3939 'Down-under ' => [
4040 [
41- Point::make (x: - 37.81502 , y: 144.74313 , srid: 4326 ), Point::make (x: - 37.80634 , y: 144.82003 , srid: 4326 ), Point::make (x: - 37.64993 , y: 144.80905 , srid: 4326 ), Point::make (x: - 37.64124 , y: 144.94637 , srid: 4326 ), Point::make (x: - 37.78898 , y: 144.95187 , srid: 4326 ), Point::make (x: - 37.77595 , y: 145.08096 , srid: 4326 ), Point::make (x: - 37.97974 , y: 144.91891 , srid: 4326 ), Point::make (x: - 37.81394 , y: 144.74451 , srid: 4326 ),
41+ Point::make (x: 144.74313 , y: - 37.81502 , srid: 4326 ), Point::make (x: 144.82003 , y: - 37.80634 , srid: 4326 ), Point::make (x: 144.80905 , y: - 37.64993 , srid: 4326 ), Point::make (x: 144.94637 , y: - 37.64124 , srid: 4326 ), Point::make (x: 144.95187 , y: - 37.78898 , srid: 4326 ), Point::make (x: 145.08096 , y: - 37.77595 , srid: 4326 ), Point::make (x: 144.91891 , y: - 37.97974 , srid: 4326 ), Point::make (x: 144.74451 , y: - 37.81394 , srid: 4326 ),
4242 ],
4343 'zvxeFqcmrZgu@s_Nqp]rcAiu@gyYjz[ka@mpAyeXtxf@xs^gk_@~`a@ '
4444 ]
@@ -50,13 +50,13 @@ public static function nonStandardPolylineDataProvider(): array
5050 return [
5151 'Towards Stuttgart ' => [
5252 [
53- Point::make (x: 48.784600 , y: 9.183700 , srid: 4326 ), Point::make (x: 48.993500 , y: 8.401900 , srid: 4326 ), Point::make (x: 48.585110 , y: 7.733882 , srid: 4326 ), Point::make (x: 48.876743 , y: 2.358424 , srid: 4326 )
53+ Point::make (x: 9.183700 , y: 48.784600 , srid: 4326 ), Point::make (x: 8.401900 , y: 48.993500 , srid: 4326 ), Point::make (x: 7.733882 , y: 48.585110 , srid: 4326 ), Point::make (x: 2.358424 , y: 48.876743 , srid: 4326 )
5454 ],
5555 'olq`|Ag|ooPg_wKn}un@js|Wbvwg@arxPb}agI '
5656 ],
5757 'London -> Paris ' => [
5858 [
59- Point::make (x: 51.531425 , y: - 0.126133 , srid: 4326 ), Point::make (x: 48.880947 , y: 2.355314 , srid: 4326 )
59+ Point::make (x: - 0.126133 , y: 51.531425 , srid: 4326 ), Point::make (x: 2.355314 , y: 48.880947 , srid: 4326 )
6060 ],
6161 'aifhaBhjuFzuw`DmqmvC '
6262 ],
@@ -68,10 +68,10 @@ public function testMagellanPolylineTranscoder()
6868 $ test = new MagellanPolylineTranscoder ();
6969
7070 $ coordinates = [
71- Point::make (x: 13.4050 , y: 52.5200 , srid: 4326 ), // Berlin
72- Point::make (x: 13.4051 , y: 52.5101 , srid: 4326 ), // Slightly different point in Berlin
73- Point::make (x: 13.4060 , y: 52.5210 , srid: 4326 ), // Another point in Berlin
74- Point::make (x: 41.87343 , y: - 87.68840 , srid: 4326 ) // Chicago
71+ Point::make (x: 52.5200 , y: 13.4050 , srid: 4326 ), // Berlin
72+ Point::make (x: 52.5101 , y: 13.4051 , srid: 4326 ), // Slightly different point in Berlin
73+ Point::make (x: 52.5210 , y: 13.4060 , srid: 4326 ), // Another point in Berlin
74+ Point::make (x: - 87.68840 , y: 41.87343 , srid: 4326 ) // Chicago
7575 ];
7676 $ encodedPolyline = $ test ->encodePolyline ($ coordinates );
7777 $ decodedCoordinates = $ test ->decodePolyline ($ encodedPolyline );
@@ -88,10 +88,10 @@ public function testNonStandardPolylineEncodeDecode()
8888 $ test = new MagellanPolylineTranscoder ();
8989
9090 $ coordinates = [
91- Point::make (x: 13.4050 , y: 52.5200 , srid: 4326 ), // Berlin
92- Point::make (x: 13.4051 , y: 52.5101 , srid: 4326 ), // Slightly different point in Berlin
93- Point::make (x: 13.4060 , y: 52.5210 , srid: 4326 ), // Another point in Berlin
94- Point::make (x: 41.87343 , y: - 87.68840 , srid: 4326 ) // Chicago
91+ Point::make (x: 52.5200 , y: 13.4050 , srid: 4326 ), // Berlin
92+ Point::make (x: 52.5101 , y: 13.4051 , srid: 4326 ), // Slightly different point in Berlin
93+ Point::make (x: 52.5210 , y: 13.4060 , srid: 4326 ), // Another point in Berlin
94+ Point::make (x: - 87.68840 , y: 41.87343 , srid: 4326 ) // Chicago
9595 ];
9696 $ encodedPolyline = $ test ->encodePolyline ($ coordinates , 6 );
9797 $ decodedCoordinates = $ test ->decodePolyline ($ encodedPolyline , 6 );
0 commit comments