# Loading data

> Pick a project, choose which layers to load, refresh them, and work from the cache offline.

The toolbar button opens the project picker. Settings live under
**Web > GIMLabs for QGIS**.

## Picking a project

The dialog fetches **the 100 most recent projects**, not all of them. A firm
can have thousands, and pulling the lot every time you opened the dialog would
be dozens of blocking requests against a rate limit to build a list nobody
scrolls.

Type in the search box to search **by project reference or name**. The search
runs on the server, so it looks past the 100 you can see.

The status line always tells you what you are looking at, so a capped list
never masquerades as the whole estate. **Refresh projects** re-fetches it.

## Choosing layers

Tick what you want before loading:

| Layer | Default | Scope needed |
| --- | --- | --- |
| Locations | On | Locations |
| Site boundary | Off | Map |
| Location groups | Off | Map |

If your key is missing a scope the dialog says so on the row itself, rather
than letting you tick something that will fail.

Everything loads into a layer-tree group named for the project.

<Callout type="note">
Location groups have no stored geometry of their own. Their outline is a
convex hull drawn around their members' positions, so loading groups fetches
the locations too, even when the Locations layer is not ticked. A group with
fewer than three positioned members gets no outline, which is what Manage
does.
</Callout>

## Coordinates

A location can carry its position three ways, and the plugin prefers them in
this order:

1. **Surveyed latitude and longitude**, where your configuration maps those
   fields.
2. **Surveyed easting and northing**, which is what most UK ground
   investigation actually records.
3. **Map placement**, the position someone pinned on the map in Manage.

Surveyed coordinates beat a pin, because a pin is an estimate made to get a
borehole onto a drawing and is often nowhere near the real hole.

The API does not publish which grid an easting and northing are in, so the
load dialog asks. **Grid for easting/northing** defaults to EPSG:27700,
British National Grid.

Every feature records which of the three placed it, and the load summary counts
locations that could not be placed at all. A layer that quietly drops a third
of its boreholes is worse than one that says so.

<Callout type="tip">
If QGIS offers to download the **OSTN15** grid file for British National Grid,
you do not need it. The plugin permits the fallback transform, which is
accurate to roughly 2m against OSTN15's 1m. For plotting boreholes as map
context that difference is smaller than the symbol. Install it if you like and
QGIS will use it automatically.
</Callout>

## Refreshing

**Refresh layers** re-fetches the project you loaded last and replaces its
layer group.

Loading a project that is already on the map replaces its group rather than
stacking a second copy, so loading twice refreshes rather than duplicating.

## Working offline

Responses and marker artwork are cached under your QGIS profile directory. A
laptop that has loaded a project once can load it again with **no signal**,
which on a site with no reception is the difference between having the data and
not.

Three rules worth knowing:

- **Only a network failure falls back to the cache.** A permissions error or a
  missing project is a real answer, and serving stale data over it would hide
  the problem. You need to know your key lost a scope, not quietly keep seeing
  last week's boundaries.
- **When cached data is used, the status line says so first**, leading with how
  old it is, so nobody presents from stale data without being told.
- **Cached responses expire after 7 days.** Long enough for a week in the
  field, short enough that "offline" cannot quietly become "last season's
  data".

<Callout type="warning">
This is client project data at rest on the machine. **Clear cache** in the
settings dialog removes it, and then reloads the project list so clearing the
cache does not itself leave you with nothing.
</Callout>

## What you get in the attribute table

Locations come in keyed on **`locationId`**, which is the LOCA_ID your team
already uses. That is also the layer's display expression, so identify results
and map tips show the location identifier rather than something internal.

**No database identifier is carried as a field at all.** QGIS offers every
field in the layer when you pick a label, and there is no setting that removes
one from that list, so the only way to stop someone labelling a map with an
internal id is not to bring one in.

The layer also carries the columns the symbology needs, and QGIS would offer
those as label fields too. They are therefore **hidden by default** in the
attribute table and the form. They are still there: the renderer reads them,
and you can unhide them if you want to see what it is doing.
