summaryrefslogtreecommitdiff
path: root/jstests/core/geo_big_polygon3.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/core/geo_big_polygon3.js')
-rw-r--r--jstests/core/geo_big_polygon3.js117
1 files changed, 58 insertions, 59 deletions
diff --git a/jstests/core/geo_big_polygon3.js b/jstests/core/geo_big_polygon3.js
index 5adae06102e..424510f521a 100644
--- a/jstests/core/geo_big_polygon3.js
+++ b/jstests/core/geo_big_polygon3.js
@@ -28,21 +28,20 @@ coll.drop();
var objects = [
{name: "point with strictCRS", type: "Point", coordinates: [-97.9, 0], crs: strictCRS},
{
- name: "multipoint with strictCRS",
- type: "MultiPoint",
- coordinates: [[-97.9, 0], [-10.9, 0]],
- crs: strictCRS
+ name: "multipoint with strictCRS",
+ type: "MultiPoint",
+ coordinates: [[-97.9, 0], [-10.9, 0]],
+ crs: strictCRS
},
{
- name: "line with strictCRS",
- type: "LineString",
- coordinates: [[-122.1611953, 37.4420407], [-118.283638, 34.028517]],
- crs: strictCRS
+ name: "line with strictCRS",
+ type: "LineString",
+ coordinates: [[-122.1611953, 37.4420407], [-118.283638, 34.028517]],
+ crs: strictCRS
}
];
objects.forEach(function(o) {
-
// within
assert.throws(function() {
coll.count({geo: {$geoWithin: {$geometry: o}}});
@@ -99,34 +98,34 @@ assert.commandWorked(coll.dropIndex({geo: "2dsphere"}), "drop 2dsphere index");
objects = [
{
- name: "NYC Times Square - point",
- geo: {type: "Point", coordinates: [-73.9857, 40.7577], crs: strictCRS}
+ name: "NYC Times Square - point",
+ geo: {type: "Point", coordinates: [-73.9857, 40.7577], crs: strictCRS}
},
{
- name: "NYC CitiField & JFK - multipoint",
- geo: {
- type: "MultiPoint",
- coordinates: [[-73.8458, 40.7569], [-73.7789, 40.6397]],
- crs: strictCRS
- }
+ name: "NYC CitiField & JFK - multipoint",
+ geo: {
+ type: "MultiPoint",
+ coordinates: [[-73.8458, 40.7569], [-73.7789, 40.6397]],
+ crs: strictCRS
+ }
},
{
- name: "NYC - Times Square to CitiField to JFK - line/string",
- geo: {
- type: "LineString",
- coordinates: [[-73.9857, 40.7577], [-73.8458, 40.7569], [-73.7789, 40.6397]],
- crs: strictCRS
- }
+ name: "NYC - Times Square to CitiField to JFK - line/string",
+ geo: {
+ type: "LineString",
+ coordinates: [[-73.9857, 40.7577], [-73.8458, 40.7569], [-73.7789, 40.6397]],
+ crs: strictCRS
+ }
},
{
- name: "NYC - Times Square to CitiField to JFK to Times Square - polygon",
- geo: {
- type: "Polygon",
- coordinates: [
- [[-73.9857, 40.7577], [-73.7789, 40.6397], [-73.8458, 40.7569], [-73.9857, 40.7577]]
- ],
- crs: strictCRS
- }
+ name: "NYC - Times Square to CitiField to JFK to Times Square - polygon",
+ geo: {
+ type: "Polygon",
+ coordinates: [
+ [[-73.9857, 40.7577], [-73.7789, 40.6397], [-73.8458, 40.7569], [-73.9857, 40.7577]]
+ ],
+ crs: strictCRS
+ }
}
];
@@ -165,44 +164,44 @@ coll.remove({});
// Objects should be found from query
objects = [
{
- name: "NYC Times Square - point crs84CRS",
- geo: {type: "Point", coordinates: [-73.9857, 40.7577], crs: crs84CRS}
+ name: "NYC Times Square - point crs84CRS",
+ geo: {type: "Point", coordinates: [-73.9857, 40.7577], crs: crs84CRS}
},
{
- name: "NYC Times Square - point epsg4326CRS",
- geo: {type: "Point", coordinates: [-73.9857, 40.7577], crs: epsg4326CRS}
+ name: "NYC Times Square - point epsg4326CRS",
+ geo: {type: "Point", coordinates: [-73.9857, 40.7577], crs: epsg4326CRS}
},
{
- name: "NYC CitiField & JFK - multipoint crs84CRS",
- geo: {
- type: "MultiPoint",
- coordinates: [[-73.8458, 40.7569], [-73.7789, 40.6397]],
- crs: crs84CRS
- }
+ name: "NYC CitiField & JFK - multipoint crs84CRS",
+ geo: {
+ type: "MultiPoint",
+ coordinates: [[-73.8458, 40.7569], [-73.7789, 40.6397]],
+ crs: crs84CRS
+ }
},
{
- name: "NYC CitiField & JFK - multipoint epsg4326CRS",
- geo: {
- type: "MultiPoint",
- coordinates: [[-73.8458, 40.7569], [-73.7789, 40.6397]],
- crs: epsg4326CRS
- }
+ name: "NYC CitiField & JFK - multipoint epsg4326CRS",
+ geo: {
+ type: "MultiPoint",
+ coordinates: [[-73.8458, 40.7569], [-73.7789, 40.6397]],
+ crs: epsg4326CRS
+ }
},
{
- name: "NYC - Times Square to CitiField to JFK - line/string crs84CRS",
- geo: {
- type: "LineString",
- coordinates: [[-73.9857, 40.7577], [-73.8458, 40.7569], [-73.7789, 40.6397]],
- crs: crs84CRS
- }
+ name: "NYC - Times Square to CitiField to JFK - line/string crs84CRS",
+ geo: {
+ type: "LineString",
+ coordinates: [[-73.9857, 40.7577], [-73.8458, 40.7569], [-73.7789, 40.6397]],
+ crs: crs84CRS
+ }
},
{
- name: "NYC - Times Square to CitiField to JFK - line/string epsg4326CRS",
- geo: {
- type: "LineString",
- coordinates: [[-73.9857, 40.7577], [-73.8458, 40.7569], [-73.7789, 40.6397]],
- crs: epsg4326CRS
- }
+ name: "NYC - Times Square to CitiField to JFK - line/string epsg4326CRS",
+ geo: {
+ type: "LineString",
+ coordinates: [[-73.9857, 40.7577], [-73.8458, 40.7569], [-73.7789, 40.6397]],
+ crs: epsg4326CRS
+ }
}
];