ruleset: navsea_taxonomy_rules_v1
bundle_id: navsea-core
version: v1-draft
rules:
  - rule_id: TAX-NAV-001
    rule_revision: 1
    priority: 100
    enabled: true
    match_scope: feature
    match_expr:
      all:
        - field: class_name
          op: contains_any
          value: [港湾灯台, 灯台]
        - field: geom_type
          op: eq
          value: Point
    output:
      canonical_family: navigation_aid
      canonical_object_type: 港湾灯台
      detection_key_template: symbol:港湾灯台
    reason: 港湾灯台属于典型点状助航对象。

  - rule_id: TAX-DEPTH-001
    rule_revision: 1
    priority: 140
    enabled: true
    match_scope: layer
    match_expr:
      all:
        - field: source_layer
          op: eq
          value: L等深線
    output:
      canonical_family: depth
      canonical_object_type: 等深线
      detection_key_template: line:等深线
    reason: 等深线来源层具有稳定的深度线语义。

  - rule_id: TAX-SEABED-001
    rule_revision: 1
    priority: 150
    enabled: true
    match_scope: layer
    match_expr:
      all:
        - field: source_layer
          op: eq
          value: p底質
    output:
      canonical_family: seabed
      canonical_object_type: 底質
      detection_key_template: label:底質
    reason: 底质标签层具有稳定的海底属性语义。

  - rule_id: TAX-PLACE-001
    rule_revision: 1
    priority: 160
    enabled: true
    match_scope: layer
    match_expr:
      all:
        - field: source_layer
          op: eq
          value: p地名
    output:
      canonical_family: place
      canonical_object_type: 海上地名
      detection_key_template: label:海上地名
    reason: 海上地名点层具有稳定的地名语义。

  - rule_id: TAX-PLACE-002
    rule_revision: 1
    priority: 161
    enabled: true
    match_scope: layer
    match_expr:
      all:
        - field: source_layer
          op: eq
          value: p地名陸
    output:
      canonical_family: place
      canonical_object_type: 陆上地名
      detection_key_template: label:陆上地名
    reason: 陆上地名点层具有稳定的地名语义。

  - rule_id: TAX-USAGE-001
    rule_revision: 1
    priority: 180
    enabled: true
    match_scope: feature
    match_expr:
      all:
        - field: class_name
          op: contains_any
          value: [錨泊, 錨地]
    output:
      canonical_family: usage_area
      canonical_object_type: 錨泊地
      detection_key_template: mixed:錨泊地
    reason: 锚泊类对象统一归入 usage_area 体系。

  - rule_id: TAX-HAZ-001
    rule_revision: 1
    priority: 120
    enabled: true
    match_scope: feature
    match_expr:
      all:
        - field: class_name
          op: contains
          value: 魚礁
        - field: geom_type
          op: in
          value: [Point, Polygon, MultiPolygon]
    output:
      canonical_family: hazard
      canonical_object_type: 魚礁
      detection_key_template: mixed:魚礁
    reason: 魚礁在当前业务目标下优先视为危险对象，并允许后续叠加用途语义。

  - rule_id: TAX-FALLBACK-001
    rule_revision: 1
    priority: 9999
    enabled: true
    match_scope: feature
    match_expr:
      all: []
    output:
      canonical_family: unknown
      canonical_object_type: 未分类对象
      detection_key_template: unknown:{source_layer}
    reason: 所有未命中 taxonomy 规则的对象统一回退到待补录分类。
