<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>MOVE: Interactive Visual Exploration of Moving Objects</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Maxime Schoemans</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Mahmoud Sakr</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Esteban Zimányi</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Ain Shams University</institution>
          ,
          <addr-line>Cairo</addr-line>
          ,
          <country country="EG">Egypt</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Université Libre de Bruxelles</institution>
          ,
          <addr-line>Brussels</addr-line>
          ,
          <country country="BE">Belgium</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Visualization is a powerful tool in understanding moving object data. There is, however, a lack of common open-source tools that can support users in this task. The main challenges are to provide rich transformations and visualizations through an interactive interface, to help users in exploring, understanding and presenting their moving object data. In this demo, we present MOVE (Moving Objects Visual Exploration), an open-source tool that integrates MobilityDB, a moving object database in PostgreSQL, and QGIS to visualize moving objects. MOVE is capable of querying and displaying moving object data through a simple interface and visualizing both static and animated spatial data in QGIS. We use Danish AIS data to demonstrate the capabilities of MOVE by presenting a set of example queries and visualizations.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Spatio-Temporal Data</kwd>
        <kwd>Moving Objects</kwd>
        <kwd>Visualization</kwd>
        <kwd>Open-source</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>Published in the Workshop Proceedings of the EDBT/ICDT 2022 Joint
Conference (March 29-April 1, 2022), Edinburgh, UK
$ maxime.schoemans@ulb.be (M. Schoemans);
mahmoud.sakr@ulb.be (M. Sakr); esteban.zimanyi@ulb.be
(E. Zimányi)</p>
      <p>© 2022 Copyright for this paper by its authors. Use permitted under Creative
CPWrEooUrckReshdoinpgs IhStpN:/c1e6u1r3-w-0s.o7r3g CCoEmmUoRns LWiceonsrekAstthribouptionP4r.0oIncteerenadtiionnagl s(CC(CBYE4U.0)R.-WS.org)
1www.qgis.org
2www.github.com/MobilityDB/MobilityDB
3www.github.com/mschoema/move
are then added as layers in QGIS, marked as temporal,
and can be animated using the QGIS built-in temporal
controller. Additionally, indexes are built on the temporal
and spatial columns of these tables. This allows users
to scale up their database, without compromising the
responsiveness of the display in QGIS.</p>
      <p>It is worth mentioning that MOVE chooses by design
that all the layers it creates for visualization use native
QGIS representations. As such, the user has access to the
whole range of styling, annotation, etc. that is available
in QGIS to enrich the visualization as needed. The
symbology of the created layers is always set to default and
can be modified by the user. Each layer also contains all
the non-geometry columns returned by the initial query,
and can thus also be used by the user as usual.
Specifically, columns with scalar temporal properties are also
handled by the plugin and can be displayed with the use
of the DataPlotly4 plugin. These columns are displayed
as 2D line plots, with the time displayed on the x-axis
and the scalar values on the y-axis.</p>
    </sec>
    <sec id="sec-2">
      <title>2. The MOVE Plugin</title>
      <sec id="sec-2-1">
        <title>The architecture of the visualization tool is composed</title>
        <p>of three parts: MobilityDB, QGIS, and the MOVE plugin
linking these two systems.</p>
        <p>
          MobilityDB [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ] is an open-source moving object
database built on top of PostgreSQL and PostGIS. It adds
new temporal types to PostgreSQL that can represent
moving points (tgeompoint) and moving rigid
geometries (tgeometry), as well as temporal floats, integers,
booleans and texts. The temporal types tgeompoint 3. Examples of Possible
and tgeometry use the PostGIS Point and Polygon Visualizations
types respectively to represent the individual instants of
the moving objects. The following subsections present examples of possible
        </p>
        <p>QGIS is a geospatial visualization tool. It can connect visualizations, along with the queries that we used to
to multiple spatial data stores, including PostGIS, and generate them. These queries and visualizations use a
display static geometry objects, such as points, linestrings real dataset of AIS ship trajectories, that is published by
and polygons. Using the Temporal Controller, it has the the Danish Maritime Authority5. The data covers one day,
capability of displaying animated maps. As such, QGIS September 29, 2020. The file size is 1.9GB and contains
has the capability of displaying both static and animated 8M AIS points of 1,788 diferent ships.
representations of moving object data. Data is loaded into MobilityDB in the
ta</p>
        <p>
          MOVE allows users to write SQL spatio-temporal ble AIS(mmsi integer, trip tgeometry,
queries and to visualize the results in QGIS. These queries centroid tgeompoint). The mmsi attribute is a
are executed by MobilityDB, and the user has thus access unique ship identifier. The trip is a temporal geometry,
to the complete set of operations ofered by PostgreSQL, i.e., moving region, representing the ship movement.
PostGIS and MobilityDB. These include for instance pro- It represents the shape, orientation and movement of
jection, distance, speed, azimuth, temporal aggregations, the ship. The centroid attribute represents the ship
and temporal topological predicates [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ]. With this rich as a temporal point (tgeompoint\verb) in the case
API, users can be creative in expressing both exploratory where the shape and orientation information is of no
as well as analytical queries and visualize their results. interest to the user query. It has been computed using
On the QGIS side, users are additionally ofered a big the operation trajectory(trip). Since this operation
variety of map display and symbology options. is used in multiple queries of the following subsections,
        </p>
        <p>The MOVE plugin, displayed in Figure 1, presents a we precompute the result of this operation in column
