2020local tables = {}
2121
2222tables .stops = osm2pgsql .define_node_table (' stops' , {
23- { column = ' tags' , type = ' jsonb' },
23+ { column = ' tags' , type = ' jsonb' },
2424 { column = ' rel_refs' , type = ' text' }, -- for the refs from the relations
25- { column = ' rel_ids' , sql_type = ' int8[]' }, -- array with integers (for relation IDs)
26- { column = ' geom' , type = ' point' , not_null = true },
25+ { column = ' rel_ids' , sql_type = ' int8[]' }, -- array with integers (for relation IDs)
26+ { column = ' geom' , type = ' point' , not_null = true },
2727})
2828
2929tables .lines = osm2pgsql .define_way_table (' lines' , {
30- { column = ' tags' , type = ' jsonb' },
30+ { column = ' tags' , type = ' jsonb' },
3131 { column = ' rel_refs' , type = ' text' }, -- for the refs from the relations
32- { column = ' rel_ids' , sql_type = ' int8[]' }, -- array with integers (for relation IDs)
33- { column = ' geom' , type = ' linestring' , not_null = true },
32+ { column = ' rel_ids' , sql_type = ' int8[]' }, -- array with integers (for relation IDs)
33+ { column = ' geom' , type = ' linestring' , not_null = true },
3434})
3535
3636-- Tables don't have to have a geometry column
3737tables .routes = osm2pgsql .define_relation_table (' routes' , {
38- { column = ' ref' , type = ' text' },
38+ { column = ' ref' , type = ' text' },
3939 { column = ' type' , type = ' text' },
4040 { column = ' from' , type = ' text' },
41- { column = ' to' , type = ' text' },
41+ { column = ' to' , type = ' text' },
4242 { column = ' tags' , type = ' jsonb' },
4343})
4444
4545-- Stop areas contain everything belonging to a specific public transport
4646-- stop. We model them here by adding a center point as geometry plus the
4747-- radius of a circle that contains everything in that stop.
4848tables .stop_areas = osm2pgsql .define_relation_table (' stop_areas' , {
49- { column = ' tags' , type = ' jsonb' },
49+ { column = ' tags' , type = ' jsonb' },
5050 { column = ' radius' , type = ' real' , not_null = true },
51- { column = ' geom' , type = ' point' , not_null = true },
51+ { column = ' geom' , type = ' point' , not_null = true },
5252})
5353
5454-- This will be used to store information about relations queryable by member
@@ -61,15 +61,6 @@ tables.stop_areas = osm2pgsql.define_relation_table('stop_areas', {
6161local n2r = {}
6262local w2r = {}
6363
64- local function clean_tags (tags )
65- tags .odbl = nil
66- tags .created_by = nil
67- tags .source = nil
68- tags [' source:ref' ] = nil
69-
70- return next (tags ) == nil
71- end
72-
7364local function unique_array (array )
7465 local result = {}
7566
@@ -128,8 +119,6 @@ function osm2pgsql.process_way(object)
128119 return
129120 end
130121
131- clean_tags (object .tags )
132-
133122 -- Data we will store in the 'lines' table always has the tags from
134123 -- the way
135124 local row = {
0 commit comments