From: Kaj-Michael Lang Date: Tue, 30 Oct 2007 22:17:24 +0000 (+0200) Subject: Basic preparation for relations (Let XML parser know about the tags) X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=07979798026e383768bf2858c6062ee781cf76eb;p=mapper Basic preparation for relations (Let XML parser know about the tags) --- diff --git a/src/osm.c b/src/osm.c index 57356ce..79c349c 100644 --- a/src/osm.c +++ b/src/osm.c @@ -129,6 +129,7 @@ typedef enum { IN_KEY_TAG, IN_BOUND_TAG, IN_RELATION_TAG, + IN_MEMBER_TAG, END, ERROR } tag_state_t; @@ -764,6 +765,8 @@ else if (strcmp(tag,"way")==0) return IN_WAY_TAG; else if (strcmp(tag,"tag")==0) return IN_KEY_TAG; else if (strcmp(tag,"osm")==0) return IN_OSM_TAG; else if (strcmp(tag,"bound")==0) return IN_BOUND_TAG; +else if (strcmp(tag,"relation")==0) return IN_RELATION_TAG; +else if (strcmp(tag,"member")==0) return IN_MEMBER_TAG; else return ERROR; } @@ -1270,12 +1273,20 @@ switch (t) { } break; case IS_RELATION: + break; } break; case IN_BOUND_TAG: /* Ignore for now */ g_printf("Ignoring bound tag\n"); + break; + case IN_RELATION_TAG: + tag_parent=IS_RELATION; + + break; + case IN_MEMBER_TAG: + break; default: tag_parent=IS_NONE;