Пример #1
0
def pushMapObjToWmsDatabaseIndex(mapObj, layerId, dbsession):
    """ Function adds a record to an wms database index.

    :type georeference.models.vkdb.map.Map: mapObj
    :type int: layerId
    :type sqlalchemy.orm.session.Session: dbsession """
    if mapObj.isttransformiert == True:
        refmapslayer = RefMapLayer.by_id(layerId, mapObj.id, dbsession)
        if not refmapslayer:
            refmapslayer = RefMapLayer(layerid=layerId, mapid=mapObj.id)
            dbsession.add(refmapslayer)