summaryrefslogtreecommitdiff
path: root/test/fixtures
diff options
context:
space:
mode:
authorzmiao <miao.zhao@mapbox.com>2020-04-20 11:33:46 +0300
committerzmiao <miao.zhao@mapbox.com>2020-04-22 15:53:08 +0300
commit8dac8f1150910dfc62759330c7e3dcdd7e5b53a2 (patch)
tree7c174aed15c65be5ff6eded3ae84c5a51b79bd0a /test/fixtures
parent75ebd4aa1090bae4f726c487832050b30dbe40b1 (diff)
downloadqtlocation-mapboxgl-8dac8f1150910dfc62759330c7e3dcdd7e5b53a2.tar.gz
[core] Distance expression: add unit tests for distance expression
Diffstat (limited to 'test/fixtures')
-rw-r--r--test/fixtures/expression_equality/distance.a.json5
-rw-r--r--test/fixtures/expression_equality/distance.b.json5
-rw-r--r--test/fixtures/geometry_data/line_string_1.geojson259
-rw-r--r--test/fixtures/geometry_data/line_string_2.geojson106
-rw-r--r--test/fixtures/geometry_data/multi_line_string_1.geojson199
-rw-r--r--test/fixtures/geometry_data/multi_line_string_2.geojson88
-rw-r--r--test/fixtures/geometry_data/multi_point_1.geojson91
-rw-r--r--test/fixtures/geometry_data/multi_point_2.geojson85
8 files changed, 838 insertions, 0 deletions
diff --git a/test/fixtures/expression_equality/distance.a.json b/test/fixtures/expression_equality/distance.a.json
new file mode 100644
index 0000000000..a1a7db1e39
--- /dev/null
+++ b/test/fixtures/expression_equality/distance.a.json
@@ -0,0 +1,5 @@
+["distance", {
+ "type": "LineString",
+ "coordinates": [[0, 0], [0, 5], [5, 5], [5, 0]]
+ }, "Meters"
+] \ No newline at end of file
diff --git a/test/fixtures/expression_equality/distance.b.json b/test/fixtures/expression_equality/distance.b.json
new file mode 100644
index 0000000000..77f5b4b5ba
--- /dev/null
+++ b/test/fixtures/expression_equality/distance.b.json
@@ -0,0 +1,5 @@
+["distance", {
+ "type": "LineString",
+ "coordinates": [[0, 0], [0, 6], [5, 5], [5, 0]]
+ }, "Meters"
+] \ No newline at end of file
diff --git a/test/fixtures/geometry_data/line_string_1.geojson b/test/fixtures/geometry_data/line_string_1.geojson
new file mode 100644
index 0000000000..eb0b8e3780
--- /dev/null
+++ b/test/fixtures/geometry_data/line_string_1.geojson
@@ -0,0 +1,259 @@
+{
+ "type": "FeatureCollection",
+ "features": [
+ {
+ "type": "Feature",
+ "properties": {},
+ "geometry": {
+ "type": "LineString",
+ "coordinates":
+ [
+ [
+ 24.919674396514893,
+ 60.16455037398201
+ ],
+ [
+ 24.921332001686096,
+ 60.16460108220136
+ ],
+ [
+ 24.92250680923462,
+ 60.164705167248556
+ ],
+ [
+ 24.92311298847198,
+ 60.16476254732591
+ ],
+ [
+ 24.923794269561768,
+ 60.16481192080062
+ ],
+ [
+ 24.924674034118652,
+ 60.16487063510643
+ ],
+ [
+ 24.92523193359375,
+ 60.1648919857371
+ ],
+ [
+ 24.925435781478882,
+ 60.164910667527536
+ ],
+ [
+ 24.92561012506485,
+ 60.16495069989984
+ ],
+ [
+ 24.925816655158997,
+ 60.165010748366896
+ ],
+ [
+ 24.926661550998688,
+ 60.165288304299814
+ ],
+ [
+ 24.92731064558029,
+ 60.1655044760466
+ ],
+ [
+ 24.927439391613003,
+ 60.165561854728224
+ ],
+ [
+ 24.928563237190247,
+ 60.16595149335769
+ ],
+ [
+ 24.929917752742767,
+ 60.16642652598447
+ ],
+ [
+ 24.930156469345093,
+ 60.16644253820056
+ ],
+ [
+ 24.930403232574463,
+ 60.166394501528906
+ ],
+ [
+ 24.93046224117279,
+ 60.16634913349672
+ ],
+ [
+ 24.930633902549744,
+ 60.166365145750525
+ ],
+ [
+ 24.93071973323822,
+ 60.16642385728104
+ ],
+ [
+ 24.93074119091034,
+ 60.166511924380124
+ ],
+ [
+ 24.930797517299652,
+ 60.16665069629966
+ ],
+ [
+ 24.931159615516663,
+ 60.16733387258923
+ ],
+ [
+ 24.93122398853302,
+ 60.1673819078876
+ ],
+ [
+ 24.93122935295105,
+ 60.167383242200444
+ ],
+ [
+ 24.931269586086273,
+ 60.16739658532588
+ ],
+ [
+ 24.93135541677475,
+ 60.167392582388814
+ ],
+ [
+ 24.93148148059845,
+ 60.16739525101357
+ ],
+ [
+ 24.931594133377075,
+ 60.167403256886566
+ ],
+ [
+ 24.931905269622803,
+ 60.167397919638134
+ ],
+ [
+ 24.932076930999752,
+ 60.167405925510465
+ ],
+ [
+ 24.932237863540646,
+ 60.16741660000386
+ ],
+ [
+ 24.93250608444214,
+ 60.1674673038002
+ ],
+ [
+ 24.933310747146603,
+ 60.167734164596524
+ ],
+ [
+ 24.934450685977936,
+ 60.168130448879936
+ ],
+ [
+ 24.934933483600616,
+ 60.16830123659222
+ ],
+ [
+ 24.934713542461395,
+ 60.16847068914809
+ ],
+ [
+ 24.934949576854706,
+ 60.16855474796568
+ ],
+ [
+ 24.935268759727478,
+ 60.16866682605459
+ ],
+ [
+ 24.936030507087704,
+ 60.16894701960423
+ ],
+ [
+ 24.93632823228836,
+ 60.16903107720314
+ ],
+ [
+ 24.93696391582489,
+ 60.16926456940512
+ ],
+ [
+ 24.938240647315975,
+ 60.16974755943638
+ ],
+ [
+ 24.938401579856873,
+ 60.16979692542083
+ ],
+ [
+ 24.938731491565704,
+ 60.16987297557607
+ ],
+ [
+ 24.939565658569332,
+ 60.17019985581767
+ ],
+ [
+ 24.939801692962643,
+ 60.17026389727989
+ ],
+ [
+ 24.939911663532257,
+ 60.17027590504016
+ ],
+ [
+ 24.941115975379944,
+ 60.170305257324564
+ ],
+ [
+ 24.94418442249298,
+ 60.170386643066905
+ ],
+ [
+ 24.94469404220581,
+ 60.17047469954465
+ ],
+ [
+ 24.945133924484253,
+ 60.17062412817889
+ ],
+ [
+ 24.94567573070526,
+ 60.17080023962529
+ ],
+ [
+ 24.946464300155636,
+ 60.17102971676008
+ ],
+ [
+ 24.94716167449951,
+ 60.17129921692988
+ ],
+ [
+ 24.94742453098297,
+ 60.17141929055101
+ ],
+ [
+ 24.947537183761593,
+ 60.17157405145976
+ ],
+ [
+ 24.9476820230484,
+ 60.171819532785136
+ ],
+ [
+ 24.948642253875732,
+ 60.17268670756399
+ ],
+ [
+ 24.949076771736145,
+ 60.17306558905074
+ ],
+ [
+ 24.949543476104736,
+ 60.1734391299005
+ ]
+ ]
+ }
+ }
+ ]
+} \ No newline at end of file
diff --git a/test/fixtures/geometry_data/line_string_2.geojson b/test/fixtures/geometry_data/line_string_2.geojson
new file mode 100644
index 0000000000..718051eaee
--- /dev/null
+++ b/test/fixtures/geometry_data/line_string_2.geojson
@@ -0,0 +1,106 @@
+{
+ "type": "FeatureCollection",
+ "features": [
+ {
+ "type": "Feature",
+ "properties": {},
+ "geometry": {
+ "type": "LineString",
+ "coordinates": [
+ [
+ 24.928536415100098,
+ 60.1628956417812
+ ],
+ [
+ 24.93021011352539,
+ 60.16348281435769
+ ],
+ [
+ 24.93299961090088,
+ 60.164454295036016
+ ],
+ [
+ 24.93443727493286,
+ 60.16346146281146
+ ],
+ [
+ 24.936904907226562,
+ 60.16434754032213
+ ],
+ [
+ 24.93551015853882,
+ 60.165351020940705
+ ],
+ [
+ 24.93443727493286,
+ 60.16613029857937
+ ],
+ [
+ 24.93673324584961,
+ 60.16695225633493
+ ],
+ [
+ 24.937891960144043,
+ 60.16614097348721
+ ],
+ [
+ 24.939265251159668,
+ 60.16512684175867
+ ],
+ [
+ 24.941647052764893,
+ 60.165948824615676
+ ],
+ [
+ 24.94020938873291,
+ 60.16695225633493
+ ],
+ [
+ 24.94175434112549,
+ 60.16749665859389
+ ],
+ [
+ 24.942162036895752,
+ 60.16758205420823
+ ],
+ [
+ 24.943556785583496,
+ 60.16667471445701
+ ],
+ [
+ 24.943921566009518,
+ 60.166706738639476
+ ],
+ [
+ 24.943857192993164,
+ 60.166365145750525
+ ],
+ [
+ 24.944028854370117,
+ 60.16550047287903
+ ],
+ [
+ 24.942784309387207,
+ 60.1651375169925
+ ],
+ [
+ 24.940338134765625,
+ 60.16435821580911
+ ],
+ [
+ 24.938042163848877,
+ 60.16353619316258
+ ],
+ [
+ 24.935553073883057,
+ 60.16268212187951
+ ],
+ [
+ 24.934222698211666,
+ 60.16212696364248
+ ]
+ ]
+ }
+ }
+ ]
+} \ No newline at end of file
diff --git a/test/fixtures/geometry_data/multi_line_string_1.geojson b/test/fixtures/geometry_data/multi_line_string_1.geojson
new file mode 100644
index 0000000000..cde096af19
--- /dev/null
+++ b/test/fixtures/geometry_data/multi_line_string_1.geojson
@@ -0,0 +1,199 @@
+{
+ "type": "FeatureCollection",
+ "features": [
+ {
+ "type": "Feature",
+ "geometry": {
+ "type": "MultiLineString",
+ "coordinates": [
+ [
+ [
+ 24.920597076416016,
+ 60.18971338103967
+ ],
+ [
+ 24.91849422454834,
+ 60.1880919194332
+ ],
+ [
+ 24.920125007629395,
+ 60.18672641596177
+ ],
+ [
+ 24.92398738861084,
+ 60.183888547404635
+ ],
+ [
+ 24.927291870117188,
+ 60.181733310424505
+ ],
+ [
+ 24.925832748413082,
+ 60.18105043355454
+ ],
+ [
+ 24.924373626708984,
+ 60.18049558564138
+ ],
+ [
+ 24.92321491241455,
+ 60.17921513160081
+ ],
+ [
+ 24.922914505004883,
+ 60.17891635180763
+ ]
+ ],
+ [
+ [
+ 24.889440536499023,
+ 60.161070001844394
+ ],
+ [
+ 24.892358779907227,
+ 60.16132623812907
+ ],
+ [
+ 24.901306629180908,
+ 60.16263941773268
+ ],
+ [
+ 24.9035382270813,
+ 60.162863613884376
+ ],
+ [
+ 24.905061721801758,
+ 60.16350416589006
+ ],
+ [
+ 24.905898571014404,
+ 60.16381376155042
+ ],
+ [
+ 24.906907081604004,
+ 60.16405930086227
+ ],
+ [
+ 24.90765810012817,
+ 60.16415538096314
+ ],
+ [
+ 24.9079155921936,
+ 60.16415538096314
+ ],
+ [
+ 24.91274356842041,
+ 60.16435821580911
+ ],
+ [
+ 24.915618896484375,
+ 60.164443619580226
+ ],
+ [
+ 24.916906356811523,
+ 60.16429416283512
+ ],
+ [
+ 24.91969585418701,
+ 60.164443619580226
+ ],
+ [
+ 24.92089748382568,
+ 60.16442226865825
+ ],
+ [
+ 24.920983314514157,
+ 60.16369632905707
+ ],
+ [
+ 24.91892337799072,
+ 60.163546868913166
+ ],
+ [
+ 24.915404319763184,
+ 60.16339740808949
+ ],
+ [
+ 24.913859367370605,
+ 60.16339740808949
+ ]
+ ],
+ [
+ [
+ 24.94943618774414,
+ 60.183547133154306
+ ],
+ [
+ 24.94969367980957,
+ 60.18105043355454
+ ],
+ [
+ 24.94999408721924,
+ 60.17979134209734
+ ],
+ [
+ 24.94999408721924,
+ 60.17831878406661
+ ],
+ [
+ 24.950551986694336,
+ 60.178233416358864
+ ],
+ [
+ 24.95068073272705,
+ 60.1785748858584
+ ],
+ [
+ 24.950509071350098,
+ 60.17979134209734
+ ],
+ [
+ 24.950509071350098,
+ 60.17998341001618
+ ],
+ [
+ 24.95166778564453,
+ 60.18047424514982
+ ],
+ [
+ 24.956259727478027,
+ 60.18205340406896
+ ],
+ [
+ 24.95922088623047,
+ 60.180623628299564
+ ],
+ [
+ 24.956817626953125,
+ 60.17951390867583
+ ],
+ [
+ 24.956603050231934,
+ 60.17910842484387
+ ],
+ [
+ 24.957289695739746,
+ 60.177955969776264
+ ],
+ [
+ 24.9574613571167,
+ 60.1767181026212
+ ],
+ [
+ 24.958319664001465,
+ 60.176291241060305
+ ],
+ [
+ 24.96046543121338,
+ 60.176227211347694
+ ],
+ [
+ 24.96170997619629,
+ 60.17554421997969
+ ]
+ ]
+ ]
+ }
+ }
+ ]
+} \ No newline at end of file
diff --git a/test/fixtures/geometry_data/multi_line_string_2.geojson b/test/fixtures/geometry_data/multi_line_string_2.geojson
new file mode 100644
index 0000000000..2e6484898b
--- /dev/null
+++ b/test/fixtures/geometry_data/multi_line_string_2.geojson
@@ -0,0 +1,88 @@
+{
+ "type": "FeatureCollection",
+ "features": [
+ {
+ "type": "Feature",
+ "properties": {
+ "stroke": "#77ea3a",
+ "stroke-width": 2,
+ "stroke-opacity": 1
+ },
+ "geometry": {
+ "type": "MultiLineString",
+ "coordinates": [[
+ [
+ 24.920940399169922,
+ 60.17014381943579
+ ],
+ [
+ 24.921412467956543,
+ 60.16785958842209
+ ],
+ [
+ 24.923558235168457,
+ 60.168585436051856
+ ],
+ [
+ 24.92694854736328,
+ 60.16963148236986
+ ],
+ [
+ 24.928836822509766,
+ 60.17014381943579
+ ],
+ [
+ 24.931025505065918,
+ 60.170858943230954
+ ]
+ ], [
+ [
+ 24.938535690307617,
+ 60.16965282990714
+ ],
+ [
+ 24.943599700927734,
+ 60.166365145750525
+ ],
+ [
+ 24.944028854370117,
+ 60.165511147991474
+ ],
+ [
+ 24.940338134765625,
+ 60.16435821580911
+ ],
+ [
+ 24.938278198242188,
+ 60.1635895718808
+ ],
+ [
+ 24.93424415588379,
+ 60.1623511632902
+ ]
+ ], [
+ [
+ 24.930660724639893,
+ 60.16620502286138
+ ],
+ [
+ 24.931282997131348,
+ 60.165778024675454
+ ],
+ [
+ 24.93199110031128,
+ 60.16524426914001
+ ],
+ [
+ 24.933085441589355,
+ 60.16446497048834
+ ],
+ [
+ 24.934523105621338,
+ 60.16340808388516
+ ]
+ ]]
+ }
+ }
+ ]
+} \ No newline at end of file
diff --git a/test/fixtures/geometry_data/multi_point_1.geojson b/test/fixtures/geometry_data/multi_point_1.geojson
new file mode 100644
index 0000000000..92ff62378b
--- /dev/null
+++ b/test/fixtures/geometry_data/multi_point_1.geojson
@@ -0,0 +1,91 @@
+{
+ "type": "FeatureCollection",
+ "features": [
+ {
+ "type": "Feature",
+ "properties": {},
+ "geometry": {
+ "type": "MultiPoint",
+ "coordinates": [[
+ 24.938492774963375,
+ 60.16980226227959
+ ], [
+ 24.938063621520996,
+ 60.16931126764639
+ ], [
+ 24.937269687652588,
+ 60.16984495711831
+ ], [
+ 24.93675470352173,
+ 60.16963148236986
+ ], [
+ 24.937162399291992,
+ 60.16934328925918
+ ], [
+ 24.938106536865234,
+ 60.17026122888812
+ ], [
+ 24.93896484375,
+ 60.16964215614023
+ ], [
+ 24.939308166503903,
+ 60.170346617317186
+ ], [
+ 24.937076568603516,
+ 60.170464026044776
+ ], [
+ 24.93623971939087,
+ 60.17009045136419
+ ], [
+ 24.936411380767822,
+ 60.169268572114106
+ ], [
+ 24.938857555389404,
+ 60.17032527023073
+ ], [
+ 24.938342571258545,
+ 60.171392607562005
+ ], [
+ 24.940145015716553,
+ 60.1709443301065
+ ], [
+ 24.93767738342285,
+ 60.17102971676008
+ ], [
+ 24.938321113586426,
+ 60.17082692309542
+ ], [
+ 24.9408745765686,
+ 60.170367964389776
+ ], [
+ 24.940080642700195,
+ 60.1720009743249
+ ], [
+ 24.939522743225098,
+ 60.171371261155215
+ ], [
+ 24.935853481292725,
+ 60.17111510319178
+ ], [
+ 24.936046600341797,
+ 60.17060278127276
+ ], [
+ 24.934716224670407,
+ 60.17005843047963
+ ], [
+ 24.934866428375244,
+ 60.16955676588021
+ ], [
+ 24.93574619293213,
+ 60.16927924600239
+ ], [
+ 24.93463039398193,
+ 60.17089096333529
+ ], [
+ 24.93673324584961,
+ 60.17158472459901
+ ]]
+ }
+ }
+ ]
+} \ No newline at end of file
diff --git a/test/fixtures/geometry_data/multi_point_2.geojson b/test/fixtures/geometry_data/multi_point_2.geojson
new file mode 100644
index 0000000000..396f579fdb
--- /dev/null
+++ b/test/fixtures/geometry_data/multi_point_2.geojson
@@ -0,0 +1,85 @@
+{
+ "type": "FeatureCollection",
+ "features": [
+ {
+ "type": "Feature",
+ "properties": {},
+ "geometry": {
+ "type": "MultiPoint",
+ "coordinates": [[
+ 24.941625595092773,
+ 60.16672808807713
+ ], [
+ 24.940338134765625,
+ 60.16613029857937
+ ], [
+ 24.94570255279541,
+ 60.16561789892518
+ ], [
+ 24.943084716796875,
+ 60.16516954267316
+ ], [
+ 24.947547912597656,
+ 60.16625839724445
+ ], [
+ 24.94896411895752,
+ 60.16777419352904
+ ], [
+ 24.94548797607422,
+ 60.16450767226291
+ ], [
+ 24.94870662689209,
+ 60.164998738682236
+ ], [
+ 24.942140579223633,
+ 60.164721180303474
+ ], [
+ 24.939351081848145,
+ 60.16510549128062
+ ], [
+ 24.943857192993164,
+ 60.16450767226291
+ ], [
+ 24.94038105010986,
+ 60.16435821580911
+ ], [
+ 24.942870140075684,
+ 60.163610923343796
+ ], [
+ 24.9459171295166,
+ 60.163610923343796
+ ], [
+ 24.940295219421383,
+ 60.16324794658606
+ ], [
+ 24.94295597076416,
+ 60.16279955799712
+ ], [
+ 24.9459171295166,
+ 60.162863613884376
+ ], [
+ 24.948406219482422,
+ 60.16367497764958
+ ], [
+ 24.947547912597656,
+ 60.165489797763136
+ ], [
+ 24.937763214111328,
+ 60.16275685400291
+ ], [
+ 24.943556785583496,
+ 60.16589544972972
+ ], [
+ 24.946088790893555,
+ 60.16711237558275
+ ], [
+ 24.942569732666016,
+ 60.16783823971963
+ ], [
+ 24.942612648010254,
+ 60.16196682010054
+ ]]
+ }
+ }
+ ]
+} \ No newline at end of file