jVectormap:试图转换映射时元组索引超出范围
jVectormap: tuple index out of range when trying to convert a map
我正试图通过转换此Shapefile来创建芬兰的jVectormap地图文件:http://www.naturalearthdata.com/downloads/110m-cultural-vectors/110m-admin-1-states-provinces/
我已经安装了Python和模块,但在尝试此命令时:
/usr/local/bin/python2.7 converter/converter.py '
/<path>/ne_110m_admin_1_states_provinces_shp.dbf '
/<path>/finland.js '
--width 1000 '
--country_name_index 8 '
--country_code_index 0 '
--longitude0 26.00 '
--where "ISO_A2='FI'" '
--name data_fin '
--language en
我得到这个堆栈跟踪:
Traceback (most recent call last):
File "converter/converter.py", line 296, in <module>
converter.convert(args['output_file'])
File "converter/converter.py", line 167, in convert
insetBbox = self.renderMapInset(codes, 0, 0, self.width)
File "converter/converter.py", line 194, in renderMapInset
scale = (bbox[2]-bbox[0]) / width
IndexError: tuple index out of range
不确定出了什么问题。
如果我查看带有的shp文件
ogrinfo ne_110m_admin_1_states_provinces_shp.shp ne_110m_admin_1_states_provinces_shp -where "ISO_A2='FI'"
我只得到文件的摘要。
您使用的是convert.py的哪个版本?最新的1.2.2似乎有问题。你可以在这里找到很多jvectormaphttps://github.com/jfhovinne/jvectormap-maps-builder包括芬兰!该软件包还包括一个旧的convert.py 1.1.1,运行良好。
相关文章:
- Javascript函数,用于将数组转换为“;2-元组”;
- 是索引数组文字的好做法
- jQuery ajax请求,将索引数组作为关键字字符串
- jVectormap:试图转换映射时元组索引超出范围
- Javascript中的元组列表
- Javascript中的名称索引-数组/对象
- 如何在对象中按值创建排序索引数组
- 提取索引数组中的整数值
- 如何在 JavaScript 中处理元组
- Python 元组列表到 JavaScript 数组数组
- 来自 jsp 和 javascript 中的请求属性的对象索引数组
- 单击导航索引数组时发出双重警报
- 以编程方式声明基于索引数组的变量(使用谷歌网站列表页面)
- 索引数组 JavaScript 中索引的搜索值
- 根据值从索引数组中删除元素
- 是否有任何库可以为 JSON 数据生成元组和重建字符串
- 如何检查名称索引数组中有多少个特定结果
- Django - 如果国家/地区字段等于美国,则发送 ajax 请求以将州选择器设置为美国州的元组
- 从 JavaScript 数组中删除索引数组
- 如何在javascript中按索引对数组数组进行排序