Guest User

Untitled

a guest
Oct 18th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. db.getCollection('houses').find({
  2. 'coordinates_geojson.coordinates.1': {
  3. '$lte': 20.49584842128357,
  4. '$gte': 20.458539491985142
  5. },
  6. 'coordinates_geojson.coordinates.0': {
  7. '$lte': -103.4088134765625,
  8. '$gte': -103.47747802734375
  9. }
  10. })
  11.  
  12. db.getCollection('houses').find({
  13. "coordinates_geojson": {
  14. "$geoWithin": {
  15. "$geometry": {
  16. "type": "MultiPolygon",
  17. "coordinates": [
  18. [
  19. [
  20. [
  21. -103.47747802734375,
  22. 20.458539491985142
  23. ],
  24. [
  25. -103.4088134765625,
  26. 20.458539491985142
  27. ],
  28. [
  29. -103.4088134765625,
  30. 20.49584842128357
  31. ],
  32. [
  33. -103.47747802734375,
  34. 20.49584842128357
  35. ],
  36. [
  37. -103.47747802734375,
  38. 20.458539491985142
  39. ]
  40. ]
  41. ]
  42. ]
  43. }
  44. }
  45. }
  46. })
Add Comment
Please, Sign In to add comment