I'm trying to recreate a dataset produced by the SciGRID energy mapping project detailed here https://www.power.scigrid.de/. I used osm2pgsql to export German transmission line data to a postgreSQL database and I'm trying to run a Python script written by the SciGRID people that abstracts this data so that it can be turned into a .csv. Osm2pgsql creates a few tables with the prefix "planet_osm_". The script requires the "planet_osm_nodes" table to have a "tags" column but it does not. I'm told this table used to have such a column but isn't meant for front end use so doesn't have it from osm2pgsql version 0.88 onwards. I cannot use "planet_osm_point" instead because it lacks all the "planet_osm_nodes" columns that I need (ie. "id", "lat", "lon"). Is there a way to bring the "tags" column back (perhaps with the style file or flex output?). Otherwise, are there any pre-built binaries of older versions of osm2pgsql, pre-0.88? I have no experience building from source. asked 21 Jul '21, 23:19 kev_7 |
Your approach is deeply flawed, not your fault, likely the programmers of whatever software you are using did not know what they were doing.
The If you want to export all nodes, then the process involving osm2pgsql is unnecessary; you can use the command-line tool Do not try to revive decades-old osm2pgsql versions, it's not worth the hassle. answered 22 Jul '21, 01:06 Frederik Ramm ♦ Jochen Topf 1
Thank you! And is there a way to reveal the tags column for planet_osm_point? Currently this table only has "osm_id", "power", "cables", "voltage", "wires" and "way".
(22 Jul '21, 18:06)
kev_7
1
Yes and no. If you
(23 Jul '21, 00:26)
Frederik Ramm ♦
|