File: with-schema.lua

package info (click to toggle)
osm2pgsql 1.4.1%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 5,124 kB
  • sloc: cpp: 41,466; ansic: 1,366; python: 564; sh: 19; makefile: 15
file content (17 lines) | stat: -rw-r--r-- 479 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
-- This config example file is released into the Public Domain.

-- This configuration for the flex output shows how to define a table in
-- a PostgreSQL schema.

local dtable = osm2pgsql.define_way_table('data', {
        { column = 'tags',  type = 'hstore' },
        { column = 'geom',  type = 'geometry' },
    }, { schema = 'myschema' })

function osm2pgsql.process_way(object)
    dtable:add_row({
        tags = object.tags,
        geom = { create = 'line' }
    })
end