Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

osm2pgsql adds all changeset tags to the first parsed node #2426

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 1 comment
Closed

Comments

@openstreetmap-trac
Copy link

Reporter: Stelian Dumitrascu
[Submitted to the original trac issue database at 1.49pm, Monday, 9th November 2009]

While parsing the planet file, osm2pgsql makes a list of all tags found under elements, then bulk-adds them to the first element.

A possible fix would be to clear the tag list when the end of a element is encountered:

/* File osm2pgsql.c */

void EndElement(const xmlChar *name)
{
...
} else if (xmlStrEqual(name, BAD_CAST "changeset")) {

    /* Add this code */
    resetList(&tags);

    /* ignore */
} ...
@openstreetmap-trac
Copy link
Author

Author: jburgess777[at]googlemail.com
[Added to the original trac issue at 6.15pm, Sunday, 15th November 2009]

Fixed in r18632. Thanks for the bug report.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant