MobilityDB 1.3
Loading...
Searching...
No Matches
Data Structures | Macros | Functions | Variables
06_berlinmod_clip.c File Reference

A simple program that reads from a CSV file synthetic trip data in Brussels generated by the MobilityDB-BerlinMOD generator https://github.com/MobilityDB/MobilityDB-BerlinMOD and generate statics about the Brussels communes (or municipalities) traversed by the trips. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <meos.h>
#include <meos_geo.h>

Data Structures

struct  commune_record
 
struct  region_record
 
struct  trip_record
 

Macros

#define MAX_LENGTH_DATE   12
 
#define MAX_LENGTH_GEOM   100001
 
#define MAX_LENGTH_HEADER   1024
 
#define MAX_LENGTH_MATRIX   65536
 
#define MAX_LENGTH_NAME   101
 
#define MAX_LENGTH_TRIP   400001
 Maximum length in characters of a trip in the input data. More...
 
#define NO_COMMUNES   19
 
#define NO_VEHICLES   5
 

Functions

int main (void)
 
void matrix_print (double distance[NO_VEHICLES+1][NO_COMMUNES+3], bool all_communes)
 Print a distance matrix in tabular form. More...
 
int read_brussels_region (void)
 
int read_communes (void)
 

Variables

region_record brussels_region
 
commune_record communes [NO_COMMUNES]
 
char date_buffer [MAX_LENGTH_DATE]
 
double distance [NO_VEHICLES+1][NO_COMMUNES+3] = {0}
 
char geo_buffer [MAX_LENGTH_GEOM]
 
char header_buffer [MAX_LENGTH_HEADER]
 
char trip_buffer [MAX_LENGTH_TRIP]
 

Detailed Description

A simple program that reads from a CSV file synthetic trip data in Brussels generated by the MobilityDB-BerlinMOD generator https://github.com/MobilityDB/MobilityDB-BerlinMOD and generate statics about the Brussels communes (or municipalities) traversed by the trips.

The input files are

The program can be build as follows

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