Hi Everyone,
I want to import OSM in pretty generic fashion - each geometry type in one table (points, lines, polygons) with two special tables for relations and relation members. I'm using configuration attached bellow. But, with this configuration, linear representation of polygon features are insertet also into lines table. Acording to documentation, im expecting that liner featrures are writen to lines table only if they have Area=no tag. I can get rid of it when i specify filters for lines with same tags as in area_tags, but that reject all specified tags no matter of area tag... That is not exactly what i want. So question is, can i import all linear features into one table, but only if they are not imported into polygons table?
Config:
tags:
load_all: true
exclude:
- created_by
- source
areas:
area_tags: [buildings, landuse, leisure, natural, aeroway]
linear_tags: [highway, barrier]
tables:
points:
columns:
- type: id
name: osm_id
key:
- type: geometry
name: geometry
key:
- type: hstore_tags
name: tags
key:
type: point
mapping:
__any__: [__any__]
lines:
columns:
- type: id
name: osm_id
key:
- type: geometry
name: geometry
key:
- type: hstore_tags
name: tags
type: linestring
mapping:
__any__: [__any__]
polygons:
columns:
- type: id
name: osm_id
- type: geometry
name: geometry
- type: hstore_tags
name: tags
type: polygon
mapping:
__any__: [__any__]
rel_members:
type: relation_member
fields:
- name: osm_id
type: id
- name: member
type: member_id
- name: index
type: member_index
- name: role
type: member_role
- name: type
type: member_type
- name: name
key: name
type: string
from_member: true
mapping:
__any__: [__any__]
filters:
reject:
type: [multipolygon, boundary, land_area]
relations:
type: relation
fields:
- name: osm_id
type: id
- key: type
name: type
type: string
- key: name
name: name
type: string
- name: tags
type: hstore_tags
mapping:
__any__: [__any__]
filters:
reject:
type: [multipolygon, boundary, land_area]