language: cn
model_unique_abbr: distance_calculation
version: 1.0
identification:
  docker_image_name: distance_calculation:1.0
  model_name: 距离计算
  semantic: distance calculation
  description: 计算两个几何对象之间的距离
  category_application: 通用基础型
  category_data:
    - 点数据分析
  keywords:
    - 距离计算
    - 几何对象
    -
parameter_info:
  parameters:
    - arg_name: input
      is_single_en_dash: false
      param_type: input_data
      name: 输入文件
      description: "输入点、线、面矢量文件三者之一，格式为shp"
      data_type: shp
      data_semantic: input data file

    - arg_name: geo_type
      is_single_en_dash: false
      param_type: param
      name: 几何类型
      description: "几何类型: 'point', 'polyline', or 'polygon'"
      is_required: true
      data_type: enum
      data_semantic: geo_type
      specification:
        default: point
        enum:
        - point
        - polyline
        - polygon

    - arg_name: id1
      is_single_en_dash: false
      param_type: param
      name: 第一个几何对象的ID
      description: "第一个几何对象的ID，整型，输入示例：1"
      is_required: true
      data_type: int
      data_semantic: id1

    - arg_name: id2
      is_single_en_dash: false
      param_type: param
      name: 第二个几何对象的ID
      description: "第二个几何对象的ID，整型，输入示例：2 "
      is_required: true
      data_type: int
      data_semantic: id2

    - arg_name: dist_type
      is_single_en_dash: false
      param_type: param
      name: 距离类型
      description: "距离类型: 'euclidean', 'manhattan', 'chebyshev', or 'cosine'"
      is_required: true
      data_type: enum
      data_semantic: dist_type
      specification:
          default: euclidean
          enum:
          - euclidean
          - manhattan
          - chebyshev
          - cosine

    - arg_name: output
      is_single_en_dash: false
      param_type: output_data
      name: 输出文件
      description: "输出距离计算的结果，结果保存为CSV格式的文件"
      data_type: csv
      data_semantic: output_data

application:
  domain: 用于计算两个几何对象之间的距离
  objective: 计算两个几何对象之间的距离
  dimension:
    - 二维
  mechanism: 根据用户指定的距离类型，计算两个几何对象之间的距离
operation:
  usage: "该算法需要五个参数，分别是输入文件、几何类型、第一个几何对象的ID、第二个几何对象的ID和距离类型。"
  exec_example:
    - docker run -v $(pwd):/data distance_calculation:1.0 --input /data/data.shp --geo_type point --id1 0 --id2 1 --dist_type euclidean --output /data/output.csv
  output_display:
    - "输出的CSV文件，包含计算的距离，不需要可视化"
technique:
  language:
    - Python
  os:
    - Linux
    - Windows
source:
  maintainer: liuyixun
  organization: GitHub
  contact: liuyixun@github.com
  references:
    - "Shapely: Manipulation and analysis of geometric objects. https://shapely.readthedocs.io/en/stable/manual.html"