simple but powerful interface to the user. When execut- centroid to simplify the queries. Next, we illustrate
ing a SELECT query, the plugin inspects the types of the examples of possible visualizations on the AIS dataset.
resulting columns and creates the appropriate layers in
QGIS to visualize them. Columns storing PostGIS
geometry types are displayed as they would have been by 3.1. Animated Points and Geometries
default. If the query returns MobilityDB spatiotempo- Queries 1 and 2 can be used to display columns of
temral types, that is, tgeompoint or tgeometry, MOVE poral geometries and points, respectively. Running these
creates temporary database tables to approximate these
spatiotemporal objects into a representation that uses
native QGIS types, such as LinestringM. These tables</p>
      </sec>
      <sec id="sec-2-2">
        <title>4www.github.com/ghtmtt/DataPlotly</title>
        <p>5www.dma.dk/SikkerhedTilSoes/Sejladsinformation/AIS/
Sider/default.aspx
Query 1 (4s for 100 ships, 40s for 1000 ships):
SELECT mmsi, trip FROM AIS;
When working with mobility data, errors can occur at
multiple stages of the pipeline, and the data received
by the database is thus not free of errors. Visualizing
this data is essential to not only determine the nature of
the errors but also verify that the cleaning process was
successful. With the use of the plugin, this cleaning and
verification process can be done interactively.</p>
        <p>After loading the data in table AIS, we can display the
trajectories of the ships using Query 3. Figure 3a displays
the result of running this query in the plugin interface. In
this figure, we can see long straight lines passing through
solid terrain, which are errors in the data. These lines are
present because some data points are not placed on the
actual trajectory of the ship, but rather on an incorrect
location far from the actual position of the ship.</p>
        <p>A possible way to remove these errors is to compute
the speed of the ship, and remove the segments of the
trajectory having a speed higher than a certain
threshold, such as 30 m/s. This can be done through the use of
multiple MobilityDB functions on temporal points as
displayed in Query 4. Figure 3b shows the result of Query 4,
and the erroneous lines visible in Figure 3a have indeed
been removed. If this were not the case, a new query
could have been run to continue this interactive cleaning
process.</p>
        <sec id="sec-2-2-1">
          <title>3.3. Heat Map of Trajectories</title>
        </sec>
      </sec>
      <sec id="sec-2-3">
        <title>Query 5 constructs a heat map using a second table Grid,</title>
        <p>storing the geometries of a regular square grid enclosing
the vessel trajectories. Using the QGIS layer styling, we
can then color the grid cells with a high weight. This
creates the visualization shown in Figure 4.</p>
        <p>The lines shown in Figure 4 display grid cells that were
traversed by multiple ships on the same day, which could
indicate navigation routes or zones with high trafic.</p>
        <sec id="sec-2-3-1">
          <title>3.4. Traversed Area</title>
        </sec>
      </sec>
      <sec id="sec-2-4">
        <title>MobilityDB ofers a wide range of operations to process</title>
        <p>queries in the plugin interface will automatically add temporal points and geometries, such as distance,
intera layer in QGIS with the temporal property activated. section or restriction functions. An example of a complex
This displays the ships as animated polygons and points operation on temporal geometries is traversedArea.
respectively, and it is possible to interact with the anima- This function computes the area traversed by a temporal
tion using QGIS Temporal Controller. geometry as a PostGIS polygon and can be used, for
ex</p>
        <p>Figures 1 and 2 display a snapshot of the layers result- ample, to compute the closest point of approach of a ship
ing from Queries 1 and 2, respectively. Notice that the to a fixed point on land. Query 6 computes the traversed
added layer is already marked as temporal, as indicated area of a ship, and the result of this query is displayed in
with the clock symbol on the right of the layer names. Figure 6.</p>
        <p>Using the Temporal Controller visible at the top of the
