Zh-hans:JOSM/Plugins/Scanaerial

From OpenStreetMap Wiki
Jump to: navigation, search

介绍

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

需求

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

安装(Windows-x64)

  1. 安装python 2.7并打开控制面板-系统设置-高级-环境变量,在系统变量PATH中加入;C:\Python27(注意有分号)
  2. 下载并安装VC++ for python 2.7
  3. 下载并安装Python图像库(PIL)
  4. 下载Python投影库(PyProj)并解压,打开命令行(管理员权限),输入
    • cd <解压目录>
    • python setup.py install
  5. 在JOSM中添加插件ext_tools并重新启动JOSM
  6. 下载Scanaerial脚本并解压至C:\User\<用户名>\AppData\Roaming\JOSM\plugins\ext_tools\Scanaerial\
  7. 在JOSM设置中选择ext_tool设置,单击新建工具,在名称栏中输入Scanaerial,命令行栏中输入C:\python27\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