[Tile-serving] [osm2pgsql-dev/osm2pgsql] osm2pgsql ignoring file extension on -tag-transform-script openstreetmap-carto.lua (Issue #2338)

tombay notifications at github.com
Mon Jun 2 00:58:26 UTC 2025


tombay created an issue (osm2pgsql-dev/osm2pgsql#2338)

<!-- Please don't use screenshots. Copy and paste the *text* output here if that's needed for context. -->

## What version of osm2pgsql are you using?

carto$ osm2pgsql --version
osm2pgsql version 2.1.1
Build: RelWithDebInfo
Compiled using the following library versions:
Libosmium 2.22.0
Proj 9.4.0
Lua 5.2.4



## What operating system and PostgreSQL/PostGIS version are you using?

carto$ uname -a
Linux metatom 6.8.0-60-generic #63-Ubuntu SMP PREEMPT_DYNAMIC Tue Apr 15 19:04:15 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
carto$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 24.04.2 LTS
Release:	24.04
Codename:	noble

## Tell us something about your system

16Gb 8core baremetal laptop


## What did you do exactly?
I did
carto$ osmosis --read-replication-interval workingDirectory="${WORKOSM_DIR}" --simplify-change --write-xml-change - > try.dat
carto$ head -4 try.dat
<?xml version='1.0' encoding='UTF-8'?>
<osmChange version="0.6" generator="Osmosis 0.49.2">
  <modify>
    <node id="25656767" version="6" timestamp="2025-05-30T13:12:40Z" lat="-31.986029" lon="115.7731634"/>


carto$ osm2pgsql --append -r xml -s -C 300 -G --hstore --style openstreetmap-carto.style --tag-transform-script openstreetmap-carto.lua -d gis -P 5435 - < try.dat


## What did you expect to happen?

expected the data to be input.


## What did happen instead?

2025-06-02 10:42:34  osm2pgsql version 2.1.1
2025-06-02 10:42:34  Database version: 17.5 (Ubuntu 17.5-1.pgdg24.04+1)
2025-06-02 10:42:34  PostGIS version: 3.5
2025-06-02 10:42:34  Loading properties from table '"public"."osm2pgsql_properties"'.
2025-06-02 10:42:34  Not using flat node file (same as on import).
2025-06-02 10:42:34  Using prefix 'planet_osm' (same as on import).
2025-06-02 10:42:34  Using output 'flex' (same as on import).
2025-06-02 10:42:34  Using style file '/storage/tom/Downloads/software/openstreetmap-carto/openstreetmap-carto.style' (same as on import).
2025-06-02 10:42:34  Storing properties to table '"public"."osm2pgsql_properties"'.
2025-06-02 10:42:34  ERROR: Error loading lua config: openstreetmap-carto.style:2: unexpected symbol near '#'.



## What did you do to try analyzing the problem?

carto$ head -4  openstreetmap-carto.lua
-- For documentation of Lua tag transformations, see:
-- https://github.com/openstreetmap/osm2pgsql/blob/master/docs/lua.md

-- Objects with any of the following keys will be treated as polygon
carto$ head -4 openstreetmap-carto.style
# This is the osm2pgsql .style file for openstreetmap-carto.
# It is intended to be used with openstreetmap-carto.lua and osm2pgsql Lua
# transforms. Full usage details are in INSTALL.md
# Among things, this means that the linear vs polygon distinction in this file

Can (or should I) use --style and  --tag-transform-script  in the same command



-- 
Reply to this email directly or view it on GitHub:
https://github.com/osm2pgsql-dev/osm2pgsql/issues/2338
You are receiving this because you are subscribed to this thread.

Message ID: <osm2pgsql-dev/osm2pgsql/issues/2338 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20250601/ab52d216/attachment-0001.htm>


More information about the Tile-serving mailing list