image, this data can be explored and animated. 3.5. Temporal Attributes</p>
      </sec>
      <sec id="sec-2-5">
        <title>DataPlotly is a powerful plugin allowing QGIS to display attributes of a table using the Python Plotly API. This</title>
        <p>Query 5 (&gt; 1min): SELECT cell, count(*) as weight
FROM Grid, AIS WHERE intersects(centroid, cell)
GROUP BY cell;
Query 6 (2s):
SELECT mmsi, trip, traversedArea(trip)
FROM AIS WHERE mmsi = 538090508;
Query 7 (5s): SELECT port, geom,
tcount(atValue(</p>
        <p>tintersects(centroid, geom), True)),
FROM Ports, AIS
WHERE port = ’Skagen’</p>
        <p>AND intersects(centroid, geom)
GROUP BY port, geom;
map and the count of the ships as a stepwise function in
a scatter plot.
As the last example, the MobilityDB tdwithin operation
can be used to find out when two temporal points are
within a given distance of each other. Query 8 uses this
operation to restrict the trajectories of ships to the times
when they are within 100 meters of each other. This
can for example be used to display close encounters of
two ships at sea. Figure 8 shows a zoom of one close
encounter returned by Query 8.
The described examples only form a subset of the
visualizations possible using the plugin. More complex queries
can be also executed to create more advanced
visualizations, such as the flow map displayed in Figure 9. This
can be achieved by combining both the wide range of
operations in MobilityDB as well as the wide range of
styling features in QGIS. Indeed, since the plugin adds
QGIS layers to visualize the results of the queries, the
users are then free to adapt the symbology of the data as
they see fit. For example, Figure 1 displays every ship in
a random color, and Figure 5 corresponds to Figure 3b
with diferent styling, giving a better impression of the
density of the trajectories.</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>4. Conclusion</title>
      <sec id="sec-3-1">
        <title>This paper presented MOVE, a visualization tool that</title>
        <p>integrates with MobilityDB and QGIS. MOVE presents
a simple interface to interactively query and visualize
spatial and spatiotemporal data. Using the extensive
MobilityDB API and the large number of visualization
options available in QGIS, the users can easily build rich
visualizations. Especially, MOVE creates transformations
of the MobilityDB temporal types to be able to build
static and animated visualizations of moving objects in
QGIS. MOVE delegates the data processing to
MobilityDB, which can handle large data sets and ofers a wide
range of transformation and aggregation operations in
SQL. This solution builds on the open-source stack of
PostgreSQL, PostGIS, MobilityDB and QGIS, and is thus
available and ready-to-use for its large community of
users and developers.</p>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>G.</given-names>
            <surname>Andrienko</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Andrienko</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Bak</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D. A.</given-names>
            <surname>Keim</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Wrobel</surname>
          </string-name>
          , Visual Analytics of Movement, Springer,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>N.</given-names>
            <surname>Andrienko</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            <surname>Andrienko</surname>
          </string-name>
          ,
          <article-title>V-analytics (a.k.a</article-title>
          .
          <source>commongis)</source>
          ,
          <year>2010</year>
          . URL: http://geoanalytics.net/ V-Analytics/.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <surname>H.-P.-I. Computer Graphics</surname>
            <given-names>Systems</given-names>
          </string-name>
          , Gtx - geo
          <source>temporal explorer</source>
          ,
          <year>2021</year>
          . URL: https://www.gtx-vis.org/.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>A.</given-names>
            <surname>Graser</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Dragaschnig</surname>
          </string-name>
          ,
          <article-title>Open geospatial tools for movement data exploration</article-title>
          ,
          <source>KN-Journal of Cartography and Geographic Information</source>
          <volume>70</volume>
          (
          <year>2020</year>
          )
          <fpage>1</fpage>
          -
          <lpage>8</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>A.</given-names>
            <surname>Graser</surname>
          </string-name>
          ,
          <article-title>Visualisierung raum-zeitlicher daten in geoinformationssystemen am beispiel von quantum gis mit “time-manager”-plug-in</article-title>
          ,
          <source>in: Proceedings of FOSSGIS2011</source>
          ,
          <year>2011</year>
          , pp.
          <fpage>73</fpage>
          -
          <lpage>75</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>E.</given-names>
            <surname>Zimányi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Sakr</surname>
          </string-name>
          ,
          <string-name>
            <surname>A</surname>
          </string-name>
          . Lesuisse,
          <article-title>MobilityDB: A Mobility Database based on PostgreSQL and PostGIS</article-title>
          ,
          <source>ACM Transactions on Database Systems</source>
          <volume>45</volume>
          (
          <year>2020</year>
          )
          <fpage>42</fpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>