getting the following error when attempting to load data into pgsql database with osm2pgsql:
ERROR: Failed to execute Lua function 'osm2pgsql.process_node': test.lua:183: unknown field 'as_point'
stack traceback:
[C]: in function 'error'
[string "..."]:178: in metamethod '__index'
The associated line 178 is just inside the tables.node:insert() method calling the geom = object:as_point().
The only thing I can think of is the limited resources available (i.e. a rpi with 1gb of memory but the osm.pbf file is quite small as well.)
Any help is appreciated.
The
as_pointfunction seems to been added in a newer version. I am currently using the version 1.6.0 and therefore had to adjust my lua script a bit. You can find the old syntax via the osm2pgsql git history.Example lua script that works in version 1.6.0: