[gnome-maps/wip/osm-edit] osmShim: Add OSM XML library using libxml2.
- From: Marcus Lundblad <mlundblad src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps/wip/osm-edit] osmShim: Add OSM XML library using libxml2.
- Date: Thu, 30 Apr 2015 21:40:29 +0000 (UTC)
commit 02a5e2161b370b3727a9d788e7b225913c5b99a1
Author: Marcus Lundblad <ml update uu se>
Date: Sun Mar 22 20:17:42 2015 +0100
osmShim: Add OSM XML library using libxml2.
Shim library routines used to parse OSM XML objects into GObject representations
of OSM objects.
lib/maps-osm.c | 16 +++++-----------
1 files changed, 5 insertions(+), 11 deletions(-)
---
diff --git a/lib/maps-osm.c b/lib/maps-osm.c
index 902a0d7..03490f8 100644
--- a/lib/maps-osm.c
+++ b/lib/maps-osm.c
@@ -264,22 +264,16 @@ maps_osm_parse_node (const char *content, guint length)
return NULL;
}
-
- g_debug ("version parsed: %s\n", version_string);
-
id = g_ascii_strtoull (id_string, NULL, 10);
changeset = g_ascii_strtoull (changeset_string, NULL, 10);
version = g_ascii_strtoull (version_string, NULL, 10);
lon = g_ascii_strtod (lon_string, NULL);
lat = g_ascii_strtod (lat_string, NULL);
-
+
g_hash_table_destroy (attributes);
result = maps_osm_node_new (id, version, changeset, lon, lat);
- g_debug ("version: %d\n",
- maps_osm_object_get_version (MAPS_OSMOBJECT (result)));
-
tags = parse_tags (node->children);
fill_tags (MAPS_OSMOBJECT (result), tags);
@@ -347,8 +341,8 @@ maps_osm_parse_way (const char *content, guint length)
changeset = g_ascii_strtoull (changeset_string, NULL, 10);
version = g_ascii_strtoull (version_string, NULL, 10);
- result = maps_osm_way_new (id, changeset, version);
-
+ result = maps_osm_way_new (id, version, changeset);
+
tags = parse_tags (way->children);
fill_tags (MAPS_OSMOBJECT (result), tags);
g_hash_table_destroy (tags);
@@ -476,8 +470,8 @@ maps_osm_parse_relation (const char *content, guint length)
changeset = g_ascii_strtoull (changeset_string, NULL, 10);
version = g_ascii_strtoull (version_string, NULL, 10);
- result = maps_osm_relation_new (id, changeset, version);
-
+ result = maps_osm_relation_new (id, version, changeset);
+
tags = parse_tags (relation->children);
fill_tags (MAPS_OSMOBJECT (result), tags);
g_hash_table_destroy (tags);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]