GeoWithin class
The geoWithin operator supports querying geographic points within a given geometry. Only points are returned, even if indexShapes value is true in the index definition.
You can query points within a:
- Circle
- Bounding box
- Polygon
When specifying the coordinates to search, longitude must be specified first and then the latitude. Longitude values can be between -180 and 180, both inclusive. Latitude values can be between -90 and 90, both inclusive. Coordinate values can be integers or doubles.
Example
Expected result:
"geoWithin": {
"path": "address.location",
"box": {
"bottomLeft": {
"type": "Point",
"coordinates": [112.467, -55.050]
},
"topRight": {
"type": "Point",
"coordinates": [168.000, -9.133]
}
}
}
- Inheritance
Constructors
- GeoWithin.new({Box? box, Circle? circle, Geometry? geometry, required dynamic path, ScoreModify? score})
-
box
- Object that specifies the bottom left and top right GeoJSON points of a box to search within. The object takes the following fields:
Properties
- content → ExpressionContent
-
no setterinherited
-
entry
↔ MapEntry<
String, ExpressionContent> -
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → String
-
no setterinherited
- operator → String
-
no setterinherited
- rawContent → dynamic
-
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
build(
) → MongoDocument -
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited