如何使用转换插件将shapefile转换为jvectormap?

3

我遵循了类似帖子中指定的所有步骤,但它对我无效,请帮忙:

1)我按照您提供的所有步骤安装了所有依赖项和软件,我从http://www.naturalearthdata.com/downloads/10m-cultural-vectors/10m-admin-1-states-provinces/下载了文件“ne_10m_admin_1_states_provinces.zip”。

2)我创建了makemap.bat文件,其中包含以下命令:python ^ converter.py ^ 10m-admin-1-states-provinces-shp / ne_10m_admin_1_states_provinces.shp ^ 10m-admin-1-states-provinces-shp / jquery-jvectormap-data-russia-ru-en.js ^ --width 400 ^ --where "ISO_3166_2 ='RU-'和code_hasc!=''" ^ --country_name_index 12 ^ --country_code_index 18 ^ --minimal_area 4000000 ^ --buffer_distance -0.5 ^ --simplify_tolerance 10000 ^ --longitude0 54.8270 ^ --name russia

3)运行OSGeo4W Shell,从converter目录中键入makemap.bat命令:

4)出现错误:Traceback(most recent call last):File“converter.py”,line 295,在converter.convert(args [ 'output_file'])中:File“converter.py”,line 143,在convert self.loadData()中:File“converter.py”,line 88,在loadData self.loadDataSource(sourceConfig)中:File“converter.py”,line 129,在loadDataSource shapelyGeometry = shapely.wkb.loads(geometry.ExportToWkb())AttributeError:'module' object has no attribute 'wkb'

我看到了另一个问题,我已经在QGIS浏览器中打开SHP文件来浏览属性,以便我可以检查REGION和REGION CODE,但是在上面的国家中,REGION和REGION CODE为空。

请帮我解决这个问题。我需要俄罗斯和新加坡地图。

提前致谢。

1个回答

1
converter.py脚本的开头添加import shapely.wkb这一行来解决4)问题。希望这可以帮到你。

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