Exporters are interfaces between this application and clients and tools that use asset location information.
Exporters make data on tracked assets and their positions available in a format and over a protocol other applications accept. Some exporters are more generic and used by other, more specific, exporters to avoid repeating work.
Exporters inherit from an abstract assets_tracking_service.exporters.base_exporter.Exporter base class which defines
a public interface. These public methods typically call private methods to:
- select required data
- format it for use
- output and host data in a suitable file format or push directly into other applications
Exporters MAY use Database views to select relevant data.
Exporters MAY depend on the outputs of other exporters (and so require these to be enabled and suitably configured).
A central assets_tracking_service.exporters.exporters_manager.ExportersManager class exports data for all enabled
Exporters using their common public interface.
See the Configuration documentation for options to disable exporters.
Note
An error will occur if an exporter that another (enabled) exporter depends upon is disabled.
See Infrastructure documentation for credentials required by these exporters.
ArcGIS is a geospatial data hosting, publishing and analysis platform used by BAS.
The ArcGIS exporter publishes each Layer to ArcGIS Online using the BAS Esri Utilities library as a:
Tip
These exports are intended for use by end-users and downstream services (such as the Embedded Maps Service 🛡️).
Feature Layer items are associated with an underlying Feature Service, which for this project is seeded from a GeoJSON item, updated by this application. Separate layers and services are hosted in the ArcGIS Online subscription for each Environment.
A folder within the AGOL user account used for publishing, and a group within each ArcGIS subscription, are created automatically to organise content:
Note
This exporter is opinionated as it always:
- assumes all Layers are vector (and can/should be published as Feature Layers)
- creates a set of GeoJSON, Feature Service/Layer and OGC API Features Layer items
- stores items it creates in a
prj-assets-tracking-servicefolder - adds items to an
Assets Tracking Servicegroup, except GeoJSON items (as they are an implementation detail) - shares items publicly, except GeoJSON items (which are private as they are an implementation detail)
- sets ArcGIS item metadata from, and links to, an associated BAS data catalogue record
Feature layer's schemas are based on the source view for each Layer.
An additional ObjectID attribute is automatically included in each schema by ArcGIS. This attribute MUST be
considered an implementation detail and values MUST be hidden from end-users to the extent possible.
Warning
ObjectID values MUST NOT be considered stable and MAY change or reused/reassigned without warning.
Content is shared publicly, except for underlying GeoJSON items, as they are implementation detail that should not be relied upon.
Required exporters (MUST be enabled):
Within each ArcGIS Online organisation a user for publishing content MUST be provisioned, which:
- MUST be assigned the
creatoruser type - MUST be assigned the
administratorrole (to create restricted groups) - MUST NOT have multi-factor authentication enabled (to allow non-interactive authentication)
- SHOULD be the conventional
app_automation_bas/app_automation_bas_testshared automation user
Required options:
EXPORTER_ARCGIS_USERNAME: username of publishing userEXPORTER_ARCGIS_PASSWORD: password of publishing userEXPORTER_ARCGIS_BASE_ENDPOINT_PORTAL: base endpoint for the ArcGIS portal instanceEXPORTER_ARCGIS_BASE_ENDPOINT_SERVER: base endpoint for the ArcGIS hosting server associated with the portalEXPORTER_ARCGIS_FOLDER_NAME: folder exporter will publish content withinEXPORTER_ARCGIS_GROUP_INFO: information needed to create the group published content will be shared with
The base endpoints are currently assumed to be ArcGIS Online organisations which use the form:
https://<org>.maps.arcgis.comhttps://services<hive>.arcgis.com/<org>/arcgis/
See the Infrastructure documentation for values to use for BAS AGOL organisations.
The folder name and group information are hard-coded values and do not need to be set. File references within the
group information are relative to: src/assets_tracking_service/resources/arcgis_group/
The BAS Data Catalogue is data discovery tool used to find, evaluate and access datasets, products, services and other resources produced, managed or used by the British Antarctic Survey and UK Polar Data Centre.
This exporter creates and maintains metadata records for each Layer using an associated Record within a Collection.
Records are grouped by a collection record representing all outputs from this project.
See the README for more information.
Records created by this exporter use the BAS ISO 19115 JSON schema, maintained as part of the BAS Metadata Library.
Records additionally conform to the BAS MAGIC Discovery Profile (v1).
Records additionally conform to the BAS MAGIC Administration (v1).
Metadata records combine information from multiple sources:
- Records provide static values for properties such as title, abstract, etc.
- Layers, managed by the ArcGIS exporter, define distribution options and extents
The Non-Interactive
Data Catalogue publishing workflow is used to publish records exported to the directory specified by the
EXPORTER_DATA_CATALOGUE_OUTPUT_PATH config option.
Required options:
EXPORTER_DATA_CATALOGUE_OUTPUT_PATH:- path to the directory that will contain catalogue records for publishing
- the application will try to create any missing parent directories to this directory if needed
- e.g.
./exports
EXPORTER_DATA_CATALOGUE_ADMIN_METADATA_ENCRYPTION_KEY_PRIVATE- JSON encoded JSON Web Key (JWK) for encrypting administrative metadata
EXPORTER_DATA_CATALOGUE_ADMIN_METADATA_SIGNING_KEY_PRIVATE- JSON encoded JSON Web Key (JWK) for signing administrative metadata