[OSM-dev] osm2pgsql for 64-bit IDs

Jukka Rahkonen jukka.rahkonen at latuviitta.fi
Tue May 24 10:44:11 BST 2011


Hi,

Sorry for the previous accidentally sent mail.

I was wondering why do we need 64-bit IDs after the osm2pgsql import but I
would guess it is because of the nodes table is used for diff file
updates.

Generally speaking it might be better to let osm2pgsql to create a new
serial column into osm_point, osm_line and osm_polygon tables for the
primary key instead of trying to utilise osm_id. At least in the polygon
table osm_ids are not necessarily unique and a new primary key column must
be added anyway if one needs a primary key. For smaller, country wide
imports that could work also as a workaround for applications and formats
like QGis and shapefiles which cannot handle 64-bit integers.  The long
osm_id could be imported as a string for information.

By the way, I need to use osm2pgsql in slim mode because of memory
limitations. However, I do not need the nodes, ways and relations tables
for anything after import. Could it be possible to make a faster memory
sparing import option if there were no need to use diff files afterwards?

-Jukka Rahkonen-






More information about the dev mailing list