/[zanavi_public1]/navit/navit/maptool/osm_psql.c
ZANavi

Diff of /navit/navit/maptool/osm_psql.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 30 Revision 31
26#include "file.h" 26#include "file.h"
27#ifdef HAVE_POSTGRESQL 27#ifdef HAVE_POSTGRESQL
28#include <libpq-fe.h> 28#include <libpq-fe.h>
29 29
30int 30int
31map_collect_data_osm_db(char *dbstr, FILE *out_ways, FILE *out_nodes, FILE *out_turn_restrictions, FILE *out_boundaries) 31map_collect_data_osm_db(char *dbstr, struct maptool_osm *osm)
32{ 32{
33 PGconn *conn; 33 PGconn *conn;
34 PGresult *res,*node,*way,*tag; 34 PGresult *res,*node,*way,*tag;
35 int count,tagged,i,j,k; 35 int count,tagged,i,j,k;
36 long min, max, id, tag_id, node_id; 36 long min, max, id, tag_id, node_id;
106 if (tag_id < id) 106 if (tag_id < id)
107 j++; 107 j++;
108 if (tag_id > id) 108 if (tag_id > id)
109 break; 109 break;
110 } 110 }
111 osm_end_node(out_nodes); 111 osm_end_node(osm);
112 } 112 }
113 PQclear(tag); 113 PQclear(tag);
114 PQclear(node); 114 PQclear(node);
115 } 115 }
116 for (;;) { 116 for (;;) {
167 j++; 167 j++;
168 if (tag_id > id) 168 if (tag_id > id)
169 break; 169 break;
170 } 170 }
171 if (tagged) 171 if (tagged)
172 osm_end_way(out_ways); 172 osm_end_way(osm);
173 } 173 }
174 PQclear(tag); 174 PQclear(tag);
175 PQclear(node); 175 PQclear(node);
176 PQclear(way); 176 PQclear(way);
177 } 177 }

Legend:
Removed from v.30  
changed lines
  Added in v.31

   
Visit the ZANavi Wiki