0

I'm testing this implementation from thread and blog for importing bookmarks via the console:

This test code:

import sqlite3
dbPath = QgsApplication.qgisUserDatabaseFilePath() # the name of this method changed from the links
db = sqlite3.connect(dbPath)
cursor = db.cursor()

cursor.execute("""INSERT INTO tbl_bookmarks(bookmark_id, name, project_name,xmin, ymin, xmax, ymax,projection_srid)VALUES(NULL, 'Name1', 'Group1', 1809782.0338653976, 5461831.848696201, 1827540.9027164688, 5464488.270675712, 2193)""")
cursor.execute("""INSERT INTO tbl_bookmarks(bookmark_id, name, project_name,xmin, ymin, xmax, ymax,projection_srid)VALUES(NULL, 'Name2', 'Group1', 1804512.8556000944, 5453390.580880025, 1813512.8556000944, 5461390.580880025, 2193)""")

db.commit()

Runs to completion, though I can't actually see any new bookmarks in the Spatial Bookmarks pane.

Any suggestions?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.