dbMongo.py
def groupByClassPolygonDB(self,date1):
        """This method allows to ask the DB for the polygons's classes list grouped by classes of specific date"""
        count = self.db.PolygonCollection.find({"properties.dateStr": date1}).count()
        print(count)
        if count > 0:
            result = True
            cursorClassPolygon = self.db.PolygonCollection.aggregate(
                [{"$match" : { "properties.dateStr" : date1 }},{"$group": {"_id":{"name" : "$properties.name","dateStr":"$properties.dateStr"},"count": {"$sum": 1}}}])
            return result,cursorClassPolygon
        else:
            result = False
            cursorClassPolygon = None
            return result, cursorClassPolygon
This method allows to ask the DB for the polygons's classes list grouped by classes of specific date
This method allows to ask the DB for the polygons's classes list grouped by classes of specific date
This method allows to ask the DB for the polygons ' s classes list grouped by classes of specific date
def groupByClassPolygonDB(self,date1):
        count = self.db.PolygonCollection.find({"properties.dateStr": date1}).count()
        print(count)
        if count > 0:
            result = True
            cursorClassPolygon = self.db.PolygonCollection.aggregate(
                [{"$match" : { "properties.dateStr" : date1 }},{"$group": {"_id":{"name" : "$properties.name","dateStr":"$properties.dateStr"},"count": {"$sum": 1}}}])
            return result,cursorClassPolygon
        else:
            result = False
            cursorClassPolygon = None
            return result, cursorClassPolygon
def groupByClassPolygonDB ( self , date1 ) : count = self . db . PolygonCollection . find ( { "properties.dateStr" : date1 } ) . count ( ) print ( count ) if count > 0 : result = True cursorClassPolygon = self . db . PolygonCollection . aggregate ( [ { "$match" : { "properties.dateStr" : date1 } } , { "$group" : { "_id" : { "name" : "$properties.name" , "dateStr" : "$properties.dateStr" } , "count" : { "$sum" : 1 } } } ] ) return result , cursorClassPolygon else : result = False cursorClassPolygon = None return result , cursorClassPolygon
This method allows to ask the DB for the polygons's classes list grouped by classes of specific date
This method allows to ask the DB for the polygons ' s classes list grouped by classes of specific date
"""This method allows to ask the DB for the polygons's classes list grouped by classes of specific date"""
self
date1