Skip to content

Tutorial Using Edge Based Techniques Part 2

gwlucastrig edited this page Feb 17, 2026 · 35 revisions

Under Construction: More content coming soon.

Introduction

In Part I of this series of wiki articles, we described how to use Tinfour's pinwheel iterator to identify the immediate neighbors of a vertex in a Delaunay triangulation. In this second part of the Tutorial Using Edge-Based Techniques we will look at how we can use that concept to implement an application that detects anomalous sample points within a data survey.

The demonstration application we present here is based on the algorithms and ideas described in the Tinfour Project Notes webpage Using the Delaunay triangulation to detect anomalies in unstructured data. That article offered a real-world example that detected problematic temperature reports in a set of weather observations collected for a single hour in March of 2019. At that time, there was a significant error in data reported by a weather station located in the Gulf of Mexico. The article describes how errors and other anomalies could be detected by comparing data for one vertex to values obtained for its neighbors. In general, Tinfour's Project Notes center on concepts that could be applied using any software library that supported the Delaunay triangulation while these wiki pages focus on concrete implementations using the Tinfour API. So in these notes, we will look at the specific code techniques we used to obtain the results in the Project Notes.

The test data: Meterological Aerodrome Reports (METARs)

In the aviation and weather communities, real-time meteorological data is collected from a global network of weather stations which report observations once an hour. These reports are issued in text-based messages using a standard format known as the Meterological Aerodrome Report, or METAR. For this tutorial, we downloaded historical METARs from the U.S. National Center for Atmospheric Research (NCAR). While the processing of the raw data is outside the scope of this article, the data that we use in the example code below consists of a Java array of objects of type Metar with the following layout:

    class Metar {
        String stationID;  // Four uppercase letters or numerical digits
        double latitude;
        double longitude;    // in range -180 to 180
        int    temperature;
    };

Clone this wiki locally