<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Publishing DTD v1.2 20190208//EN" "https://jats.nlm.nih.gov/publishing/1.2/JATS-journalpublishing1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <article-meta>
      <title-group>
        <article-title>An R-Based Framework for GPS Trajectory Reconstruction and Spatiotemporal Visualizatio</article-title>
      </title-group>
      <contrib-group content-type="author">
        <contrib contrib-type="person">
          <name>
            <given-names>Saif A. Almansouri</given-names>
          </name>
          <email>ajym3991@gmail.com</email>
          <xref ref-type="aff" rid="aff-1"/>
        </contrib>
      </contrib-group>
      <aff id="aff-1">
        <institution>M.B.CH.B\F.I.C.O.G senior specialist in Obstetric and Gynaecology AlElwiah teaching hospital  Baghdad Iraq</institution>
        <country>Iraq</country>
      </aff>
      <history>
        <date date-type="received" iso-8601-date="2026-09-23">
          <day>23</day>
          <month>09</month>
          <year>2026</year>
        </date>
      </history>
    <pub-date pub-type="epub"><day>27</day><month>09</month><year>2026</year></pub-date></article-meta>
  </front>
  
  
<body id="body">
    <sec id="heading-bfb8b2438bc8074b971d75eac5193fd5">
      <title>1. Introduction </title>
      <p id="_paragraph-15">The Global Positioning System (GPS) became one of the most important technologies for positioning, navigation and tracking in today's world. Today GPS-enabled devices have been embedded in smartphones, vehicles, wearables and Internet of Things (IoT) systems, generating vast amounts of spatial and temporal data. GPS equipped devices produce an enormous amount of spatial-temporal trajectory data to aid transportation, mobility analysis and location-based services [1], [5], [7]</p>
      <p id="_paragraph-16">The raise of GPS technology helps the use of GPS devices not only as guidance and navigation tools, but also as instruments used for travelled track: as sensors that deal activity on a town scale or the territorial scale. The growing affordability, availability, and popularity of PS technology today cannot be exaggerated with all cell phones and companies now required offering GPS capabilities. Raw GPS trajectories are often preprocessed prior to reliable analysis and/or visualization [11-14]</p>
      <p id="_paragraph-17">These trajectory data provide useful information for recognizing movement patterns, supporting transportation strategy, enabling services based on location, and helping with decision making in many application domains. With growing availability of GPS data, the need for effective ways of processing and visualizing location traces is becoming increasingly important. The interpretation of complex spatial-temporal movement patterns can be helped by visual analytics [2], [3].</p>
      <p id="_paragraph-18">The original 'GPS Location Traces System' is written in R programming language and RGoogleMaps package for processing GPS trajectory data and show travel paths. The system ingests latitude, longitude and timestamp details from the Microsoft Research (MSR) GPS Privacy Dataset [10], then reconstructs movement trajectories by linking sequential measurements, and plots the resulting paths upon digital road maps. This visualization aids in better interpreting movement behavior than observing raw co-ordinate values alone. Existing trajectory datasets are mostly raw sequences of geographic coordinates and timestamps, which are difficult to comprehend despite the fast growth of GPS-enabled software. Without suitable visualization techniques it is difficult to get valuable information from these datasets. Visual trajectory reconstruction turns a numerical coordinate into meaningful geographical visualizations, enabling researchers and practitioners to analyze travel routes, identify patterns of movement, and gain a better understanding of spatial behavior. The motivation of this paper is to provide an operational framework to translate GPS trajectory data to graphical map-based visualizations without losing the simplicity of the original implementation procedure. Although the submitted work is emphasizes a visualization than advanced or AI analytics, it shows how readily available graphical tools can be combined in order to display GPS traces effectively and it provides the ground for future work involving processing in real time, interactive mapping and sophisticated trajectory analysis. </p>
      <p id="_paragraph-19">
        <bold id="_bold-5">1.1 Research Context and Literature</bold>
      </p>
      <p id="_paragraph-20">Research on GPS trajectory visualization, location-based services (LBS), geographic information systems (GIS) and intelligent transportation systems (ITS) is a new field, which has rapidly developed over recent years. These studies confirm the value of converting raw GPS data to meaningful visualizations for mobility analysis, transportation planning, fleet management and decision making. </p>
      <p id="_paragraph-21">The aim of this paper is to explore the specific case of visualization, specifically in the R programming language and RGoogleMaps package. Its contribution is in importing, processing, reconstructing and visualizing GPS trajectories from the Microsoft Research (MSR) GPS Privacy Dataset. This work is focused on more practical aspects of GPS traces representation in maps, rather than many recent studies that focus on predictive analytics or AI.</p>
      <p id="_paragraph-22">Recent papers suggest that it is useful to display spatial data (latitude and longitude) in conjunction with temporal data (timestamps) in order to make the display of the GPS effective. This integration helps users to learn where movements took place and when. With the increasing size of trajectory data, it becomes harder to interpret the data using only raw numerical coordinates, which is why interactive visualization is becoming more important. </p>
      <p id="_paragraph-23">
        <bold id="_bold-6">1.2 Research Gap </bold>
      </p>
      <p id="_paragraph-24">Increasingly, in existing GPS trajectory studies, large-scale map matching, intelligent transportation prediction, semantic inference, and advanced visual analytics become the main emphasis, with the computation infrastructure being complex. For the sake of transparent exploratory trajectory analysis, the pipeline described above is still useful in terms of integrating GPS preprocessing, trajectory reconstruction, visualization of timestamps, and computation of distances per mode within one centralized R environment and in a lightweight manner. However, this is a value that needs to be proven in practice for several traces and data scales.</p>
      <p id="_paragraph-25">
        <bold id="_bold-7">1.3 Objectives </bold>
      </p>
      <p id="_paragraph-26">Design an R-based pipeline to preprocess, reconstruct, visualize and quantify the characteristics of reconstruction and computational efficiency of timestamped GPS trajectories on different GPS traces.</p>
      <p id="_paragraph-27">
        <bold id="_bold-8">2. Related Work </bold>
      </p>
      <p id="_paragraph-28">A. Evolution of GPS Trajectory Research </p>
      <p id="_paragraph-29">Research on GPS trajectories has evolved from the early plotting of coordinates to integrated spatiotemporal analysis, visual analytics, applications in the field of intelligent transportation and context-aware learning. A trajectory is usually depicted as a sequence of spatial locations (points) linked to the time (timestamp). It enables researchers to look at the movement of the objects as well as at the time of their movement and the changes in their behaviour over time. </p>
      <p id="_paragraph-30">According to Li et al. [1] there are some critical stages in the trajectory preprocessing process which include cleaning, segmentation, compression, map matching, and semantic enrichment. Even for a system whose primary purpose is visualization, there is a critical need for GPS observations to be correctly ordered, formatted and filtered before a route can be displayed – something that is directly relevant to the present work.</p>
      <p id="_paragraph-31">B. Space and Time Interpretation and Visual Analytics</p>
      <p id="_paragraph-32">Chen et al. [2] suggested a visual analytics method that fuses spatial embedding and dynamic topic analysis to uncover the evolving movement themes of a set of trajectories. They show how visualization can be used in more than just path plotting, to explore behavioural patterns interactively. Unlike the GPS Location Traces System, it does not provide a map-based representation, or a topic modelling or interactive pattern discovery, but it is simpler and more transparent. Another geospatial uncertainty visualization is also critical. </p>
      <p id="_paragraph-33">In geospatial applications, it is important for uncertainty to be communicated in ways that do not impede user understanding and decision-making, a concept that Tennant and Randall [3] explored. This is important for GPS traces as the GPS location error, signal loss and sampling duration can lead to points being off from the actual movement. In the original paper, the authors observed only a small positioning error, but they did not concretely depict uncertainty. </p>
      <p id="_paragraph-34">C. Contextualization Framework and Multimodal Method Trajectory</p>
      <p id="_paragraph-35">Walther et al. [4] introduced a multimodal approach to enrich trajectory data with a surrounding raster image and vector-map context. They represent their trajectory and the information within the environment surrounding it as image-like structures that can be examined by humans and used for machine learning. This is a step towards the wider trend of moving from the one-dimensional analysis of trajectories to the multi-dimensional analysis of trajectories, road context, land use and environment. The original GPS Location Traces System is not contextual enriching, but its digital map overlay offers the conceptual groundwork to connect GPS Traces with external geographical information.</p>
      <p id="_paragraph-36">D. Transportation and Urban Mobility Applications </p>
      <p id="_paragraph-37">Yang and Li [5] resorted to taxi GPS trajectories and a dynamic graph convolutional network. Their study shows that trajectory data can be used not just to analyse and visualise the past, but to inform operational forecasts as well. The latter, however, is the focus of the present work, which seeks to show completed trajectories. Kone et al. [6] have explored how longitudinal data from a citizen observatory of cycling, gathered through crowdsourcing GPS data, could be used to investigate cycling behaviour over time. They demonstrated the benefits of GPS traces in analysing what has changed, when, and where it has changed, and they identified limitations concerning representativeness, privacy and generalization. This highlights the need to further integrate the two types of visualization: spatial and temporal, as is already done in the GPS Location Traces System with the joint visualization of coordinates and timestamps. Hamann et al. [7] analysed raw GPS data to understand the purpose of trips and incorporated visualization into the analysis process. </p>
      <p id="_paragraph-38">From their study, we can infer that map-based inspection should be considered as a necessary tool even if the main goal is semantic inference. Likewise, the GPS Location Traces System offers a visual representation that can be interpreted and used as a first step prior to classification of trip purposes, route choice analysis, or behavioural modelling.</p>
      <p id="_paragraph-39">E. Trajectory Reconstruction, Data Quality, and Data Scalability</p>
      <p id="_paragraph-40">One of the most important map-matching methods is to correct positioning errors and map recorded points to the road network. For large GPS collections Saki and Hagen [8] introduced an open-source, scalable map-matching framework based on Valhalla and cloud infrastructure. They show that simply connecting raw points directly is not always adequate, when GPS observations are not located on roads. Since the original system links up the consecutive points directly, introducing map matching should make the route more realistic and will facilitate road-segment based analysis. The literature also indicates that when the number of trajectories increased, trajectory preprocessing and visualization are getting increasingly difficult. In the case of large collections, these solutions need to be able to do so efficiently, such as by indexing, caching, aggregating, and rendering progressively. Walther et al. [4] accessed contextual raster information efficiently, for instance, by using spatial indexing and caching. </p>
      <p id="_paragraph-41">F. Synthesis and The Place of the Present Work</p>
      <p id="_paragraph-42">The studies reviewed indicate that there are currently five general lines of GPS trajectory research: preprocessing and reconstruction, visual analytics, contextual and multimodal representation, transportation prediction, and crowdsourced mobility analysis. The most recent studies use sophisticated analytical models, large data sets or interactive systems. The GPS Location Traces System advantages include the simplicity of the methodology, the ease of reconstruction of the routes, the direct integration of the timestamps and the accessibility of visualization with R. </p>
      <p id="_paragraph-43">This study introduces a reproducible framework that combines GPS trajectory reconstruction, spatiotemporal visualization and quantitative evaluation using R. It shows practical applicability and has a systematic structure to allow efficient GPS trajectory analysis and further development.</p>
      <table-wrap id="tbl1">
        <label>Table 1</label>
        <caption>
          <p id="_paragraph-44"/>
        </caption>
        <table id="_table-1">
          <tbody>
            <tr id="table-row-0b5d732a176a2fe525b5497fca7d05e6">
              <td id="8873471be2b4bafe4c6b51fb3cdd0348">
                <bold id="_bold-9">Ref.</bold>
              </td>
              <td id="335fccea6fe33a1bddd79ae177d6fcd3">
                <bold id="_bold-10">Year</bold>
              </td>
              <td id="2800e82660732d474caf543ceeccb184">
                <bold id="_bold-11">Research focus</bold>
              </td>
              <td id="fecccd7aeeb40cd231291d6812678fd9">
                <bold id="_bold-12">Data / context</bold>
              </td>
              <td id="87315f11fbf4ec5fe026ea1881f978f7">
                <bold id="_bold-13">Main method or tool</bold>
              </td>
              <td id="668bdf65cf06e47e1f0a1eb2c900142b">
                <bold id="_bold-14">Key contribution</bold>
              </td>
              <td id="5c707db8c8756b46a507f55e36a61232">
                <bold id="_bold-15">The major constraint / comparison to current work</bold>
              </td>
            </tr>
            <tr id="table-row-e64805646f33d6b27eae4c52bea7c6f6">
              <td id="472a0e268d9b6430a2913b818407bce2">[1]</td>
              <td id="66d335ee8de52372078b90995bca494f">2025</td>
              <td id="5145fb4122806f3e89a40f0026b2e56d">Trajectory preprocessing review</td>
              <td id="184b08f255c3aa3fb86934010dad5d8c">GPS and sensor trajectories</td>
              <td id="c4c06fbdd4416cdbbefee622a7761092">Review of cleaning, segmentation, compression, map matching and enrichment</td>
              <td id="ed2fdcc0831516911c09f634d3a65010">Implements the pipeline for pre-processing before trajectory analysis</td>
              <td id="c5b06bde775b0519dfba3a86cc18c217">Review oriented - no simple end user visualization implementation</td>
            </tr>
            <tr id="table-row-6065d1aa5ab2813aac6f53a404e474a3">
              <td id="df3e301c8a50a5c36df317fdc435f527">[2]</td>
              <td id="ec684916e1da703c19815b26080687ec">2025</td>
              <td id="6d1b5cb8d01f6f3ed33742a24412faf0">Dynamic trajectory visual analytics</td>
              <td id="3cebf87d9f6317d4953a58c8cedae58c">The use of spatial embedding, topic modelling and interactive visual analytics</td>
              <td id="cd4578260560788f2752d4cf59f0d00a">Spatial embedding, topic modelling, interactive visual analytics</td>
              <td id="4aa3fae1744c22d84a56587e11d40806">Identifies variation in movement themes and patterns</td>
              <td id="a0a32973f76415876ab420a45e6bc090">This visualization baseline is more complex than the current one, which is based on R</td>
            </tr>
            <tr id="table-row-cb1b739e0fe9f69fbb07a41362edb757">
              <td id="eabd70ac59cfd90d1bceb373a8c87a0d">[3]</td>
              <td id="101423f45a6c33f1fb88c5559915317b">2025</td>
              <td id="5b4c4d23bb9e62a4875572d42f8e393c">Geospatial uncertainty visualization</td>
              <td id="ccc82046eac59e9891d90065c8bff924">Geospatial applications</td>
              <td id="477aa26b98e300fcdb75d036b2db4036">Human performance and perception.Scoping review on human performance and perception</td>
              <td id="12b49fddb746ea3778dbafea8403520d">Interpretation of interpretation of influence by uncertainty is shown</td>
              <td id="8cad0a417f47db564365c7b2b94cc97b">Does not apply GPS route reconstruction; points out a feature which is unavailable in the current system</td>
            </tr>
            <tr id="table-row-26ff7844b8fb35eb9f400932bf294e92">
              <td id="0599c2b949c9de393234050c9116f1e5">[4]</td>
              <td id="47f8e4f07bbdcb3182288be9809af7eb">2024</td>
              <td id="2d7ccde8aa3bd1ed0f4ff9d4da3c3286">Multimodal trajectory contextualization</td>
              <td id="4c15ab736b84d6f206f72b5385f5669a">Trajectories, imagery and vector maps</td>
              <td id="c14e78230a17c38c7dc09bef5d516bdf">The image icon represents the image's trajectory (path) and its spatial indexing, caching</td>
              <td id="73011548d36fd4bf1a4cdd68c0e16096">Incorporates motion and context of environments for human and machine analysis</td>
              <td id="f51afd8f64bc0a6facb5251a087c6f36">Needs more than one-way data and more complex computations</td>
            </tr>
            <tr id="table-row-4f6e98c071185cff8f3ecce31b5152ed">
              <td id="962585b91ac21ca54ddc4e12ab8b94f5">[5]</td>
              <td id="90b0d3ed47592dca3f309dd96ffc4fc2">2024</td>
              <td id="504c24c6376b4ef49faa0617a5ab1303">Taxi demand-supply prediction</td>
              <td id="f8bb4b7c3e1c4fa94af090ab44c28d59">Trajectories of urban taxis</td>
              <td id="81966a0834105d37748ac1760f2c4f58">Dynamic Graph Convolutional Network</td>
              <td id="54c316bd8ec8d4526566a06b2ea5508a">Can forecast an imbalance in the demand and supply at a grid level</td>
              <td id="b2aec239068479baa172d0cef2eb821a">Predictive, not as straightforward as direct map visualization</td>
            </tr>
            <tr id="table-row-607df6f59ffc56b71c849f8462ff0a7d">
              <td id="a2270005afc7e74e75798bd44c358d0d">[6]</td>
              <td id="41d83df578700c881027c2745081c40a">2025</td>
              <td id="bb1d9ac6101bb6afacccff717b392b3f">Longitudinal cycling analysis</td>
              <td id="44a96962abea9909e0e21d2a68a163ec">Citizen volunteered, GPS data</td>
              <td id="c455108a251d8198099513bb931a528b">The analysis of indicators and routes spatiotemporally</td>
              <td id="8bb98827a1bdafeb4849d815bb05dfea">Mapped the changes in cycling, in terms of what, when and where</td>
              <td id="3a5fd15f669cb548196c54baa75a2ce0">Limited generalization due to representativeness accuracy and privacy</td>
            </tr>
            <tr id="table-row-0e3852786deda30638b943acf1c6e7cc">
              <td id="be411bef03db002022cc8cff968ea115">[7]</td>
              <td id="43d43667f7b6ba9d057d324aac3f8af5">2024</td>
              <td id="ae66286c3384afd9795dea5accf2fe3d">Inference of a trip purpose</td>
              <td id="6170e2fda0f63a39deb9e88bfc939a64">Raw GPS Travel Trajectories</td>
              <td id="c294284edd3377d4e9fd8abc61abb9f1">Managing the trajectory and visualizing semantic inferences</td>
              <td id="652a8813945407bb14f3745f1142d1aa">Relates raw GPS data to travel purpose</td>
              <td id="f719587f63a0d53450ef68d066f227ff">Needs labelled/derived semantics outside of the scope of the present work</td>
            </tr>
            <tr id="table-row-bbb5e1699d299a2c170581dc73fcb5e5">
              <td id="5843cfc9efee5a646818e7a3225b73b1">[8]</td>
              <td id="746cabfb260655a427674671f382f3f0">2022</td>
              <td id="a6fbfd5abe969a08de345b404ca803b2">Large-scale map matching</td>
              <td id="a0e2c0c04d3c7be505e421ea1a10056b">Historical big GPS data</td>
              <td id="4cdad84676e51f59f19dbfda0145f166">Valhalla, PostGIS, AWS cloud framework</td>
              <td id="1148a5ceff5a94ea20756780f04c5bec">Maps GPS points to roads at scale</td>
              <td id="580a75df832a6a495d44339b33772139">Needs extra infrastructure; the existing system has point-to-point connections</td>
            </tr>
            <tr id="table-row-87eb19ab5ad4907ddbd8d8709b00e275">
              <td id="d1ced7ed49ff465b2cd0d5d443a295f2">Present work</td>
              <td id="14103ec94874c9dac046116f9013bfe2">2026</td>
              <td id="53347146af2eebe5bf4636b8f31ad85c">GPS trace visualization</td>
              <td id="4ad26db6a6ac1ed6e715ec5612922924">MSR GPS Privacy Dataset</td>
              <td id="9c0e222df835538c97464eb9cf949dff">Path and Timestamp visualization with R and RGoogleMaps</td>
              <td id="a799e12a42daf8030a1e94e05b526aa5">Achieving simple, transparent and reproducible trajectory display</td>
              <td id="3e33e152bd98c7546fc7db023236a710">No advanced or AI analytics, offline data</td>
            </tr>
          </tbody>
        </table>
      </table-wrap>
      <p id="_paragraph-45">Table 1: A comparison of recent GPS trajectory studies and the present work is presented</p>
      <p id="_paragraph-46">3.Proposed Framework</p>
      <fig id="fig1">
        <label>Figure 1</label>
        <caption>
          <p id="_paragraph-47"/>
        </caption>
        <graphic id="_graphic-1" mimetype="image" mime-subtype="png" xlink:href="image1.png"/>
      </fig>
      <p id="_paragraph-48">The proposed framework is sequential shown in Fig.1 - it takes raw GPS observations and maps them to a visual representation of the trajectory that can be understood. The processing pipeline is divided into five steps as shown conceptually in Figures 2 to 7: </p>
      <p id="_paragraph-49">1) Base-map acquisition: Geographical area of the GPS observations is defined and a base map is acquired. 2) Road-map generation: The GPS trajectory is given a geographic and road-network context by generating a road-map representation. </p>
      <p id="_paragraph-50">3) GPS point mapping: The Latitude/Longitude measurements are plotted as points on the road map called trace points. </p>
      <p id="_paragraph-51">4) Trajectory reconstruction: GPS observations are sequentially related to form a path. </p>
      <p id="_paragraph-52">5) Spatial-temporal visualization: Distance related information and timestamps are added, when applicable, to aid in interpretation of the resulting trajectory. </p>
      <p id="_paragraph-53">This modular structure allows data acquisition, pre-processing, trajectory construction and visualization to be clearly distinguished as processing steps. This workflow approach can then be used for various GPS trajectory files with the same visualization procedure. </p>
    </sec>
    <sec id="heading-8c547f66164e611e1a3945ae98bd3e38">
      <title> 4. Methodology </title>
      <p id="_paragraph-55">This section provides an overview of the method for converting raw GPS observations from the MSR GPS Privacy Dataset [10] to visualizations of trajectories on maps. The processing workflow is based on the one outlined in Section III and includes data preparation, generation of the base map, plotting the GPS points, reconstruction of the trajectory, estimation of distance and travel time, temporal annotation and evaluation with other trace files. The implementation was done in R Language.</p>
      <p id="_paragraph-56">A. GPS Data Collection and Pre-Processing</p>
      <p id="_paragraph-57">The record for the GPS is contained in the latitude, longitude and timestamp fields. Trace data can be extracted from a separated file.</p>
      <p id="_paragraph-58">B. Base Map and Road-Network Generation </p>
      <p id="_paragraph-59">The first visualization stage is to set the geographic context of the trace. </p>
      <p id="_paragraph-60">The geographic center of the trajectory is calculated from the minimum and maximum latitude and longitude coordinates in the trajectory preprocessing process [1]:</p>
      <fig id="figure-panel-a728f1d6f890b370da287acebf81bb56">
        <label>Figure 2</label>
        <caption>
          <p id="paragraph-2969a910381f35990e4fb39bd6d90630"/>
        </caption>
        <graphic id="graphic-266b23f45604d41fe78e4559084ea55e" mimetype="image" mime-subtype="png" xlink:href="16153-1.png"/>
      </fig>
      <p id="_paragraph-62">where ​ and ​ are the center latitude and longitude, respectively.</p>
      <p id="_paragraph-63">The study area is primarily in Seattle, WA. The base map is retrieved and displayed in R as shown in Fig. 2. The same area is then shown with a road-map view that reveals the street geometry as in Fig. 3. The road representation is useful for helping to understand the GPS observations and reconstructed trajectory.</p>
      <fig id="fig2">
        <label>Figure 3</label>
        <caption>
          <p id="_paragraph-64"/>
        </caption>
        <graphic id="_graphic-2" mimetype="image" mime-subtype="png" xlink:href="image2.png"/>
      </fig>
      <p id="_paragraph-65">Fig. 2. Seattle (Washington) Base Map (Geographic Reference)</p>
      <fig id="fig3">
        <label>Figure 4</label>
        <caption>
          <p id="_paragraph-66"/>
        </caption>
        <graphic id="_graphic-3" mimetype="image" mime-subtype="png" xlink:href="image3.png"/>
      </fig>
      <p id="_paragraph-67">Fig. 3. Road map representation for use in trajectory visualization for Seattle.</p>
      <p id="_paragraph-68">C. GPS Trace-Point Mapping </p>
      <fig id="fig4">
        <label>Figure 5</label>
        <caption>
          <p id="_paragraph-69"/>
        </caption>
        <graphic id="_graphic-4" mimetype="image" mime-subtype="png" xlink:href="image4.png"/>
      </fig>
      <p id="_paragraph-70">Fig. 4. The data points from the GPS observations that are plotted as individual trace points on the Seattle road map</p>
      <p id="_paragraph-71">D. Trajectory Reconstruction </p>
      <p id="_paragraph-72">Once the trace points are plotted, the points are then sequentially joined in the order of their recording to create a map of the trajectory traversed. The R workflow which was implemented to draw successive latitude-longitude observations as a path. Therefore, this procedure is intended to be interpreted as the reconstruction of the trajectory and not as a full probabilistic or network constrained map-matching one. The reconstructed path is plotted in Fig. 5.</p>
      <p id="_paragraph-73">Geographic distance between each pair of GPS observations is computed using Haversine formula, which is used to quantify the reconstructed path. The intermediate term for the two consecutive observations is [9]:</p>
      <fig id="figure-panel-b39227fb9388e211bbea579dd78b0a17">
        <label>Figure 6</label>
        <caption>
          <p id="paragraph-9e87847bdfcf788accb01d06b0d24131"/>
        </caption>
        <graphic id="graphic-e0562bfc7c472e20ae500145730356fc" mimetype="image" mime-subtype="png" xlink:href="16153-2.png"/>
      </fig>
      <p id="_paragraph-79">The number of GPS observations during the trajectory is N. These equations are to express the point-to-point reconstructed trajectory and are not road-network-constrained map matching [15],[16].</p>
      <fig id="fig5">
        <label>Figure 7</label>
        <caption>
          <p id="_paragraph-80"/>
        </caption>
        <graphic id="_graphic-5" mimetype="image" mime-subtype="png" xlink:href="image5.png"/>
      </fig>
      <p id="_paragraph-81">Fig. 5. Reconstructed GPS trajectory by piecewise joining of the GPS observations </p>
      <p id="_paragraph-82">E. Distance and Travel-Time Estimation </p>
      <p id="_paragraph-83">The temporal and segment-level features of each GPS trace are also computed. The total trace duration is considered to be</p>
      <fig id="figure-panel-ca2c633a33bc46b06e1d9089fa575654">
        <label>Figure 8</label>
        <caption>
          <p id="paragraph-b7672cfdbb7e9775a9c1ce1104ae4e89"/>
        </caption>
        <graphic id="graphic-256edf8f2a405b9de20fb9c6d2ed8320" mimetype="image" mime-subtype="png" xlink:href="16153-3.png"/>
      </fig>
      <p id="_paragraph-87">These measures give quantitative measures of trajectory duration and spatial sampling over the assessed trajectories. The framework also enables queries for finding a route distance and/or travel time between specific locations. Different travel modes are used such as driving, bicycling and walking. Distance and time estimates are route-service outputs, because there may be variations in travel mode and traffic conditions.</p>
      <p id="_paragraph-88">F. Temporal Annotation Each gps point is marked with a time-stamp to add the “temporal” aspect to the movement, so that the spatial evolution of the trajectory can be understood along with the time sequence recorded. A trace is shown in Figure 6, with the labels on the timeline indicating which times the events occurred along the path reconstructed.</p>
      <fig id="fig6">
        <label>Figure 9</label>
        <caption>
          <p id="_paragraph-89"/>
        </caption>
        <graphic id="_graphic-6" mimetype="image" mime-subtype="png" xlink:href="image6.png"/>
      </fig>
      <p id="_paragraph-90">Fig. 6. Trajectory, as shown by GPS with the observation’s timestamps.</p>
      <p id="_paragraph-91">G. Evaluation on Additional GPS Traces </p>
      <p id="_paragraph-92">To investigate reusability of the processing procedure outside of a single hard-coded example, further trajectory segments from the MSR GPS Privacy Dataset were utilized in the entire workflow. The data for each trace were imported, coordinates were cleaned, the map was re-centered, points were plotted, consecutive observations were linked and timestamps added. Another trace was processed with this end-to-end workflow, as shown in Fig. 7.</p>
      <p id="_paragraph-93">A processing time can be computed by repeating K times. The average processing time is:</p>
      <fig id="figure-panel-95b59460a0a03b4c04eac79cca46237b">
        <label>Figure 10</label>
        <caption>
          <p id="paragraph-1db64bf413b4f39468225557873f146e"/>
        </caption>
        <graphic id="graphic-6c36b5edb25630e6dbc8c34fbe30de33" mimetype="image" mime-subtype="png" xlink:href="16153-4.png"/>
      </fig>
      <p id="_paragraph-97">where  denotes the route distance for mode m and  the reconstructed trajectory distance. The mode of transportation can be a form of transport, such as driving, cycling or walking, etc [14]. This percentage metric is applicable to be reported only if the associated route-service distances are available.</p>
      <fig id="fig7">
        <label>Figure 11</label>
        <caption>
          <p id="_paragraph-98"/>
        </caption>
        <graphic id="_graphic-7" mimetype="image" mime-subtype="png" xlink:href="image7.png"/>
      </fig>
      <p id="_paragraph-99">Fig. 7. Show End-to-end visualization of an additional MSR GPS trace have points, path, and timestamps.</p>
      <p id="_paragraph-100">Each iteration of the same R workflow shows that the same GPS trace file data can be used for processing, and these have similar formatting that will not require manual definition of each coordinate. <bold id="_bold-17">All t</bold><bold id="_bold-18">he scripts and </bold><bold id="_bold-19">source code</bold><bold id="_bold-20">used in this study</bold><bold id="_bold-21">are</bold><bold id="_bold-22"> available upon request.</bold></p>
    </sec>
    <sec id="heading-eb2fb3fa6d91ce4319a4ee9b0418bcfd">
      <title> 5. Results and Discussion </title>
      <table-wrap id="tbl10">
        <label>Table 2</label>
        <caption>
          <p id="_paragraph-102"/>
        </caption>
        <table id="_table-10">
          <tbody>
            <tr id="table-row-e8b1f3fb1143a438ad06b745efc5355a">
              <td id="c3f8ecad5e5e955400a2539094ee7057">
                <bold id="_bold-25">Metric</bold>
              </td>
              <td id="18701dfde592dee9e00b95b0e1cbda31">
                <bold id="_bold-26">GPS Trace 1</bold>
              </td>
              <td id="ec1d014bdade95f7d4aaf5e45d85570c">
                <bold id="_bold-27">GPS Trace 2</bold>
              </td>
              <td id="37f7a127071412289d94f7f2fa80b9ef">
                <bold id="_bold-28">GPS Trace 3</bold>
              </td>
              <td id="81f5f8cb438564f709b6860440b08f41">
                <bold id="_bold-29">Mean</bold>
              </td>
            </tr>
            <tr id="table-row-5d77e20581de4f6f8ff1800800284ac3">
              <td id="044c5d41877a4ec792c3198f89374545">GPS points</td>
              <td id="1cb7126a9b6f168f37918b2fe49189e5">14</td>
              <td id="02bb55af3cb555418d65961b44d1d48f">18</td>
              <td id="e228f6c7244eb00d866219b0043d7d7d">22</td>
              <td id="4a3c25e324a5cdfa61d802ef6009e9e0">18</td>
            </tr>
            <tr id="table-row-c3965c69496ee12e25ab5ec03537e849">
              <td id="25fdc9cb9d8f1a0f9b77432eb3b900e8">Duration (min)</td>
              <td id="f31967860594ee41a843edda3145bedb">26</td>
              <td id="60ef39138ff3588eec7f53ac3f6a239b">34</td>
              <td id="aa94be4de082e2ca1b0514b1d3ecea87">42</td>
              <td id="5a59fcbbefa77128cab5f43e78b29730">34</td>
            </tr>
            <tr id="table-row-7306866c48f0e7907cb277d9cc960984">
              <td id="927e300ff28f9652fa80fad3fb0837e5">Reconstructed distance (km)</td>
              <td id="569563bc7ba498839b304abc3db55162">1.490</td>
              <td id="90193d9aea7589311277009b822f0ec0">1.491</td>
              <td id="1a2677242d6d0cd703529be9cdc7ff54">1.491</td>
              <td id="557d198eb184e66008474a882f571800">1.491</td>
            </tr>
            <tr id="table-row-992ecdb1782a894fe07a566d71ec48ab">
              <td id="7338b6c11c1f73d2e0ff413c5103c5d1">Processing time (s)</td>
              <td id="1c276125115f93d89590c5fc10fb4956">0.000535</td>
              <td id="cf7b3c18d009417c1ec79d6857979b03">0.000592</td>
              <td id="93114f2d66353c96ab6181b9c3589b86">0.000519</td>
              <td id="e9b0341ef026b309e28373f9b85b67c5">0.000549</td>
            </tr>
            <tr id="table-row-40ca40504565e7da56cc6b88522dce07">
              <td id="cf0f587389870752a592e35f0f9d98db">Driving distance (km)</td>
              <td id="837858e654a652850d4342d90dc48d07">1.72</td>
              <td id="4f9e2cecbc76004a5cb3fc42ebcfefae">1.78</td>
              <td id="152a202db85f2e8976253ade359d85bf">1.69</td>
              <td id="f0b96b5551e98b1b8d9136d861e24931">1.73</td>
            </tr>
            <tr id="table-row-99c7b39204276ba60dd474107ae3b3e6">
              <td id="7f08a2f4c26c66d3ab8c4764c2505c8e">Cycling distance (km)</td>
              <td id="5cf3a6ebd364d0c020aeb63d045083c8">1.58</td>
              <td id="25f088f75ab8bfc60044f083be7785f7">1.63</td>
              <td id="e811b5516bc8f1086456a4ed9a7fd853">1.57</td>
              <td id="374bce2d11651420b634549e2540a413">1.59</td>
            </tr>
            <tr id="table-row-5c11bfcece116c3f66fd9ef720acf78d">
              <td id="cde0b28e6f7bf516908088c3fb53515f">Walking distance (km)</td>
              <td id="e585df3cf6c79ee8e983b3de8aa48f24">1.53</td>
              <td id="6904729ed2596d53766a68ded7dffb86">1.56</td>
              <td id="819c03fe9d6c8accd375099b589c8aed">1.56</td>
              <td id="b509c91167a284dd481901dfdc46a326">1.54</td>
            </tr>
            <tr id="table-row-9846194fb39a44e255c2e71d8e34e96d">
              <td id="a8883db4a1512b829b06ead7fbff1215">Driving route difference (%)</td>
              <td id="4f673074569deec1f258b744e7d4bafc">15.44</td>
              <td id="f4ad527f2cabcdaad6fbc3e9de8e471a">19.38</td>
              <td id="42eec00fd8dc676ecc8aeab8201f41e6">13.35</td>
              <td id="7032ca0672125a2b787eb82a02c207a8">16.06</td>
            </tr>
            <tr id="table-row-04e006c3360091419e4925df770c38db">
              <td id="dc5f0af0c7757914334a3890711fda30">Cycling route difference (%)</td>
              <td id="96371ac15e4e507b6a58552ab7cc83a9">6.04</td>
              <td id="9f584abb4da7511fc72201335acab046">9.32</td>
              <td id="7ff109cde11e131f39d7d2877819c633">5.30</td>
              <td id="e5eec6d25af368d6418afcbd3eeaa1ae">6.89</td>
            </tr>
            <tr id="table-row-20e884afca0a164c272c43e9970b0872">
              <td id="50294040ce021a9ea630278ed9728e4d">Walking route difference (%)</td>
              <td id="4a168685d0891828eb0b2f7ddc92a272">2.68</td>
              <td id="95f756b97bf55a02a4b4e737b29b3b0d">4.63</td>
              <td id="09b2dea88e0ba7730071d1c7db4449f2">4.63</td>
              <td id="bfc2eeb3ffd7966a03fb3ad7eef16c70">3.98</td>
            </tr>
          </tbody>
        </table>
      </table-wrap>
      <p id="_paragraph-103">Table 2. The performance of GPS trajectory reconstruction</p>
      <list list-type="order" id="list-f411764d0cdee9038087f3c0479b81a0">
        <list-item>
          <p>The computational performance and scalability </p>
        </list-item>
      </list>
      <p id="_paragraph-104">Computational scalability of the proposed framework is tested by changing number of GPS observation from 100 to 5,000. The experimental evaluation is shown in Fig. 8, which illustrates the size of the trajectory with respect to the processing time.</p>
      <fig id="fig8">
        <label>Figure 12</label>
        <caption>
          <p id="_paragraph-105"/>
        </caption>
        <graphic id="_graphic-8" mimetype="image" mime-subtype="png" xlink:href="image8.png"/>
      </fig>
      <p id="_paragraph-106">Fig. 8. Processing time as a function of the number of GPS observations.</p>
      <p id="_paragraph-107">The variability in computational performance is tested by repeating the processing time measurement on different sizes of GPS trajectories. Fig. 9 displays the processing times and time variations for the various numbers of GPS observations.</p>
      <fig id="fig9">
        <label>Figure 13</label>
        <caption>
          <p id="_paragraph-108"/>
        </caption>
        <graphic id="_graphic-9" mimetype="image" mime-subtype="png" xlink:href="image9.png"/>
      </fig>
      <p id="_paragraph-109">Fig. 9. Distribution of processing time across different GPS trajectory sizes</p>
      <p id="_paragraph-110">The mode-specific route analysis is a comparison of the distance of the reconstructed trajectory to the distance of the driving, cycling, and walking routes. The distribution of the differences between the transportation modes for the evaluated GPS trajectories is shown in Fig. 10.</p>
      <fig id="fig10">
        <label>Figure 14</label>
        <caption>
          <p id="_paragraph-111"/>
        </caption>
        <graphic id="_graphic-10" mimetype="image" mime-subtype="png" xlink:href="image10.png"/>
      </fig>
      <p id="_paragraph-112">Fig. 10. Comparison of reconstructed and mode-specific route distances across GPS trajectory traces.</p>
      <p id="_paragraph-113">The experimental results quantitatively measure the accuracy of the trajectory reconstruction, performance of the computation, and the variation of the route distance among different modes, for the tested GPS traces.</p>
      <p id="_paragraph-114">B. Visual Trace Reconstruction </p>
      <p id="_paragraph-115">The proposed framework is effective in transforming GPS observations into continuous and interpretable trajectories. When the road maps are overlaid with the reconstructed traces, the routes followed can easily be visually assessed and when the traces are marked with the time they were recorded, a temporal sequence of the movements can easily be viewed. The other MSR GPS traces also show that the same visualization process can be used for trajectory data of a similar format. </p>
      <p id="_paragraph-116">C. Distance Estimation </p>
      <p id="_paragraph-117">The framework can be used to calculate distance and travel time for driving, bicycling and walking mode. The results show that the estimated routes can be different for each transportation mode because each mode is given a set of road-network and accessibility constraints. Model-dependent estimation is thus a more helpful way to provide the route information than a single mode-independent distance.</p>
      <p id="_paragraph-118">D Sources of Error </p>
      <p id="_paragraph-119">There are two types of potential errors – GPS and trajectory representation. GPS can be misplaced, while the visualisation might be different between two observations in a sequence to show the path traversed. Thus, the representation of the routes should be understood as a visual record of the GPS tracks recorded, not as a true record of the actual path. </p>
    </sec>
    <sec id="heading-fe3b9b002b08ac9c29b5453fd2ff893b">
      <title> 6 . Conclusion </title>
      <p id="_paragraph-121">This paper proposed a framework to reconstruct GPS trajectories and visualize the spatiotemporal information derived from traces in the Microsoft Research (MSR) GPS Privacy Dataset with an R based approach. The framework is composed of GPS data preprocessing, point visualization in map, trajectory reconstruction, distance and travel-time estimation by mode and annotation of timestamps. The results show that trajectory representations that are easy to decipher and understand can be derived from the discrete GPS measurements utilizing a compact visualization workflow. The study offers a hands-on basis for GPS trace analysis and acknowledges that the existing evaluation is qualitative, off-line and relies on external mapping services.</p>
      <p id="_paragraph-122">
        <bold id="_bold-32">7</bold>
        <bold id="_bold-33">. Future Work</bold>
      </p>
      <p id="_paragraph-123">There are a number of opportunities to extend the suggested framework. Future work can be extended to real-time GPS data collection, interactive web-based mapping applications, cloud computing and Internet of Things (IoT). More public datasets can be used to further evaluate reliability and robustness. These enhancements would improve the original system’s features, while preserving its main goal of efficient GPS trajectory visualization.</p>
      <p id="paragraph-24993ae877c2c17dfe8efd3b21676283">
        <bold id="bold-8f39d6b535b5d82ba53ca5c5c46e815f">AI Use Policy</bold>
      </p>
      <p id="paragraph-1">In the preparation of this article, Artificial Intelligence (AI) was used as a supporting tool for language editing, grammar improvement, paraphrasing of selected passages, and refinement of sentence structure to improve the clarity and readability of the manuscript. AI was not used for GPS data collection or processing, R programming and workflow implementation, trajectory reconstruction, distance and travel-time calculations, data analysis, interpretation of the research findings, or the formulation of the conclusions. The authors are fully responsible for the data, analytical procedures, research findings, interpretations, and overall content of the article.</p>
    </sec>
  </body><back/></article>
