Skip to content

Commit

Permalink
Convert test/in to GeometryCollection
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisCarriere committed Sep 16, 2017
1 parent a6238d9 commit c04ccd5
Show file tree
Hide file tree
Showing 13 changed files with 367 additions and 202 deletions.
2 changes: 1 addition & 1 deletion packages/turf-nearest-point-to-line/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ test('turf-nearest-point-to-line', t => {
'marker-size': 'large',
'marker-symbol': 'star'
});
const results = featureCollection([nearest, line]);
const results = featureCollection([points, nearest, line]);

if (process.env.REGEN) write.sync(directories.out + filename, results);
t.deepEqual(results, load.sync(directories.out + filename), name);
Expand Down
58 changes: 19 additions & 39 deletions packages/turf-nearest-point-to-line/test/in/fiji.geojson
Original file line number Diff line number Diff line change
Expand Up @@ -2,75 +2,55 @@
"type": "FeatureCollection",
"features": [
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Feature",
"properties": {},
"geometry": {
"type": "GeometryCollection",
"geometries": [
{
"type": "Point",
"coordinates": [
180.60699462890625,
-16.62303335009946
]
}
},
{
"type": "Feature",
"properties": {},
"geometry": {
},
{
"type": "Point",
"coordinates": [
181.0986328125,
-17.027898881942694
]
}
},
{
"type": "Feature",
"properties": {},
"geometry": {
},
{
"type": "Point",
"coordinates": [
179.10186767578125,
-17.413546114374437
]
}
},
{
"type": "Feature",
"properties": {},
"geometry": {
},
{
"type": "Point",
"coordinates": [
180.516357421875,
-17.287709050621917
]
}
},
{
"type": "Feature",
"properties": {},
"geometry": {
},
{
"type": "Point",
"coordinates": [
179.37103271484375,
-16.691447830122993
]
}
},
{
"type": "Feature",
"properties": {},
"geometry": {
},
{
"type": "Point",
"coordinates": [
180.25817871093747,
-16.95435146120393
]
}
}
]
]
}
},
{
"type": "Feature",
Expand Down Expand Up @@ -98,4 +78,4 @@
}
}
]
}
}
82 changes: 25 additions & 57 deletions packages/turf-nearest-point-to-line/test/in/on-line.geojson
Original file line number Diff line number Diff line change
Expand Up @@ -2,108 +2,76 @@
"type": "FeatureCollection",
"features": [
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Feature",
"properties": {},
"geometry": {
"type": "GeometryCollection",
"geometries": [
{
"type": "Point",
"coordinates": [
-23.62060546875,
15.050905707724771
]
}
},
{
"type": "Feature",
"properties": {},
"geometry": {
},
{
"type": "Point",
"coordinates": [
-22.813110351562496,
16.093320185359257
]
}
},
{
"type": "Feature",
"properties": {},
"geometry": {
},
{
"type": "Point",
"coordinates": [
-23.1646728515625,
15.220589019578128
]
}
},
{
"type": "Feature",
"properties": {},
"geometry": {
},
{
"type": "Point",
"coordinates": [
-24.4061279296875,
14.966013251567164
]
}
},
{
"type": "Feature",
"properties": {},
"geometry": {
},
{
"type": "Point",
"coordinates": [
-22.93670654296875,
16.759837823776632
]
}
},
{
"type": "Feature",
"properties": {},
"geometry": {
},
{
"type": "Point",
"coordinates": [
-24.3182373046875,
16.609873919524187
]
}
},
{
"type": "Feature",
"properties": {},
"geometry": {
},
{
"type": "Point",
"coordinates": [
-24.98291015625,
16.867633616803836
]
}
},
{
"type": "Feature",
"properties": {},
"geometry": {
},
{
"type": "Point",
"coordinates": [
-25.191650390625,
17.056784609942554
]
}
},
{
"type": "Feature",
"properties": {},
"geometry": {
},
{
"type": "Point",
"coordinates": [
-22.818603515625,
15.31597593426845
]
}
}
]
]
}
},
{
"type": "Feature",
Expand Down Expand Up @@ -143,4 +111,4 @@
}
}
]
}
}
34 changes: 13 additions & 21 deletions packages/turf-nearest-point-to-line/test/in/one.geojson
Original file line number Diff line number Diff line change
Expand Up @@ -5,42 +5,34 @@
},
"features": [
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Feature",
"properties": {},
"geometry": {
"type": "GeometryCollection",
"geometries": [
{
"type": "Point",
"coordinates": [
29.7509765625,
17.5602465032949
]
}
},
{
"type": "Feature",
"properties": {},
"geometry": {
},
{
"type": "Point",
"coordinates": [
28.388671875,
18.323240460443397
]
}
},
{
"type": "Feature",
"properties": {},
"geometry": {
},
{
"type": "Point",
"coordinates": [
29.619140624999996,
19.228176737766262
]
}
}
]
]
}
},
{
"type": "Feature",
Expand Down Expand Up @@ -68,4 +60,4 @@
}
}
]
}
}
42 changes: 15 additions & 27 deletions packages/turf-nearest-point-to-line/test/in/resolute.geojson
Original file line number Diff line number Diff line change
Expand Up @@ -2,53 +2,41 @@
"type": "FeatureCollection",
"features": [
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Feature",
"properties": {},
"geometry": {
"type": "GeometryCollection",
"geometries": [
{
"type": "Point",
"coordinates": [
-94.04296874999999,
75.24186616026972
]
}
},
{
"type": "Feature",
"properties": {},
"geometry": {
},
{
"type": "Point",
"coordinates": [
-75.1025390625,
74.66001636880338
]
}
},
{
"type": "Feature",
"properties": {},
"geometry": {
},
{
"type": "Point",
"coordinates": [
-87.2314453125,
75.50815837230884
]
}
},
{
"type": "Feature",
"properties": {},
"geometry": {
},
{
"type": "Point",
"coordinates": [
-95.8447265625,
71.80141030136785
]
}
}
]
]
}
},
{
"type": "Feature",
Expand Down Expand Up @@ -76,4 +64,4 @@
}
}
]
}
}
Loading

0 comments on commit c04ccd5

Please sign in to comment.