Open your project in QGIS
Everything in a project that has a place on a map can be opened in QGIS: wells, formation tops, wellbore paths, point sets, fault sticks and the features of GIS files as layers through one connection (OGC API – Features), and grid and triangulated surfaces through the Ophiolite plug-in. QGIS shows only what you may read: a colleague who cannot read an item does not see it, and a layer that holds nothing you may read is empty, not refused.
Checked with QGIS 4.2.2, with the OGC API – Features test suite 1.9 over every collection and with the plug-in across a restart.
Start in Ophiolite
Section titled “Start in Ophiolite”Open the project, choose Applications and the QGIS card. The screen says:
Your project is ready to open in QGIS
- On your account page, under Project access keys, create a read-only key and use its Copy button.
- In QGIS choose Layer > Add Layer > Add WFS / OGC API - Features Layer, create a connection to the address below, choose OGC API - Features (do not use Detect) and pick your key.
- For surfaces install the Ophiolite plug-in, sign in and add the surface; it stays on its version until you choose Get latest.
Address
https://ophiolite.example/api/v1/projects/my-project/features· Copy addressQGIS shows only what you may read.
Step 2 needs the key in a QGIS authentication configuration of type API Header (header Authorization, value
Bearer and the key). Wells on a map shows how to check the key with
ophiolite doctor --online, how to put exactly the key on the clipboard, and what each refusal means.
The layers
Section titled “The layers”The connection lists one collection per kind of layer. Add the ones you need; each opens as its own layer with the title in the second column.
| Collection | Title in QGIS | One feature is | Geometry |
|---|---|---|---|
wells | Wells | a well, at its location | point |
tops | Tops | one formation top of a tops file, at its wellbore’s location | point |
wellbore-paths | Wellbore paths | a wellbore’s survey, drawn from its location | line |
point-sets | Point sets | one point of a point set, with its value | point |
lines | Lines | one fault stick | line |
feature-points | Feature points | a point feature of a GIS file | point |
feature-lines | Feature lines | a line feature of a GIS file | line |
feature-polygons | Feature polygons | a polygon feature of a GIS file | polygon |
QGIS takes one geometry type per layer, so a GIS file with points, lines and polygons appears in three layers.
Every feature carries source_asset_id and source_revision, the exact version it was read from; the newest
version you may read is shown.
When a feature cannot be placed
Section titled “When a feature cannot be placed”A feature that cannot be put on the map is still in the attribute table, without a geometry, and its placement
property says why, for example:
- This wellbore has no location you may read, so its tops cannot be placed.
- This wellbore has no location you may read, so its path cannot be placed.
- This survey is measured from true north, so it is not drawn on the map. Its owner can republish it with azimuths given from grid north.
- This survey does not state that its azimuths are from grid north, so it is not drawn on the map.
- This survey does not start at its depth datum, so its line cannot be placed.
- A line needs at least two stations.
- Not stated: no coordinate system is declared for this layer.
- This layer’s coordinate system is not one this server converts to.
QGIS shows a layer whose features all lack a geometry as a table without a map (a fault-stick file that declares no coordinate system, for example).
Surfaces with the plug-in
Section titled “Surfaces with the plug-in”Grid surfaces open as a raster layer, triangulated surfaces as a mesh layer: the exact vertices, with values between them interpolated linearly in each triangle. Install the Ophiolite plug-in (Plugins › Manage and Install Plugins › Install from ZIP), open its panel (Ophiolite maps), sign in and choose Add a map…: the list holds the surfaces you may read at their newest version.
A surface you add stays on its version. Its row in the panel then offers:
- Get latest, when a newer version has been published; nothing changes on your map until you choose it. A version that arrives damaged is refused and the layer keeps what it showed.
- Go back, to the version shown before the last Get latest.
- Keep a separate copy: the layer stays as it is and is no longer checked for new versions. Add the surface again to follow it once more.
If the newest version of a surface is withdrawn, the layer keeps the version it holds, also after a restart, and adding it again is refused with: “You can no longer see this item. It may have been removed or is no longer shared with you. Your map is unchanged.” A surface the plug-in will not draw says why, for example “This surface does not state its coordinate system, so it cannot be placed on the map.” or “QGIS cannot show this: it is larger than QGIS can receive here (32 MiB).”
The same layers in Python
Section titled “The same layers in Python”The layers are plain HTTP: any program that can send a key can read them, and QGIS sends nothing more. This reads
every feature of every collection with your SDK client (Sign in), a hundred at a time, following each
page’s next link:
headers = client.credential.headers(client.url, client.project)address = client.url + '/api/v1/projects/' + client.project + '/features'layers = {}for collection in client.http.get(address + '/collections', headers=headers).json()['collections']: url, features = address + '/collections/' + collection['id'] + '/items?limit=100', [] while url: page = client.http.get(url, headers=headers).json() features += page['features'] url = next((link['href'] for link in page['links'] if link['rel'] == 'next'), None) layers[collection['id']] = featuresprint({name: len(features) for name, features in layers.items()})A feature without a geometry keeps its reason in properties['placement']. Add &crs= and an OGC CRS URI to an
items address to have the coordinates converted, as QGIS does.
The surfaces the plug-in lists are among the project’s scientific assets you may read; this lists them all:
listing = client.http.get(client.url + '/api/v1/projects/' + client.project + '/scientific-assets?limit=100', headers=headers).json()surfaces = [(item['name'], item['asset_id'], item['revision']) for item in listing['items']]print(surfaces)The gallery notebook “Layers for a GIS” reads them the same way and draws the wellbore paths in plan view.
