【发布时间】:2014-05-14 04:56:17
【问题描述】:
我正在尝试通过转换此 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'"
我只得到文件的摘要。
【问题讨论】:
标签: javascript python shapefile jvectormap