static gboolean is_update=FALSE;
static XML_Parser xp;
-
/* XML tag IDs */
typedef enum {
START,
};
static struct sql_stmt sql;
-
static struct map_bbox bbox;
static gboolean use_bbox;
if (v)
cway->data->postal_code=g_strdup(v);
- /* XXX: somehow handle the silly -1 'reversed' oneway */
v=g_hash_table_lookup(osm_way_tags, "oneway");
- if (v)
+ if (v) {
cway->flags|=W_ONEWAY;
+ if (strcmp(v, "-1")==0)
+ cway->nodes=g_slist_reverse(cway->nodes);
+ }
v=g_hash_table_lookup(osm_way_tags, "noexit");
if (v)
if (v)
cway->data->speed=atoi(v);
-#if 0
v=g_hash_table_lookup(osm_way_tags, "layer");
if (v)
cway->data->layer=atoi(v);
-#endif
v=g_hash_table_lookup(osm_way_tags, "junction");
if (v && strcasecmp(v,"roundabout")==0) {
}
gboolean
-osm_planet_parse_buffer(gchar *buffer, size_t r)
+osm_planet_parse_buffer(const gchar *buffer, size_t r)
{
if (XML_Parse(xp, buffer, r, r>0 ? 0:1) == XML_STATUS_ERROR) {
g_printerr("Parse error at line %d:\n%s\n",