Exemple #1
0
        maps=maps,
        file=file,
        start=start,
        end=end,
        unit=unit,
        increment=increment,
        dbif=None,
        interval=interval,
        fs=separator,
    )


###############################################################################

if __name__ == "__main__":
    options, flags = grass.parser()

    # lazy imports
    import grass.temporal as tgis

    try:
        from builtins import StandardError
    except ImportError:
        # python 3
        StandardError = Exception

    try:
        tgis.profile_function(main)
    except StandardError as e:
        grass.fatal(e)
Exemple #2
0
                    if type == "stvds":
                        remove(type="vector", name=name_list, run_=True)
                    if type == "str3ds":
                        remove(type="raster_3d", name=name_list, run_=True)
                    map_statement = ""
                    name_list = []

            if map_statement:
                dbif.execute_transaction(map_statement)
            if name_list:
                if type == "strds":
                    remove(type="raster", name=name_list, run_=True)
                if type == "stvds":
                    remove(type="vector", name=name_list, run_=True)
                if type == "str3ds":
                    remove(type="raster_3d", name=name_list, run_=True)
        else:
            grass.message(_("Note: registered maps themselves have not been removed, only the %s" % type))

        statement += sp.delete(dbif=dbif, execute=False)

    # Execute the collected SQL statenents
    dbif.execute_transaction(statement)

    dbif.close()

if __name__ == "__main__":
    options, flags = grass.parser()
    
    tgis.profile_function(main)