Group by date: db.getCollection('images').aggregate( [ { $group: { _id : { month: { $month: "$datetime.utc_timestamp" }, day: { $dayOfMonth: "$datetime.utc_timestamp" }, year: { $year: "$datetime.utc_timestamp" } }, count: { $sum: 1 }, latitude: { $avg: "$latitude"}, longitude: { $avg: "$longitude"}, } } ] ) Creating a 2-D geospatial index on an Earth-spheroid. db.images.createIndex({"location": "2dsphere"}) Finding documents near a point: db.images.find({ "location": { $near: { $geometry: { ...