MobilityDB 1.3
Loading...
Searching...
No Matches
Macros | Functions
tbl_temporal_value.c File Reference

A simple program that reads two CSV files, the first one containing temporal values and the second containing non-temporal values and apply a function to them. More...

#include <stdio.h>
#include <stdlib.h>
#include <meos.h>
#include <meos_geo.h>
#include <meos_cbuffer.h>
#include <meos_npoint.h>
#include <meos_pose.h>

Macros

#define MAX_LENGTH_HEADER   1024
 
#define MAX_LENGTH_TEMP   8192
 
#define MAX_LENGTH_VALUE   12001
 

Functions

int main (void)
 

Detailed Description

A simple program that reads two CSV files, the first one containing temporal values and the second containing non-temporal values and apply a function to them.

The corresponding SQL query would be

SELECT t1.k, t2.k, numInstants(atTime(temp, t))
FROM tbl_tfloat t1, tbl_tstzspan t2
WHERE atTime(temp, t) IS NOT NULL;

The program can be build as follows

gcc -Wall -g -I/usr/local/include -o tbl_temporal_value tbl_temporal_value.c -L/usr/local/lib -lmeos