]> err.no Git - mapper/commitdiff
Basic preparation for relations (Let XML parser know about the tags)
authorKaj-Michael Lang <milang@tal.org>
Tue, 30 Oct 2007 22:17:24 +0000 (00:17 +0200)
committerKaj-Michael Lang <milang@tal.org>
Tue, 30 Oct 2007 22:17:24 +0000 (00:17 +0200)
src/osm.c

index 57356ce64b6ca1a406836b4c25f7ba8be9529efe..79c349c881635e6c220cfa7c77da04f86e56c19f 100644 (file)
--- 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;