generalized_tables:
  # etldoc: imposm3 -> osm_park_polygon_gen8
  park_polygon_gen8:
    source: park_polygon_gen7
    sql_filter: area>power(ZRES5,2)
    tolerance: ZRES8

  # etldoc: imposm3 -> osm_park_polygon_gen7
  park_polygon_gen7:
    source: park_polygon_gen6
    sql_filter: area>power(ZRES6,2)
    tolerance: ZRES8

  # etldoc: imposm3 -> osm_park_polygon_gen6
  park_polygon_gen6:
    source: park_polygon_gen5
    sql_filter: area>power(ZRES7,2)
    tolerance: ZRES9

  # etldoc: imposm3 -> osm_park_polygon_gen5
  park_polygon_gen5:
    source: park_polygon_gen4
    sql_filter: area>power(ZRES8,2)
    tolerance: ZRES10

  # etldoc: imposm3 -> osm_park_polygon_gen4
  park_polygon_gen4:
    source: park_polygon_gen3
    sql_filter: area>power(ZRES9,2)
    tolerance: ZRES11

  # etldoc: imposm3 -> osm_park_polygon_gen3
  park_polygon_gen3:
    source: park_polygon_gen2
    sql_filter: area>power(ZRES10,2)
    tolerance: ZRES11

  # etldoc: imposm3 -> osm_park_polygon_gen2
  park_polygon_gen2:
    source: park_polygon_gen1
    sql_filter: area>power(ZRES11,2)
    tolerance: ZRES12

  # etldoc: imposm3 -> osm_park_polygon_gen1
  park_polygon_gen1:
    source: park_polygon
    sql_filter: area>power(ZRES12,2) AND ST_IsValid(geometry)
    tolerance: ZRES13

tables:

  # etldoc: imposm3 -> osm_park_polygon
  park_polygon:
    type: polygon
    fields:
    - name: osm_id
      type: id
    - name: geometry
      type: validated_geometry
    - name: name
      key: name
      type: string
    - name: name_en
      key: name:en
      type: string
    - name: name_de
      key: name:de
      type: string
    - name: tags
      type: hstore_tags
    - name: landuse
      key: landuse
      type: string
    - name: leisure
      key: leisure
      type: string
    - name: boundary
      key: boundary
      type: string
    - name: area
      type: area
    mapping:
      leisure:
      - nature_reserve
      boundary:
      - national_park
