Skip to content

Commit b56136c

Browse files
committed
use way_get_list function in gazetteer
1 parent ba890e1 commit b56136c

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

output-gazetteer.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1158,19 +1158,21 @@ static int gazetteer_process_relation(osmid_t id, struct member *members, int me
11581158
int *xcount = malloc( (member_count+1) * sizeof(int) );
11591159
struct keyval *xtags = malloc( (member_count+1) * sizeof(struct keyval) );
11601160
struct osmNode **xnodes = malloc( (member_count+1) * sizeof(struct osmNode*) );
1161+
osmid_t *xid;
1162+
osmid_t *xid2 = malloc( (member_count+1) * sizeof(osmid_t) );
11611163

11621164
count = 0;
11631165
for (i=0; i<member_count; i++)
11641166
{
11651167
/* only interested in ways */
11661168
if (members[i].type != OSMTYPE_WAY)
11671169
continue;
1168-
1169-
initList(&(xtags[count]));
1170-
if (Options->mid->ways_get( members[i].id, &(xtags[count]), &(xnodes[count]), &(xcount[count])))
1171-
continue;
1170+
xid2[count] = members[i].id;
11721171
count++;
11731172
}
1173+
1174+
count = Options->mid->ways_get_list(xid2, count, &xid, xtags, xnodes, xcount);
1175+
11741176
xnodes[count] = NULL;
11751177
xcount[count] = 0;
11761178

@@ -1199,6 +1201,8 @@ static int gazetteer_process_relation(osmid_t id, struct member *members, int me
11991201
free( xnodes[i] );
12001202
}
12011203

1204+
free(xid);
1205+
free(xid2);
12021206
free(xcount);
12031207
free(xtags);
12041208
free(xnodes);

0 commit comments

Comments
 (0)