File tree Expand file tree Collapse file tree 1 file changed +6
-19
lines changed
Expand file tree Collapse file tree 1 file changed +6
-19
lines changed Original file line number Diff line number Diff line change @@ -31,42 +31,29 @@ function clean_tags(tags)
3131 return next (tags ) == nil
3232end
3333
34- function process (object , geometry_type )
34+ function process (object , geometry )
3535 if clean_tags (object .tags ) then
3636 return
3737 end
38- dtable :add_row ({
38+ dtable :insert ({
3939 attrs = {
4040 version = object .version ,
4141 timestamp = object .timestamp ,
4242 },
4343 tags = object .tags ,
44- geom = { create = geometry_type }
44+ geom = geometry
4545 })
4646end
4747
4848function osm2pgsql .process_node (object )
49- process (object , ' point ' )
49+ process (object , object : as_point () )
5050end
5151
5252function osm2pgsql .process_way (object )
53- process (object , ' line ' )
53+ process (object , object : as_linestring () )
5454end
5555
5656function osm2pgsql .process_relation (object )
57- if clean_tags (object .tags ) then
58- return
59- end
60-
61- if object .tags .type == ' multipolygon' or object .tags .type == ' boundary' then
62- dtable :add_row ({
63- attrs = {
64- version = object .version ,
65- timestamp = object .timestamp ,
66- },
67- tags = object .tags ,
68- geom = { create = ' area' }
69- })
70- end
57+ process (object , object :as_geometrycollection ())
7158end
7259
You can’t perform that action at this time.
0 commit comments