2

My students send me QGIS map files that when I open them have been stripped of the bookmarks. Is there a setting I'm missing or is the normal case.

1
  • 1
    What version of QGIS? – Mapperz Jan 27 '14 at 18:44
6

The geospatial bookmarks are stored globally in the user's database at ~/.qgis2/qgis.db. None of the bookmarks are stored with the .qgs project file. There are two feature requests concerning this:

Storing some of the bookmarks in the current project file is a very good idea, but is unimplemented at this time (up to and including next QGIS release, 2.2).

As a workaround, the qgis.db file is a simple SQLite database, which can be opened and the tbl_bookmarks rows exported, via a Python script. The project's name is included in the table's fields, so an import into a master qgis.db would retain this; useful if the project names unique, painstaking, if not.

Alternatively, it would be a fairly good introductory coding exercise to create a PyQGIS plugin that mimics the geospatial bookmarks at the project level, storing/reading/displaying and editing/deleting them from project properties via Python. Such a plugin could be rolled out to all of your students, providing exactly what you are looking for, without having to wait for the core functionality in QGIS to be implemented.

1
  • Note this feature has been merged for 2.16 release – Nathan W May 18 '16 at 14:47
1

update (as of QGIS 2.16 I believe, as per NathanW comment), there's an export function to make the bookmarks shareable as an XML file.

This can also be useful for backing up bookmarks, as once you delete them they're gone

enter image description here

.. also it's possible to store the bookmark in the project by checking the 'In project' box (see changelog). You may need to use the scrollbar to see this column.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.