Skip to content

Don't mention the Lua inspect library any more in example configs #2325

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions flex-config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,6 @@ and when you need that functionality.
The subdirectory [gen](gen/) contains example configurations for
generalization support.

## Dependencies

Some of the example files use the `inspect` Lua library to show debugging
output. It is not needed for the actual functionality of the examples, so if
you don't have the library, you can remove all uses of `inspect` and the
scripts should still work.

The library is available from [the
source](https://github.com/kikito/inspect.lua) or using
[LuaRocks](https://luarocks.org/modules/kikito/inspect). Debian/Ubuntu users
can install the `lua-inspect` package.

## Public Domain

All the example config files in this directory are released into the Public
Expand Down
13 changes: 0 additions & 13 deletions flex-config/simple.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
-- configuration. After reading and understanding this, have a look at
-- "geometries.lua".

-- For debugging
-- inspect = require('inspect')

-- The global variable "osm2pgsql" is used to talk to the main osm2pgsql code.
-- You can, for instance, get the version of osm2pgsql:
print('osm2pgsql version: ' .. osm2pgsql.version)
Expand Down Expand Up @@ -66,7 +63,6 @@ tables.polygons = osm2pgsql.define_area_table('polygons', {
for name, dtable in pairs(tables) do
print("\ntable '" .. name .. "':")
print(" name='" .. dtable:name() .. "'")
-- print(" columns=" .. inspect(dtable:columns()))
end

-- Helper function to remove some of the tags we usually are not interested in.
Expand All @@ -84,9 +80,6 @@ end
-- attributes of the node like `id`, `version`, etc. as well as all tags as a
-- Lua table (`object.tags`).
function osm2pgsql.process_node(object)
-- Uncomment next line to look at the object data:
-- print(inspect(object))

if clean_tags(object.tags) then
return
end
Expand Down Expand Up @@ -114,9 +107,6 @@ end
-- information as with nodes and additionally a boolean `is_closed` flag and
-- the list of node IDs referenced by the way (`object.nodes`).
function osm2pgsql.process_way(object)
-- Uncomment next line to look at the object data:
-- print(inspect(object))

if clean_tags(object.tags) then
return
end
Expand All @@ -141,9 +131,6 @@ end
-- same information as with nodes and additionally an array of members
-- (`object.members`).
function osm2pgsql.process_relation(object)
-- Uncomment next line to look at the object data:
-- print(inspect(object))

if clean_tags(object.tags) then
return
end
Expand Down
4 changes: 0 additions & 4 deletions flex-config/unitable.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

-- Put all OSM data into a single table

-- inspect = require('inspect')

-- We define a single table that can take any OSM object and any geometry.
-- OSM nodes are converted to Points, ways to LineStrings and relations
-- to GeometryCollections. If an object would create an invalid geometry
Expand All @@ -21,8 +19,6 @@ local dtable = osm2pgsql.define_table{
}
}

-- print("columns=" .. inspect(dtable:columns()))

-- Helper function to remove some of the tags we usually are not interested in.
-- Returns true if there are no tags left.
local function clean_tags(tags)
Expand Down