Skip to main content
Version: 2.2.0

Concepts

Terminology & Relationships

When referring to different components in the GIS's map (the geospatial visualization), the terms in the diagram above will appear many times. This section server as a glossary and explanation as to what these terms mean. These models also having TypeScript typing in the form of types and interfaces, which can be found in the src/lib/aoh/gis/types.d.ts file. Not all types are listed here as some might be still in development or self-explanatory.

The types are namespaced with Gis, and many of them will have the "Map" prefix. As they are TypeScript types, they also cannot have a space in their name, so you might see them referred interchageably here with and without spaces (e.g. Base Layer is the concept and Gis.MapBaseLayer is the type representing it but they are essentially often the same thing).

Gis Map

The overall model that holds all the objects together. In the Svelte component, the GisMap holds the references to all the objects and passes them to children via Svelte contexts.

info

The TypeScript type representing this is Gis.GisMap.

Camera

What is currently being shown on the map. The view can be changed by modifying the camera's view, by passing in a Gis.CameraView object.

Bookmarks

Bookmarks are a collection of camera views that can be loaded to the current camera.

info

The TypeScript type representing this is Gis.MapBookmark.

Camera View

The structure that holds all information required to define what should be shown on the map. This includes Gis.EntityPosition, Gis.ZoomLevel, and Gis.Direction.

info

The TypeScript type representing this is Gis.CameraView.

Entity Position

An array that contains Longitude, Latitude in WGS84 format and optionally, Altitude in meters.

info

The TypeScript type representing this is Gis.EntityPosition.

Zoom Level

Valid zoom levels start from 0 and end at 20, see https://wiki.openstreetmap.org/wiki/Zoom_levels for a reference on how we use zoom levels.

info

The TypeScript type representing this is Gis.ZoomLevel.

Direction

Direction is an array with Pitch, Yaw, and Roll stored as euler angles in radians. This is identical to Cesium's HeadingPitchRoll as these 3 angles are compact way to store direction.

info

The TypeScript type representing this is Gis.Direction.

Layers

Layers are a way to logically group objects in the map. The main purposes of this grouping is to be able to:

  1. Show or hide groups of objects together
  2. Arrange the draw order of groups of objects

There are 2 types of layers in the Gis Map:

  1. Base Layers
  2. Entity Layers

Every Gis.MapLayer must specify a source for the Gis.Map to be able to load the data from.

info

The TypeScript type representing this is Gis.MapLayer.

Base Layer

Base layers are map layers that are typically static and covers large geographical areas. Examples of this includes terrain, roads and streets, oceans etc.

As these base layers cover huge areas - typically countries, continents or even the entire world, distributing these efficiently is critical and is usually handled by map tile servers.

Base layers can have different types of sources, elaborated below.

info

The TypeScript type representing this is Gis.MapBaseLayer.

Source

This source refers the source that provides the data for map base layers. At present, the two types of base layer sources are:

  • Xyz Source
  • GeoJSON Source
info

The TypeScript type representing this is Gis.MapSource.

Entity Layer

Entity layers are layers of geoentities. They can also be grouped into layers to allows us to control their visible ordering on the map, and visibility through the layer interface.

These layers' sources are defined by a map data structure, with the keys being their kind, and the values being the geoentity ids. Meaning, entities in the entity layer are segregated by Kind.

info

The TypeScript type representing this is Gis.MapEntityLayer.

Geoentity

Geoentities are the main model that the GIS works with. It is esentially a GeoJSON representation of whatever entity needs to be displayed on the map, with attributes stored in the "properties" section of the GeoJSON.

It also contains an additional entity_type field to support more GIS-specific classifications in the future.

info

The TypeScript type representing this is Gis.GeoEntity.

Geoentity Type

Geoentity types are a way for the GIS to differentiate behaviours available for different entities. There are currently are 4 entity types:

  • static

    Static entities that should not move.

  • track

    Entities that typically have their positions updated in real time.

  • geofence

    Geofence representations that can trigger events based on some rules

  • annotation

    Graphical overlays, for example, arrows to mark where to move

At present, these are simply reserved names as the geoentities are not processed differently based on type. These are important to have for features we plan to add in the future.

Entity Render Component

The entity render component is a Svelte component that developers are expected to supply to entity providers. This is an essential part of how developers can specify how entities are rendered on the map.

info

The render component is a Svelte snippet that should be supplied to point-based geoentities.

GeoJSON

Geoentities are all represented with GeoJSON. This is the completely standard GeoJSON format with one exception - under the arbitrary "properties" field, you may optionally specify Kind.

Geometry Styles

Geoentities that have geometry representations (in GeoJSON) require additional style information to describe how they should be rendered. For example, though a line can be represented with 2 points, it still needs style information such as thickness and colour.

Geometry styles deals with this, and contains these few simple properties:

  • stroke

    The colour of the stroke, following CSS colour rules.

  • stroke-opacity

    The opacity of lines, a number between 0 and 1.

  • stroke-width

    A non-negative number that represents the width of the line.

  • fill

    The fill colour of a shape, following CSS colour rules.

  • fill-opacity

    The opacity of the fill, a number between 0 and 1.

  • stroke-style

    A color following CSS colour rules.

  • outline-width

    The width of the outline, must be non-negative.

  • outline-opacity

    The opacity of outlines - between 0 and 1.

These geometry styles are associated to geoentities by their Kind.

info

The TypeScript type representing this is Gis.GeomStyle.

Geometry Interactions

Like styles, geometry interactions are grouped by Kind. For each kind, geometries can have a click and hover callback function, which users can specify by populating the GisMap.interactions object.

info

The TypeScript type representing this is Gis.MapGeomInteractions.

Kind

Business entities tend to be grouped into different kinds. The Kind attribute is meant to simply be a name that represents these different kinds.

For example, in the context of an airport, there might be many geoentities that are considered tracks (objects that constantly transmit telemetry, requiring their positions on the map to be updated in real-time).

  • Airplane
  • Fire Engine
  • Tractor (Tug)
  • Patrol
  • Passenger Bus

These would all be geoentity tracks in the GIS, however, they should be distinguished using the Kind attribute.

info

Kind is available as an optional property in the GeoJSON properties, represented with Gis.GeoEntityDataGeoJsonProperties and Gis.GeoEntityFeatureCollection