2026-06-01 16:41:31 +08:00
2026-06-01 16:41:31 +08:00
2023-09-30 17:24:57 +08:00
2023-10-13 21:40:16 +08:00
2023-10-13 21:40:16 +08:00
2023-09-17 11:30:09 +08:00
2023-10-13 21:47:16 +08:00
2023-10-01 21:09:34 +08:00
2023-10-01 21:38:38 +08:00
2023-09-22 00:08:01 +08:00
2023-10-01 19:01:02 +08:00
doc
2023-09-17 11:28:44 +08:00
2023-09-29 20:19:10 +08:00
2023-09-22 10:50:39 +08:00
2026-06-01 16:41:31 +08:00
2023-10-17 00:04:15 +08:00
2023-09-30 16:08:25 +08:00

公路 POV 模板元素自动化生成工具

高速公路 POV 模板元素自动化生成工具V1.0已基本开发完毕,目前支持的元素如下:

  1. 直行方向/出口编号
  2. 中文文本/中英双语文本
  3. 国道/省道/县道/乡道编号标志
  4. 城市道路/旅游区标志
  5. 国家高速/省级高速编号标志
  6. 地点距离预告标志
  7. 服务区预告标志

快速开始

  • 安装 pip 依赖:
    pip install -r requirements.txt
    
  • 安装用于模板元素生成的必要字体(Windows):
    ./install_fonts.bat
    

使用

  • 出口预告/直行标志
python ./main/main.py -d filepath
  • 服务区预告标志
python ./main/sa_pa.py -d filepath
  • 地点距离预告标志
python ./main/distance.py -d filepath

组件介绍

  • 组件结构
字段 类型 含义
type int 组件类型
info dictionary 组件详细信息
  • 支持组件及对应的type和info结构
组件类型 type info
单语言纯文本 0 text字符串文本内容使用A型交通标志字体
国道 1 name字符串道路编号如G101
省道 2 name字符串道路编号如S101
县道、乡道 3 name字符串道路编号如X101、Y101
国家高速 4 main_name:字符串,主线编号;sub_name: 字符串。支线编号如G4501main_name="G45"sub_name="01"sub_name可为空
省级高速 5 main_name:字符串,主线编号;sub_name: 字符串。支线编号;prov:字符串,省份简称,如“吉高速”,则prov="吉"如S9955main_name="S99"sub_name="55"sub_name可为空
街道 6 name:字符串,道路名称
旅游区 7 name:字符串,旅游区名称
中英双语纯文本 8 text字符串中文文本内容使用A型交通标志字体en字符串英文文本内容使用B型交通标志字体

组件示例

  • 单语言纯文本

    {
        "type": 0,
        "info": {
            "text": "四平北"
        }
    }
    

    Alt text

  • 国道

    {
        "type": 1,
        "info": {
            "name": "G202"
        }
    }
    

    Alt text

  • 省道

    {
        "type": 2,
        "info": {
            "name": "S023"
        }
    }
    

    Alt text

  • 县道/乡道

    {
        "type": 3,
        "info": {
            "name": "X021"
        }
    }
    

    Alt text

  • 国家高速

    {
        "type": 4,
        "info": {
            "main_name": "G11",
            "sub_name": "12"
        }
    }
    

    Alt text

  • 省级高速

    {
        "type": 5,
        "info": {
            "main_name": "S1",
            "prov": "吉"
        }
    }
    

    Alt text

  • 街道

    {
        "type": 6,
        "info": {
            "name": "三岔河大街"
        }
    }
    

    Alt text

  • 旅游区

    {
        "type": 7,
        "info": {
            "name": "长白山景区"
        }
    }
    

    Alt text

  • 中英双语文本

    {
        "type": 8,
        "info": {
            "text": "天津中心城区",
            "en": "Central Urban Of Tianjin"
        }
    }
    

    Alt text

出口预告

  • 直行、出口JSON文件顶层结构
字段 类型 含义 备注
type int 指示牌类型 0直行1右出口
exit dictionary 出口信息 仅对出口类型生效
lines array 指引信息列表 二维数组Line[x][y]表示第x行第y个指引信息组件
  • exit结构
字段 类型 含义 备注
seq string 出口编号(数值部分) 以输入为准,不截断低三位
sub string 出口编号(字母部分)

Alt text

{
    "type": 1,
    "exit": {
        "seq": "428",
        "sub": "A-B"
    },
    "lines": [
        [
            {
                "type": 4,
                "info": {
                    "main_name": "G11",
                    "sub_name": "12"
                }
            },
            {
                "type": 5,
                "info": {
                    "main_name": "S1",
                    "prov": "吉"
                }
            },
            {
                "type": 1,
                "info": {
                    "name": "G102"
                }
            }
        ],
        [
            {
                "type": 2,
                "info": {
                    "name": "S023"
                }
            },
            {
                "type": 3,
                "info": {
                    "name": "X101"
                }
            },
            {
                "type": 6,
                "info": {
                    "name": "三岔河大街"
                }
            }
        ],
        [
            {
                "type": 0,
                "info": {
                    "text": "宝坻城区东"
                }
            },
            {
                "type": 7,
                "info": {
                    "name": "八达岭长城"
                }
            }
        ],
        [
            {
                "type": 8,
                "info": {
                    "text": "天津中心城区",
                    "en": "Central Urban Of Tianjin"
                }
            },
            {
                "type": 0,
                "info": {
                    "text": "沂水"
                }
            }
        ]
    ]
}

服务区预告

  • JSON结构
字段 类型 含义 备注
icons array 服务区功能类型 见下表
name 组件 服务区名称 组件类型仅支持0纯文本、8中英双语文本
  • 图标类型
图标类型 图标
1 Alt text
2 Alt text
3 Alt text
4 Alt text
5 Alt text
6 Alt text

Alt text

{
    "icons": [1, 2, 3, 4],
    "name": {
        "type": 8,
        "info": {
            "text": "蚌埠",
            "en": "Bengbu"
        }
    }
}

地点距离预告

  • 地点距离预告JSON文件顶层结构 数组:元素为组件结构,并附加distance字段

Alt text

[
    {
        "type": 4,
        "info": {
            "main_name": "G11",
            "sub_name": "12"
        },
        "distance": "12"
    },
    {
        "type": 0,
        "info": {
            "text": "深圳"
        },
        "distance": "98"
    },
    {
        "type": 1,
        "info": {
            "name": "G102"
        },
        "distance": "197"
    }
]
Description
No description provided
Readme GPL-3.0 2.4 MiB
Languages
Python 99.8%
Batchfile 0.2%