dbMongo.py
def deletePolygonDB(self,id):
        """This method allows to remove polygon"""
        count = self.db.PolygonCollection.count({"_id":ObjectId(id)})
        print(count)
        if count == 1:
            result1 = self.db.PolygonCollection.delete_one({"_id":ObjectId(id)})
            print("Number polygon removed {}".format(result1.deleted_count))
            result = "correct"
            return result
        elif count == 0:
            print("polygon already removed")
            result = "empty"
            return result
        else:
            print("error: DB inconsistent")
            result = "inconsistent"
            return result
This method allows to remove polygon
This method allows to remove polygon
This method allows to remove polygon
def deletePolygonDB(self,id):
        count = self.db.PolygonCollection.count({"_id":ObjectId(id)})
        print(count)
        if count == 1:
            result1 = self.db.PolygonCollection.delete_one({"_id":ObjectId(id)})
            print("Number polygon removed {}".format(result1.deleted_count))
            result = "correct"
            return result
        elif count == 0:
            print("polygon already removed")
            result = "empty"
            return result
        else:
            print("error: DB inconsistent")
            result = "inconsistent"
            return result
def deletePolygonDB ( self , id ) : count = self . db . PolygonCollection . count ( { "_id" : ObjectId ( id ) } ) print ( count ) if count == 1 : result1 = self . db . PolygonCollection . delete_one ( { "_id" : ObjectId ( id ) } ) print ( "Number polygon removed {}" . format ( result1 . deleted_count ) ) result = "correct" return result elif count == 0 : print ( "polygon already removed" ) result = "empty" return result else : print ( "error: DB inconsistent" ) result = "inconsistent" return result
This method allows to remove polygon
This method allows to remove polygon
"""This method allows to remove polygon"""
self
id