## 4 Formalization of the Integration Approach
### Algebraic Specification of the Abstract Data Types for Earth Observation  
Before we can define steps in the processing chain of environmental observations (by functions) and introducing ADTs for representing intermediate and final integration results, we have to establish an ontology that captures the building blocks of observations, _i.e._, the inner layer of the diagrams presented above (in Section 2.3). This should not only cover physical sensing procedures and environmental simulation, but also VGI. Since a basic observation algebra is already available [44], we can re-use ADTs, such as a construct for measurement values, _i.e._, for raw data that is the result of a measurement. However, we extend the initial \"Value\" ADT by messages and images:  
**data** Value = Measure Float Unit | Category String | Message String | Image [[Pixel]]...  
\begin{table}
\begin{tabular}{c l} \hline \hline
**Haskell construct** & \multicolumn{1}{c}{**Explanation**} \\ \hline \multirow{6}{*}{**data**} & _Algebraic data types_ (which, for the purpose of this work, can be seen as synonyms to ADTs) introduce types by specifying a constructor function. The keyword (**data**) is followed by a type name, an equal sign and the constructor function. The first element of this function is its name. Constructor functions can be enumerated using the ‘\(|\)’ symbol. Lists can be typed using the construct “[]” (also nested). \\  & **data** Value = Measure Float Unit |... | Image [[Pixel]] \\  & _Type synonyms_ give previously defined types a new name. They are used for clarifying the meaning of existing types in new contexts. \\  & **type** Hotspot = ObservationResult \\  & _Type classes_ collect types that share certain behavior. This behavior is defined by a selector function. The keyword is followed by the name of the type class and its parameters. Selection functions are specified after the keyword ‘where’. \\  & **class** STIMULI quality entity agent **where** \\  & **perceive :: quality entity \(\rightarrow\) agent \(\rightarrow\) agent** \\  & _Instances_ connect algebraic data types to type classes. In an instantiation, axioms specify how the algebraic data types implement the behavior specified for the type class. The keyword is followed by the name of the type class and the assignment of its parameters to algebraic data types. \\  & **instance** OBSERVATIONS VGI Volunteer VGISensor where... \\  & **Contexts assert constraints on algebraic data types, may by assigned to the parameters of a type class. Constraints are places after the keyword class and end with the symbol “\(\Rightarrow\)”. \\  & **class** STIMULI quality entity agent \(\Rightarrow\) OBSERVATIONS quality entity agent \\  & Functions are introduced by their signature, which consists of a function name, the symbol ‘\(\therefore\)’ and the function parameters (at least one), separated by ‘\(\text{\  
The result of an observation consists of a measurement value, a message, an image--each combined with a position and time--or of a set of such elements. We thus extend the basic ADT that has been suggested for an observation in [44] by a construct for multiple observation results:  
**data** ObservationResult = Observation Value Position ClockTime | ObservationResults  
[ObservationResult]  
On this basis, we can define sensing devices, which are able to perceive stimuli from their environment and express them as data. According to our examples, we introduce VGI sensors (following [12] and [17]) and earth observation satellites. In the former case, people that act as volunteers have a particular offering of VGI (quality), _i.e._, some kind of media content associated with spatio-temporal locations, which they upload and thereby produce a stimulus to the VGI sensor. We can re-use the previously introduced \"ObservationResult\" for representing this information held by the volunteer.