jvectormap国家代码索引,国家名称索引参数信息需求

3

我正在使用Bangladesh地图转换器,有几个shp文件。但是我在创建从shapefile生成的map Js时,对以下参数不太理解。请问我应该从哪里获取这些参数值,以适用于我的国家孟加拉国?

 --country_code_index              (where to find?)
--country_name_index   (where to find?)
--codes_file ( explain pls)

我花了一整天的时间将一个shape文件转换成地图,使用了转换脚本,生成了map js文件,但是地图没有正确加载 :( 我猜测我在上述参数方面犯了错误。请帮忙!

3个回答

1
国家代码索引(“key”)和国家名称索引(“value”)基本上是与您的.shp文件相关联的.dbf文件中相应的列编号(第一列= 0)。
我从未不得不指定codes_file:如果您正在处理.shp,则可能应该看看此处,它应该非常有用。


0

您可以使用“QGIS浏览器”来确定

--country_code_index

--country_name_index

在QGIS浏览器中打开您的shape文件,在属性选项卡中可以找到这些值。

请记住,索引从0开始。

如果您已经拥有此处的shapefile http://www.naturalearthdata.com/downloads/10m-cultural-vectors/10m-admin-1-states-provinces/ 则不需要使用以下命令

--codes_file

在您的情况下,请尝试使用以下命令

python ^
   converter.py ^
   ./input/ne_10m_admin_1_states_provinces.shp ^
   ./output/jvectormap.bd.js ^
     --width 900 ^
     --country_name_index 49 ^
     --country_code_index 1 ^
     --buffer_distance -0.4 ^
     --where "iso_a2 = 'BD'" ^
     --projection mill ^
     --simplify_tolerance 1000 ^
     --name Bangladesh ^
     --language en

供参考 https://gis.stackexchange.com/questions/90783/how-to-generate-jvectormap-for-united-kingdom-uk/91071#91071


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接