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

A simple program that reads two CSV files, the first one containing temporal points and the second containing geometries and restricts the temporal point to the geometries. More...

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

Macros

#define MAX_LENGTH_GEO   12001
 
#define MAX_LENGTH_HEADER   1024
 
#define MAX_LENGTH_TCBUFFER   7501
 

Functions

int main (void)
 

Detailed Description

A simple program that reads two CSV files, the first one containing temporal points and the second containing geometries and restricts the temporal point to the geometries.

The corresponding SQL query would be

SELECT t1.k, t2.k, numInstants(atGeometry(temp, g))
FROM tbl_tgeompoint t1, tbl_geom t2
WHERE atGeometry(temp, g) IS NOT NULL;

The program can be build as follows

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