Zh-hans:JOSM/Plugins/Scanaerial

From OpenStreetMap Wiki
Jump to navigation Jump to search

介绍

Scanaerial是基于python的一款图像矢量化插件。

需求

  1. 较新版本的JOSM
  2. Ext_tools插件
  3. Python 3.x以及必要库
  4. Scanaerial脚本

安装(Windows-x64)

  1. 安装python 3.x
  2. 安装pip
  3. 安装必要库
    python3 -m pip install --upgrade pip
    pip install pillow
    pip install pyproj
    
  4. 在JOSM中添加插件ext_tools并重新启动JOSM
  5. 下载Scanaerial脚本并解压至C:\User\<用户名>\AppData\Roaming\JOSM\plugins\ext_tools\Scanaerial\
  6. 在JOSM设置中选择ext_tool设置,单击新建工具,在名称栏中输入Scanaerial,命令行栏中输入<python.exe 安装位置> C:\User\<用户名>\AppData\Roaming\JOSM\plugins\ext_tools\Scanaerial\ {lat} {lon} {TZoom}并重启JOSM

配置

在C:\User\<用户名>\AppData\Roaming\JOSM\plugins\ext_tools\Scanaerial\下新建一个.cfg文件,按照推荐配置或自己编写

配置完自己的设置后在命令行栏最后添加 <文件名>.cfg(注意有空格)

默认值 功能
fixedzoomlevel 11 无TZoom参数情况下使用的缩放等级
server_api bing 地图服务协议: wms, tms 或 bing
server_name Bing 地图服务名称(用于标示来源标签)
server_url http://dev.virtualearth.net/... 地图服务网址(tms,wms)
empty_tile_bytes 1033 空瓦片字节数
empty_tile_checksum -332268601 checksum of empty tile file (algorithm: CRC32)
projection EPSG:3857 地图服务投影
tile_sizex 256 瓦片元大小
tile_sizey 256
douglas_peucker_epsilon 0.60 线段平滑度(细节数量)
deactivate_simplifying 0 关闭Douglas-Peucker算法
colour_str 30 颜色敏感度
maxfilter_setting 3 降噪强度
size_limit 400 生成对象的最大数目

林地矢量化推荐配置

[WMS]

fixedzoomlevel = 11

server_api=tms

server_name = Bing

server_url = http://dev.virtualearth.net/REST/v1/Imagery/Metadata/Aerial?include=ImageryProviders&output=xml&key=Arzdiw4nlOJzRwOz__qailc8NiR31Tt51dN2D7cm57NrnceZnCpgOkmJhNpGoppU

empty_tile_bytes = 1033

empty_tile_checksum = -332268601

projection = EPSG:3857

tile_sizex = 256

tile_sizey = 256

[SCAN]

douglas_peucker_epsilon = 0.50

deactivate_simplifying = 0

colour_str = 20

maxfilter_setting = 3

size_limit = 200

[TAGS]

natural = wood

水域矢量化推荐配置

[WMS]

fixedzoomlevel = 11

server_api=tms

server_name = Bing

server_url = http://dev.virtualearth.net/REST/v1/Imagery/Metadata/Aerial?include=ImageryProviders&output=xml&key=Arzdiw4nlOJzRwOz__qailc8NiR31Tt51dN2D7cm57NrnceZnCpgOkmJhNpGoppU

empty_tile_bytes = 1033

empty_tile_checksum = -332268601

projection = EPSG:3857

tile_sizex = 256

tile_sizey = 256

[SCAN]

douglas_peucker_epsilon = 0.60

deactivate_simplifying = 0

colour_str = 20

maxfilter_setting = 3

size_limit = 300

[TAGS]

natural = water