The code is not clean: even though the osm_elements are declared with an int64 type correctly set and returned by the accessor method), several methods handling the parsed geometry to export data are incorrectly converting them silently to signed ints (32 bit by default if the code is compield for a 32-bit system). This causes truncation of id's and failures during import, or broken geometries with unrelated objects.
Linting the code would find these occurences, notably in classes related to the DB exporting feature: they declare local variables only with "auto" without specifying any type, so they take a default "int" type from the compiler.
So for example, you need to replace "auto id = ..." (default type), by "auto int64_t id = ...;" (explicitly typed variables)
The code is not clean: even though the osm_elements are declared with an int64 type correctly set and returned by the accessor method), several methods handling the parsed geometry to export data are incorrectly converting them silently to signed ints (32 bit by default if the code is compield for a 32-bit system). This causes truncation of id's and failures during import, or broken geometries with unrelated objects. Linting the code would find these occurences, notably in classes related to the DB exporting feature: they declare local variables only with "auto" without specifying any type, so they take a default "int" type from the compiler. So for example, you need to replace "auto id = ..." (default type), by "auto int64_t id = ...;" (explicitly typed variables)