NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

hello i am following this https://wiki.openstreetmap.org/wiki/User:SomeoneElse/Ubuntu_1804_tileserver_load#An_example_site

but getting bellow error , how can i fix this ?

yuma@bdmap:~/data$ osm2pgsql -d gis --create --slim -C 2500 --number-processes 4 -S ~/src/openstreetmap-carto-AJT/openstreetmap-carto.style --multi-geometry --tag-transform-script ~/src/SomeoneElse-style/style.lua ~/data/bangladesh-latest.osm.pbf
osm2pgsql version 0.96.0 (64 bit id space)

Using lua based tag processing pipeline with script /home/yuma/src/SomeoneElse-style/style.lua
Using projection SRS 3857 (Spherical Mercator)
Setting up table: planet_osm_point
Setting up table: planet_osm_line
Setting up table: planet_osm_polygon
Setting up table: planet_osm_roads
Allocating memory for dense node cache
Allocating dense node cache in one big chunk
Allocating memory for sparse node cache
Sharing dense sparse
Node-cache: cache=2500MB, maxblocks=40000*65536, allocation method=11
Mid: pgsql, cache=2500
Setting up table: planet_osm_nodes
Setting up table: planet_osm_ways
Setting up table: planet_osm_rels

Reading in file: /home/yuma/data/bangladesh-latest.osm.pbf
Using PBF parser.
Processing: Node(30674k 45.2k/s) Way(38k 4.75k/s) Relation(0 0.00/s)node cache:                                                                                         stored: 30674137(100.00%), storage efficiency: 50.51% (dense blocks: 400, sparse                                                                                         nodes: 28723161), hit rate: 100.00%
Osm2pgsql failed due to ERROR: Failed to execute lua function for basic tag proc                                                                                        essing: /home/yuma/src/SomeoneElse-style/style.lua:16: attempt to perform arithm                                                                                        etic on field 'layer' (a string value)

asked 19 Jun '18, 16:50

fosiul's gravatar image

fosiul
96131419
accept rate: 50%


This was caused by a bug in the lua style which was exposed when osm2pgsql was changed to not ignore the problem.

What I don't understand was why the problem was visible when Bangladesh was loaded but not other areas with invalid layer data, but it's now fixed for everywhere (thanks to mmd for pointing that out).

permanent link

answered 21 Jun '18, 11:18

SomeoneElse's gravatar image

SomeoneElse ♦
36.9k71370866
accept rate: 16%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×710

question asked: 19 Jun '18, 16:50

question was seen: 1,817 times

last updated: 21 Jun '18, 11:18

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum