Skip to content

Commit ce8be4d

Browse files
authored
Merge pull request #2325 from joto/inspect
Don't mention the Lua inspect library any more in example configs
2 parents 210fde0 + a9a23e0 commit ce8be4d

File tree

3 files changed

+0
-29
lines changed

3 files changed

+0
-29
lines changed

flex-config/README.md

-12
Original file line numberDiff line numberDiff line change
@@ -52,18 +52,6 @@ and when you need that functionality.
5252
The subdirectory [gen](gen/) contains example configurations for
5353
generalization support.
5454

55-
## Dependencies
56-
57-
Some of the example files use the `inspect` Lua library to show debugging
58-
output. It is not needed for the actual functionality of the examples, so if
59-
you don't have the library, you can remove all uses of `inspect` and the
60-
scripts should still work.
61-
62-
The library is available from [the
63-
source](https://github.com/kikito/inspect.lua) or using
64-
[LuaRocks](https://luarocks.org/modules/kikito/inspect). Debian/Ubuntu users
65-
can install the `lua-inspect` package.
66-
6755
## Public Domain
6856

6957
All the example config files in this directory are released into the Public

flex-config/simple.lua

-13
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
-- configuration. After reading and understanding this, have a look at
66
-- "geometries.lua".
77

8-
-- For debugging
9-
-- inspect = require('inspect')
10-
118
-- The global variable "osm2pgsql" is used to talk to the main osm2pgsql code.
129
-- You can, for instance, get the version of osm2pgsql:
1310
print('osm2pgsql version: ' .. osm2pgsql.version)
@@ -66,7 +63,6 @@ tables.polygons = osm2pgsql.define_area_table('polygons', {
6663
for name, dtable in pairs(tables) do
6764
print("\ntable '" .. name .. "':")
6865
print(" name='" .. dtable:name() .. "'")
69-
-- print(" columns=" .. inspect(dtable:columns()))
7066
end
7167

7268
-- Helper function to remove some of the tags we usually are not interested in.
@@ -84,9 +80,6 @@ end
8480
-- attributes of the node like `id`, `version`, etc. as well as all tags as a
8581
-- Lua table (`object.tags`).
8682
function osm2pgsql.process_node(object)
87-
-- Uncomment next line to look at the object data:
88-
-- print(inspect(object))
89-
9083
if clean_tags(object.tags) then
9184
return
9285
end
@@ -114,9 +107,6 @@ end
114107
-- information as with nodes and additionally a boolean `is_closed` flag and
115108
-- the list of node IDs referenced by the way (`object.nodes`).
116109
function osm2pgsql.process_way(object)
117-
-- Uncomment next line to look at the object data:
118-
-- print(inspect(object))
119-
120110
if clean_tags(object.tags) then
121111
return
122112
end
@@ -141,9 +131,6 @@ end
141131
-- same information as with nodes and additionally an array of members
142132
-- (`object.members`).
143133
function osm2pgsql.process_relation(object)
144-
-- Uncomment next line to look at the object data:
145-
-- print(inspect(object))
146-
147134
if clean_tags(object.tags) then
148135
return
149136
end

flex-config/unitable.lua

-4
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
-- Put all OSM data into a single table
44

5-
-- inspect = require('inspect')
6-
75
-- We define a single table that can take any OSM object and any geometry.
86
-- OSM nodes are converted to Points, ways to LineStrings and relations
97
-- to GeometryCollections. If an object would create an invalid geometry
@@ -21,8 +19,6 @@ local dtable = osm2pgsql.define_table{
2119
}
2220
}
2321

24-
-- print("columns=" .. inspect(dtable:columns()))
25-
2622
-- Helper function to remove some of the tags we usually are not interested in.
2723
-- Returns true if there are no tags left.
2824
local function clean_tags(tags)

0 commit comments

Comments
 (0)