2013-07-07 26 views
3

我正在爲孟加拉國的地圖轉換工作,我有幾個形狀文件。但我有問題了解下面的參數,同時創建地圖Js形狀shapefile。 需要信息從哪裏我可以找到這些參數值爲我的國家..孟加拉國。jvectormap國家代碼索引,國名索引參數信息需要

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

我花了整整一天轉換的形狀文件映射,使用轉換腳本生成的地圖js文件,但地圖不正確加載:( 我想我與上述各種參數進行錯誤。 請幫助!

回答

1

Country_code_index(「key」)和country_name_index(「value」)基本上是與.shp(第一列= 0)關聯的.dbf文件中的相應列號。
雖然我從來沒有指定codes_file:如果你處理.shp,也許你應該看看here,它應該是非常有用的。

0

您可以使用 「QGIS瀏覽器」,以確定

--country_code_index

--country_name_index

打開形狀文件QGIS瀏覽器中的屬性選項卡中可以找到值。

記得指標從0

開始如果你有shape文件在這裏 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