File: output.h

package info (click to toggle)
osm2pgsql 0.52.20080408-2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 348 kB
  • ctags: 440
  • sloc: ansic: 3,963; sh: 469; cpp: 339; makefile: 125
file content (28 lines) | stat: -rw-r--r-- 804 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/* Common output layer interface */

/* Each output layer must provide methods for 
 * storing:
 * - Nodes (Points of interest etc)
 * - Way geometries
 * Associated tags: name, type etc. 
*/

#ifndef OUTPUT_H
#define OUTPUT_H

#include "keyvals.h"
#include "middle.h"

struct output_t {
    int (*start)(const char *db, const char *prefix, int append);
    void (*stop)(int append);
    void (*cleanup)(void);
    void (*process)(struct middle_t *mid);
    int (*node)(int id, struct keyval *tags, double node_lat, double node_lon);
    int (*way)(int id, struct keyval *tags, struct osmNode *nodes, int count);
    int (*relation)(int id, struct keyval *rel_tags, struct osmNode **nodes, struct keyval **tags, int *count);
};

unsigned int pgsql_filter_tags(struct keyval *tags, int *polygon);

#endif