|
5 | 5 | -- configuration. After reading and understanding this, have a look at
|
6 | 6 | -- "geometries.lua".
|
7 | 7 |
|
8 |
| --- For debugging |
9 |
| --- inspect = require('inspect') |
10 |
| - |
11 | 8 | -- The global variable "osm2pgsql" is used to talk to the main osm2pgsql code.
|
12 | 9 | -- You can, for instance, get the version of osm2pgsql:
|
13 | 10 | print('osm2pgsql version: ' .. osm2pgsql.version)
|
@@ -66,7 +63,6 @@ tables.polygons = osm2pgsql.define_area_table('polygons', {
|
66 | 63 | for name, dtable in pairs(tables) do
|
67 | 64 | print("\ntable '" .. name .. "':")
|
68 | 65 | print(" name='" .. dtable:name() .. "'")
|
69 |
| --- print(" columns=" .. inspect(dtable:columns())) |
70 | 66 | end
|
71 | 67 |
|
72 | 68 | -- Helper function to remove some of the tags we usually are not interested in.
|
|
84 | 80 | -- attributes of the node like `id`, `version`, etc. as well as all tags as a
|
85 | 81 | -- Lua table (`object.tags`).
|
86 | 82 | function osm2pgsql.process_node(object)
|
87 |
| - -- Uncomment next line to look at the object data: |
88 |
| - -- print(inspect(object)) |
89 |
| - |
90 | 83 | if clean_tags(object.tags) then
|
91 | 84 | return
|
92 | 85 | end
|
|
114 | 107 | -- information as with nodes and additionally a boolean `is_closed` flag and
|
115 | 108 | -- the list of node IDs referenced by the way (`object.nodes`).
|
116 | 109 | function osm2pgsql.process_way(object)
|
117 |
| - -- Uncomment next line to look at the object data: |
118 |
| - -- print(inspect(object)) |
119 |
| - |
120 | 110 | if clean_tags(object.tags) then
|
121 | 111 | return
|
122 | 112 | end
|
|
141 | 131 | -- same information as with nodes and additionally an array of members
|
142 | 132 | -- (`object.members`).
|
143 | 133 | function osm2pgsql.process_relation(object)
|
144 |
| - -- Uncomment next line to look at the object data: |
145 |
| - -- print(inspect(object)) |
146 |
| - |
147 | 134 | if clean_tags(object.tags) then
|
148 | 135 | return
|
149 | 136 | end
|
|
0 commit comments