source: subversion/applications/utils/export/osm2pgsql/output-null.c @ 27278

Last change on this file since 27278 was 26020, checked in by frederik, 9 years ago

Branch of osm2pgsql that does not use intarray. Unsure if it works
with Postgres 8.3; does work with 8.4. Performance seems to be
identical to original; this version can be compiled with -DOSMID64
(or #define OSMID64 in osmtypes.h) to support OSM IDs larger than
a 4 byte integer. Using this option seems to increase database size
by something like 10%, and not significantly affect speed.

Not tested with Postgres 9.0; also, tire expiry and gazetteer functions
are untested (even though there's little reason to believe they should
be broken).

File size: 1.8 KB
Line 
1#include <stdio.h>
2#include <unistd.h>
3#include <stdlib.h>
4#include <string.h>
5#include <assert.h>
6#include <errno.h>
7
8#include "osmtypes.h"
9#include "output.h"
10#include "output-null.h"
11
12#define UNUSED  __attribute__ ((unused))
13
14static void null_out_cleanup(void) {
15}
16
17static int null_out_start(const struct output_options *opt UNUSED) {
18    return 0;
19}
20
21static void null_out_stop() {
22}
23
24static int null_add_node(osmid_t a UNUSED, double b UNUSED, double c UNUSED, struct keyval *k UNUSED) {
25  return 0;
26}
27
28static int null_add_way(osmid_t a UNUSED, osmid_t *b UNUSED, int c UNUSED, struct keyval *k UNUSED) {
29  return 0;
30}
31
32static int null_add_relation(osmid_t a UNUSED, struct member *b UNUSED, int c UNUSED, struct keyval *k UNUSED) {
33  return 0;
34}
35
36static int null_delete_node(osmid_t i UNUSED) {
37  return 0;
38}
39
40static int null_delete_way(osmid_t i UNUSED) {
41  return 0;
42}
43
44static int null_delete_relation(osmid_t i UNUSED) {
45  return 0;
46}
47
48static int null_modify_node(osmid_t a UNUSED, double b UNUSED, double c UNUSED, struct keyval * k UNUSED) {
49  return 0;
50}
51
52static int null_modify_way(osmid_t a UNUSED, osmid_t * b UNUSED, int c UNUSED, struct keyval * k UNUSED) {
53  return 0;
54}
55
56static int null_modify_relation(osmid_t a UNUSED, struct member * b UNUSED, int c UNUSED, struct keyval * k UNUSED) {
57  return 0;
58}
59
60struct output_t out_null = {
61 .start           = null_out_start,
62 .stop            = null_out_stop,
63 .cleanup         = null_out_cleanup,
64 .node_add        = null_add_node,
65 .way_add         = null_add_way,
66 .relation_add    = null_add_relation,
67 
68 .node_modify     = null_modify_node,
69 .way_modify      = null_modify_way,
70 .relation_modify = null_modify_relation,
71 
72 .node_delete     = null_delete_node,
73 .way_delete      = null_delete_way,
74 .relation_delete = null_delete_relation
75};
Note: See TracBrowser for help on using the repository browser.