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.
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:
- #1635: Add option for bookmarks: "this project only" (5 years old)
- #7715: Import/export functionality for geospatial bookmarks
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.
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
.. 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.