MobilityDB 1.1

◆ NO_INSTANTS_BATCH

#define NO_INSTANTS_BATCH   1000

A simple program that reads AIS data from a CSV file, converts them into temporal values, and stores them in MobilityDB.

This program uses the libpq library https://www.postgresql.org/docs/current/libpq.html for connecting to a PostgreSQL database that has the MobilityDB extension. For this, it is required that libpq-dev is installed in your system. For example, in Ubuntu you can install this library as follows

sudo apt-get install libpq-dev

You should configure PostgreSQL to accept all incoming connections by setting in the pg_hba.conf file

host all all 0.0.0.0/0 md5

Also, make sure that PostgreSQL allows incoming connections on all available IP interfaces by setting in the postgresql.conf file

listen_addresses = '*'

This program is based on the libpq example programs https://www.postgresql.org/docs/current/libpq-example.html Please read the assumptions made about the input file aisinput.csv in the file meos_read_ais.c in the same directory.

The program can be build as follows

gcc -Wall -g -I/usr/local/include -I/usr/include/postgresql -o 04_meos_store_ais 04_meos_store_ais.c -L/usr/local/lib -lmeos -lpq