#undef LOCAL_DEBUG
-#include <ucw/lib.h>
+#include "leo.h"
+#include "osm.h"
+
#include <ucw/fastbuf.h>
#include <ucw-xml/xml.h>
#include <stdio.h>
#include <stdlib.h>
-#include "leo.h"
-#include "osm.h"
-
static void parse_tag(struct xml_context *ctx, struct osm_object *o, struct xml_node *t)
{
char *tag_k = xml_attr_value(ctx, t, "k");
static void parse_element(struct xml_context *ctx, struct xml_node *e)
{
+ // JOSM marks deleted, but not uploaded, objects
+ char *action = xml_attr_value(ctx, e, "action");
+ if (action && !strcmp(action, "delete"))
+ return;
+
if (!strcmp(e->name, "node"))
parse_node(ctx, e);
else if (!strcmp(e->name, "way"))