227 |
char buf[64]; |
char buf[64]; |
228 |
struct tm tm; |
struct tm tm; |
229 |
|
|
230 |
printf("Id: %lu\n", node->id); |
printf("Id: "ITEM_ID_FORMAT"\n", node->id); |
231 |
printf("User: %s\n", node->user?node->user->name:"<unspecified>"); |
printf("User: %s\n", node->user?node->user->name:"<unspecified>"); |
232 |
printf("Visible: %s\n", node->visible?"yes":"no"); |
printf("Visible: %s\n", node->visible?"yes":"no"); |
233 |
|
|
260 |
} |
} |
261 |
|
|
262 |
void osm_way_free(way_t *way) { |
void osm_way_free(way_t *way) { |
263 |
// printf("freeing way #%ld\n", way->id); |
// printf("freeing way #" ITEM_ID_FORMAT "\n", way->id); |
264 |
|
|
265 |
osm_node_chain_free(way->node_chain); |
osm_node_chain_free(way->node_chain); |
266 |
osm_tags_free(way->tag); |
osm_tags_free(way->tag); |
305 |
char buf[64]; |
char buf[64]; |
306 |
struct tm tm; |
struct tm tm; |
307 |
|
|
308 |
printf("Id: %lu\n", way->id); |
printf("Id: "ITEM_ID_FORMAT"\n", way->id); |
309 |
printf("User: %s\n", way->user?way->user->name:"<unspecified>"); |
printf("User: %s\n", way->user?way->user->name:"<unspecified>"); |
310 |
printf("Visible: %s\n", way->visible?"yes":"no"); |
printf("Visible: %s\n", way->visible?"yes":"no"); |
311 |
node_chain_t *node_chain = way->node_chain; |
node_chain_t *node_chain = way->node_chain; |
312 |
while(node_chain) { |
while(node_chain) { |
313 |
printf(" Node: %lu\n", node_chain->node->id); |
printf(" Node: "ITEM_ID_FORMAT"\n", node_chain->node->id); |
314 |
node_chain = node_chain->next; |
node_chain = node_chain->next; |
315 |
} |
} |
316 |
|
|
339 |
|
|
340 |
/* search matching node */ |
/* search matching node */ |
341 |
node_chain->node = osm_get_node_by_id(osm, id); |
node_chain->node = osm_get_node_by_id(osm, id); |
342 |
if(!node_chain->node) printf("Node id %lu not found\n", id); |
if(!node_chain->node) printf("Node id " ITEM_ID_FORMAT " not found\n", id); |
343 |
else node_chain->node->ways++; |
else node_chain->node->ways++; |
344 |
|
|
345 |
xmlFree(prop); |
xmlFree(prop); |
386 |
char buf[64]; |
char buf[64]; |
387 |
struct tm tm; |
struct tm tm; |
388 |
|
|
389 |
printf("Id: %lu\n", relation->id); |
printf("Id: "ITEM_ID_FORMAT"\n", relation->id); |
390 |
printf("User: %s\n", |
printf("User: %s\n", |
391 |
relation->user?relation->user->name:"<unspecified>"); |
relation->user?relation->user->name:"<unspecified>"); |
392 |
printf("Visible: %s\n", relation->visible?"yes":"no"); |
printf("Visible: %s\n", relation->visible?"yes":"no"); |
402 |
|
|
403 |
case NODE: |
case NODE: |
404 |
if(member->object.node) |
if(member->object.node) |
405 |
printf(" Member: Node, id = %lu, role = %s\n", |
printf(" Member: Node, id = " ITEM_ID_FORMAT ", role = %s\n", |
406 |
member->object.node->id, member->role); |
member->object.node->id, member->role); |
407 |
break; |
break; |
408 |
|
|
409 |
case WAY: |
case WAY: |
410 |
if(member->object.way) |
if(member->object.way) |
411 |
printf(" Member: Way, id = %lu, role = %s\n", |
printf(" Member: Way, id = " ITEM_ID_FORMAT ", role = %s\n", |
412 |
member->object.way->id, member->role); |
member->object.way->id, member->role); |
413 |
break; |
break; |
414 |
|
|
415 |
case RELATION: |
case RELATION: |
416 |
if(member->object.relation) |
if(member->object.relation) |
417 |
printf(" Member: Relation, id = %lu, role = %s\n", |
printf(" Member: Relation, id = " ITEM_ID_FORMAT ", role = %s\n", |
418 |
member->object.relation->id, member->role); |
member->object.relation->id, member->role); |
419 |
break; |
break; |
420 |
} |
} |
421 |
|
|
759 |
|
|
760 |
/* search matching node */ |
/* search matching node */ |
761 |
node_chain->node = osm_get_node_by_id(osm, id); |
node_chain->node = osm_get_node_by_id(osm, id); |
762 |
if(!node_chain->node) printf("Node id %lu not found\n", id); |
if(!node_chain->node) printf("Node id " ITEM_ID_FORMAT " not found\n", id); |
763 |
else node_chain->node->ways++; |
else node_chain->node->ways++; |
764 |
|
|
765 |
xmlFree(prop); |
xmlFree(prop); |
1065 |
|
|
1066 |
#include <sys/time.h> |
#include <sys/time.h> |
1067 |
|
|
1068 |
osm_t *osm_parse(char *filename) { |
osm_t *osm_parse(char *path, char *filename) { |
1069 |
|
|
1070 |
struct timeval start; |
struct timeval start; |
1071 |
gettimeofday(&start, NULL); |
gettimeofday(&start, NULL); |
1073 |
LIBXML_TEST_VERSION; |
LIBXML_TEST_VERSION; |
1074 |
|
|
1075 |
// use stream parser |
// use stream parser |
1076 |
osm_t *osm = process_file(filename); |
osm_t *osm = NULL; |
1077 |
|
if(filename[0] == '/') |
1078 |
|
osm = process_file(filename); |
1079 |
|
else { |
1080 |
|
char *full = g_strjoin(NULL, path, filename, NULL); |
1081 |
|
osm = process_file(full); |
1082 |
|
g_free(full); |
1083 |
|
} |
1084 |
|
|
1085 |
xmlCleanupParser(); |
xmlCleanupParser(); |
1086 |
|
|
1087 |
struct timeval end; |
struct timeval end; |
1223 |
|
|
1224 |
xmlDocPtr doc = xmlNewDoc(BAD_CAST "1.0"); |
xmlDocPtr doc = xmlNewDoc(BAD_CAST "1.0"); |
1225 |
xmlNodePtr root_node = xmlNewNode(NULL, BAD_CAST "osm"); |
xmlNodePtr root_node = xmlNewNode(NULL, BAD_CAST "osm"); |
|
#ifndef API06 |
|
|
xmlNewProp(root_node, BAD_CAST "version", BAD_CAST "0.5"); |
|
|
xmlNewProp(root_node, BAD_CAST "generator", BAD_CAST PACKAGE " v" VERSION); |
|
|
#endif |
|
1226 |
xmlDocSetRootElement(doc, root_node); |
xmlDocSetRootElement(doc, root_node); |
1227 |
|
|
1228 |
switch(type) { |
switch(type) { |
1236 |
snprintf(str, sizeof(str), "%u", (unsigned)node->id); |
snprintf(str, sizeof(str), "%u", (unsigned)node->id); |
1237 |
xmlNewProp(node_node, BAD_CAST "id", BAD_CAST str); |
xmlNewProp(node_node, BAD_CAST "id", BAD_CAST str); |
1238 |
} |
} |
|
#ifdef API06 |
|
1239 |
snprintf(str, sizeof(str), "%u", (unsigned)node->version); |
snprintf(str, sizeof(str), "%u", (unsigned)node->version); |
1240 |
xmlNewProp(node_node, BAD_CAST "version", BAD_CAST str); |
xmlNewProp(node_node, BAD_CAST "version", BAD_CAST str); |
1241 |
snprintf(str, sizeof(str), "%u", (unsigned)changeset); |
snprintf(str, sizeof(str), "%u", (unsigned)changeset); |
1242 |
xmlNewProp(node_node, BAD_CAST "changeset", BAD_CAST str); |
xmlNewProp(node_node, BAD_CAST "changeset", BAD_CAST str); |
|
#endif |
|
1243 |
g_ascii_formatd(str, sizeof(str), LL_FORMAT, node->pos.lat); |
g_ascii_formatd(str, sizeof(str), LL_FORMAT, node->pos.lat); |
1244 |
xmlNewProp(node_node, BAD_CAST "lat", BAD_CAST str); |
xmlNewProp(node_node, BAD_CAST "lat", BAD_CAST str); |
1245 |
g_ascii_formatd(str, sizeof(str), LL_FORMAT, node->pos.lon); |
g_ascii_formatd(str, sizeof(str), LL_FORMAT, node->pos.lon); |
1254 |
xmlNodePtr way_node = xmlNewChild(root_node, NULL, BAD_CAST "way", NULL); |
xmlNodePtr way_node = xmlNewChild(root_node, NULL, BAD_CAST "way", NULL); |
1255 |
snprintf(str, sizeof(str), "%u", (unsigned)way->id); |
snprintf(str, sizeof(str), "%u", (unsigned)way->id); |
1256 |
xmlNewProp(way_node, BAD_CAST "id", BAD_CAST str); |
xmlNewProp(way_node, BAD_CAST "id", BAD_CAST str); |
|
#ifdef API06 |
|
1257 |
snprintf(str, sizeof(str), "%u", (unsigned)way->version); |
snprintf(str, sizeof(str), "%u", (unsigned)way->version); |
1258 |
xmlNewProp(way_node, BAD_CAST "version", BAD_CAST str); |
xmlNewProp(way_node, BAD_CAST "version", BAD_CAST str); |
1259 |
snprintf(str, sizeof(str), "%u", (unsigned)changeset); |
snprintf(str, sizeof(str), "%u", (unsigned)changeset); |
1260 |
xmlNewProp(way_node, BAD_CAST "changeset", BAD_CAST str); |
xmlNewProp(way_node, BAD_CAST "changeset", BAD_CAST str); |
|
#endif |
|
1261 |
|
|
1262 |
node_chain_t *node_chain = way->node_chain; |
node_chain_t *node_chain = way->node_chain; |
1263 |
while(node_chain) { |
while(node_chain) { |
1264 |
xmlNodePtr nd_node = xmlNewChild(way_node, NULL, BAD_CAST "nd", NULL); |
xmlNodePtr nd_node = xmlNewChild(way_node, NULL, BAD_CAST "nd", NULL); |
1265 |
char *str = g_strdup_printf("%ld", node_chain->node->id); |
char *str = g_strdup_printf(ITEM_ID_FORMAT, node_chain->node->id); |
1266 |
xmlNewProp(nd_node, BAD_CAST "ref", BAD_CAST str); |
xmlNewProp(nd_node, BAD_CAST "ref", BAD_CAST str); |
1267 |
g_free(str); |
g_free(str); |
1268 |
node_chain = node_chain->next; |
node_chain = node_chain->next; |
1279 |
BAD_CAST "relation", NULL); |
BAD_CAST "relation", NULL); |
1280 |
snprintf(str, sizeof(str), "%u", (unsigned)relation->id); |
snprintf(str, sizeof(str), "%u", (unsigned)relation->id); |
1281 |
xmlNewProp(rel_node, BAD_CAST "id", BAD_CAST str); |
xmlNewProp(rel_node, BAD_CAST "id", BAD_CAST str); |
|
#ifdef API06 |
|
1282 |
snprintf(str, sizeof(str), "%u", (unsigned)relation->version); |
snprintf(str, sizeof(str), "%u", (unsigned)relation->version); |
1283 |
xmlNewProp(rel_node, BAD_CAST "version", BAD_CAST str); |
xmlNewProp(rel_node, BAD_CAST "version", BAD_CAST str); |
1284 |
snprintf(str, sizeof(str), "%u", (unsigned)changeset); |
snprintf(str, sizeof(str), "%u", (unsigned)changeset); |
1285 |
xmlNewProp(rel_node, BAD_CAST "changeset", BAD_CAST str); |
xmlNewProp(rel_node, BAD_CAST "changeset", BAD_CAST str); |
|
#endif |
|
1286 |
|
|
1287 |
member_t *member = relation->member; |
member_t *member = relation->member; |
1288 |
while(member) { |
while(member) { |
1292 |
switch(member->object.type) { |
switch(member->object.type) { |
1293 |
case NODE: |
case NODE: |
1294 |
xmlNewProp(m_node, BAD_CAST "type", BAD_CAST "node"); |
xmlNewProp(m_node, BAD_CAST "type", BAD_CAST "node"); |
1295 |
str = g_strdup_printf("%ld", member->object.node->id); |
str = g_strdup_printf(ITEM_ID_FORMAT, member->object.node->id); |
1296 |
break; |
break; |
1297 |
|
|
1298 |
case WAY: |
case WAY: |
1299 |
xmlNewProp(m_node, BAD_CAST "type", BAD_CAST "way"); |
xmlNewProp(m_node, BAD_CAST "type", BAD_CAST "way"); |
1300 |
str = g_strdup_printf("%ld", member->object.way->id); |
str = g_strdup_printf(ITEM_ID_FORMAT, member->object.way->id); |
1301 |
break; |
break; |
1302 |
|
|
1303 |
case RELATION: |
case RELATION: |
1304 |
xmlNewProp(m_node, BAD_CAST "type", BAD_CAST "relation"); |
xmlNewProp(m_node, BAD_CAST "type", BAD_CAST "relation"); |
1305 |
str = g_strdup_printf("%ld", member->object.relation->id); |
str = g_strdup_printf(ITEM_ID_FORMAT, member->object.relation->id); |
1306 |
break; |
break; |
1307 |
|
|
1308 |
default: |
default: |
1529 |
node->visible = TRUE; |
node->visible = TRUE; |
1530 |
node->time = time(NULL); |
node->time = time(NULL); |
1531 |
|
|
|
#ifndef API06 |
|
|
/* add created_by tag */ |
|
|
node->tag = g_new0(tag_t, 1); |
|
|
node->tag->key = g_strdup("created_by"); |
|
|
node->tag->value = g_strdup(PACKAGE " v" VERSION); |
|
|
#endif |
|
|
|
|
1532 |
/* convert screen position back to ll */ |
/* convert screen position back to ll */ |
1533 |
lpos2pos(osm->bounds, &node->lpos, &node->pos); |
lpos2pos(osm->bounds, &node->lpos, &node->pos); |
1534 |
|
|
1569 |
way->flags = OSM_FLAG_NEW; |
way->flags = OSM_FLAG_NEW; |
1570 |
way->time = time(NULL); |
way->time = time(NULL); |
1571 |
|
|
|
#ifndef API06 |
|
|
/* add created_by tag */ |
|
|
way->tag = g_new0(tag_t, 1); |
|
|
way->tag->key = g_strdup("created_by"); |
|
|
way->tag->value = g_strdup(PACKAGE " v" VERSION); |
|
|
#endif |
|
|
|
|
1572 |
return way; |
return way; |
1573 |
} |
} |
1574 |
|
|
1592 |
|
|
1593 |
/* new nodes aren't stored on the server and are just deleted permanently */ |
/* new nodes aren't stored on the server and are just deleted permanently */ |
1594 |
if(node->flags & OSM_FLAG_NEW) { |
if(node->flags & OSM_FLAG_NEW) { |
1595 |
printf("About to delete NEW node #%ld -> force permanent delete\n", |
printf("About to delete NEW node #" ITEM_ID_FORMAT |
1596 |
node->id); |
" -> force permanent delete\n", node->id); |
1597 |
permanently = TRUE; |
permanently = TRUE; |
1598 |
} |
} |
1599 |
|
|
1629 |
} |
} |
1630 |
|
|
1631 |
if(!permanently) { |
if(!permanently) { |
1632 |
printf("mark node #%ld as deleted\n", node->id); |
printf("mark node #" ITEM_ID_FORMAT " as deleted\n", node->id); |
1633 |
node->flags |= OSM_FLAG_DELETED; |
node->flags |= OSM_FLAG_DELETED; |
1634 |
} else { |
} else { |
1635 |
printf("permanently delete node #%ld\n", node->id); |
printf("permanently delete node #" ITEM_ID_FORMAT "\n", node->id); |
1636 |
|
|
1637 |
/* remove it from the chain */ |
/* remove it from the chain */ |
1638 |
node_t **cnode = &osm->node; |
node_t **cnode = &osm->node; |
1785 |
/* be deleted */ |
/* be deleted */ |
1786 |
void osm_node_remove_from_relation(osm_t *osm, node_t *node) { |
void osm_node_remove_from_relation(osm_t *osm, node_t *node) { |
1787 |
relation_t *relation = osm->relation; |
relation_t *relation = osm->relation; |
1788 |
printf("removing node #%ld from all relations:\n", node->id); |
printf("removing node #" ITEM_ID_FORMAT " from all relations:\n", node->id); |
1789 |
|
|
1790 |
while(relation) { |
while(relation) { |
1791 |
member_t **member = &relation->member; |
member_t **member = &relation->member; |
1793 |
if(((*member)->object.type == NODE) && |
if(((*member)->object.type == NODE) && |
1794 |
((*member)->object.node == node)) { |
((*member)->object.node == node)) { |
1795 |
|
|
1796 |
printf(" from relation #%ld\n", relation->id); |
printf(" from relation #" ITEM_ID_FORMAT "\n", relation->id); |
1797 |
|
|
1798 |
member_t *cur = *member; |
member_t *cur = *member; |
1799 |
*member = (*member)->next; |
*member = (*member)->next; |
1810 |
/* remove the given way from all relations */ |
/* remove the given way from all relations */ |
1811 |
void osm_way_remove_from_relation(osm_t *osm, way_t *way) { |
void osm_way_remove_from_relation(osm_t *osm, way_t *way) { |
1812 |
relation_t *relation = osm->relation; |
relation_t *relation = osm->relation; |
1813 |
printf("removing way #%ld from all relations:\n", way->id); |
printf("removing way #" ITEM_ID_FORMAT " from all relations:\n", way->id); |
1814 |
|
|
1815 |
while(relation) { |
while(relation) { |
1816 |
member_t **member = &relation->member; |
member_t **member = &relation->member; |
1818 |
if(((*member)->object.type == WAY) && |
if(((*member)->object.type == WAY) && |
1819 |
((*member)->object.way == way)) { |
((*member)->object.way == way)) { |
1820 |
|
|
1821 |
printf(" from relation #%ld\n", relation->id); |
printf(" from relation #" ITEM_ID_FORMAT "\n", relation->id); |
1822 |
|
|
1823 |
member_t *cur = *member; |
member_t *cur = *member; |
1824 |
*member = (*member)->next; |
*member = (*member)->next; |
1841 |
relation->flags = OSM_FLAG_NEW; |
relation->flags = OSM_FLAG_NEW; |
1842 |
relation->time = time(NULL); |
relation->time = time(NULL); |
1843 |
|
|
|
#ifndef API06 |
|
|
/* add created_by tag */ |
|
|
relation->tag = g_new0(tag_t, 1); |
|
|
relation->tag->key = g_strdup("created_by"); |
|
|
relation->tag->value = g_strdup(PACKAGE " v" VERSION); |
|
|
#endif |
|
|
|
|
1844 |
return relation; |
return relation; |
1845 |
} |
} |
1846 |
|
|
1862 |
|
|
1863 |
/* new ways aren't stored on the server and are just deleted permanently */ |
/* new ways aren't stored on the server and are just deleted permanently */ |
1864 |
if(way->flags & OSM_FLAG_NEW) { |
if(way->flags & OSM_FLAG_NEW) { |
1865 |
printf("About to delete NEW way #%ld -> force permanent delete\n", |
printf("About to delete NEW way #" ITEM_ID_FORMAT |
1866 |
way->id); |
" -> force permanent delete\n", way->id); |
1867 |
permanently = TRUE; |
permanently = TRUE; |
1868 |
} |
} |
1869 |
|
|
1872 |
while(*chain) { |
while(*chain) { |
1873 |
|
|
1874 |
(*chain)->node->ways--; |
(*chain)->node->ways--; |
1875 |
printf("checking node #%ld (still used by %d)\n", |
printf("checking node #" ITEM_ID_FORMAT " (still used by %d)\n", |
1876 |
(*chain)->node->id, (*chain)->node->ways); |
(*chain)->node->id, (*chain)->node->ways); |
1877 |
|
|
1878 |
/* this node must only be part of this way */ |
/* this node must only be part of this way */ |
1898 |
way->node_chain = NULL; |
way->node_chain = NULL; |
1899 |
|
|
1900 |
if(!permanently) { |
if(!permanently) { |
1901 |
printf("mark way #%ld as deleted\n", way->id); |
printf("mark way #" ITEM_ID_FORMAT " as deleted\n", way->id); |
1902 |
way->flags |= OSM_FLAG_DELETED; |
way->flags |= OSM_FLAG_DELETED; |
1903 |
} else { |
} else { |
1904 |
printf("permanently delete way #%ld\n", way->id); |
printf("permanently delete way #" ITEM_ID_FORMAT "\n", way->id); |
1905 |
|
|
1906 |
/* remove it from the chain */ |
/* remove it from the chain */ |
1907 |
way_t **cway = &osm->way; |
way_t **cway = &osm->way; |
1926 |
/* new relations aren't stored on the server and are just */ |
/* new relations aren't stored on the server and are just */ |
1927 |
/* deleted permanently */ |
/* deleted permanently */ |
1928 |
if(relation->flags & OSM_FLAG_NEW) { |
if(relation->flags & OSM_FLAG_NEW) { |
1929 |
printf("About to delete NEW relation #%ld -> force permanent delete\n", |
printf("About to delete NEW relation #" ITEM_ID_FORMAT |
1930 |
relation->id); |
" -> force permanent delete\n", relation->id); |
1931 |
permanently = TRUE; |
permanently = TRUE; |
1932 |
} |
} |
1933 |
|
|
1935 |
/* don't have any reference to the relation they are part of */ |
/* don't have any reference to the relation they are part of */ |
1936 |
|
|
1937 |
if(!permanently) { |
if(!permanently) { |
1938 |
printf("mark relation #%ld as deleted\n", relation->id); |
printf("mark relation #" ITEM_ID_FORMAT " as deleted\n", relation->id); |
1939 |
relation->flags |= OSM_FLAG_DELETED; |
relation->flags |= OSM_FLAG_DELETED; |
1940 |
} else { |
} else { |
1941 |
printf("permanently delete relation #%ld\n", relation->id); |
printf("permanently delete relation #" ITEM_ID_FORMAT "\n", relation->id); |
1942 |
|
|
1943 |
/* remove it from the chain */ |
/* remove it from the chain */ |
1944 |
relation_t **crelation = &osm->relation; |
relation_t **crelation = &osm->relation; |
2197 |
return g_strdup_printf("%s #<unspec>", type_str); |
return g_strdup_printf("%s #<unspec>", type_str); |
2198 |
break; |
break; |
2199 |
case NODE: |
case NODE: |
2200 |
return g_strdup_printf("%s #%ld", type_str, object->node->id); |
return g_strdup_printf("%s #" ITEM_ID_FORMAT, type_str, object->node->id); |
2201 |
break; |
break; |
2202 |
case WAY: |
case WAY: |
2203 |
return g_strdup_printf("%s #%ld", type_str, object->way->id); |
return g_strdup_printf("%s #" ITEM_ID_FORMAT, type_str, object->way->id); |
2204 |
break; |
break; |
2205 |
case RELATION: |
case RELATION: |
2206 |
return g_strdup_printf("%s #%ld", type_str, object->relation->id); |
return g_strdup_printf("%s #" ITEM_ID_FORMAT, type_str, |
2207 |
|
object->relation->id); |
2208 |
break; |
break; |
2209 |
case NODE_ID: |
case NODE_ID: |
2210 |
case WAY_ID: |
case WAY_ID: |
2211 |
case RELATION_ID: |
case RELATION_ID: |
2212 |
return g_strdup_printf("%s #%ld", type_str, object->id); |
return g_strdup_printf("%s #" ITEM_ID_FORMAT, type_str, object->id); |
2213 |
break; |
break; |
2214 |
} |
} |
2215 |
return NULL; |
return NULL; |
2223 |
return NULL; |
return NULL; |
2224 |
break; |
break; |
2225 |
case NODE: |
case NODE: |
2226 |
return g_strdup_printf("#%ld", object->node->id); |
return g_strdup_printf("#"ITEM_ID_FORMAT, object->node->id); |
2227 |
break; |
break; |
2228 |
case WAY: |
case WAY: |
2229 |
return g_strdup_printf("#%ld", object->way->id); |
return g_strdup_printf("#"ITEM_ID_FORMAT, object->way->id); |
2230 |
break; |
break; |
2231 |
case RELATION: |
case RELATION: |
2232 |
return g_strdup_printf("#%ld", object->relation->id); |
return g_strdup_printf("#"ITEM_ID_FORMAT, object->relation->id); |
2233 |
break; |
break; |
2234 |
case NODE_ID: |
case NODE_ID: |
2235 |
case WAY_ID: |
case WAY_ID: |
2236 |
case RELATION_ID: |
case RELATION_ID: |
2237 |
return g_strdup_printf("#%ld", object->id); |
return g_strdup_printf("#"ITEM_ID_FORMAT, object->id); |
2238 |
break; |
break; |
2239 |
} |
} |
2240 |
return NULL; |
return NULL; |