2013-07-30 20 views
1

我已經使用了NaturalData狀態/天意數據集以生成使用該命令智利地圖一個:轉換智利地圖與插入

python converter.py \ 
    --width 900 \ 
    --country_name_index 12 \ 
    --country_code_index 31 \ 
    --where "iso_a2 = 'CL'" \ 
    --projection mill \ 
    --name "cl" \ 
    --language en \ 
    ne_10m_admin_1_states_provinces_shp.shp output/jquery-jvectormap-cl-mill-en.js 

它生成一個地圖這樣。 (減去紅色圓圈)

JVectorMap of Chile

三個圈的島嶼是所有標記ValparaÃso,其對應於普羅維登斯主陸地盤旋。

查看提供的有關如何進行插頁(以阿拉斯加和夏威夷爲例)的文檔,我試圖將這些島靠得更近,這樣我的地圖就更加集中了。

python converter.py \ 
    --width 900 \ 
    --country_name_index 12 \ 
    --country_code_index 31 \ 
    --where "iso_a2 = 'CL'" \ 
    --projection mill \ 
    --name "cl" \ 
    --language en \ 
    --insets [{"codes": ["CL-VS"], "width": 200, "left": 10, "top": 370}]' \ 
    ne_10m_admin_1_states_provinces_shp.shp output/jquery-jvectormap-cl-mill-en.js 

不幸的是,這種失敗

converter.py: error: unrecognized arguments: 200, left: 10, top: 370},]' ne_10m_admin_1_states_provinces_shp.shp output/jquery-jvectormap-cl-mill-en.js 

我的問題:

  1. 如何解決該錯誤消息的錯誤?參數在文檔和代碼中都有提及,所以我不確定應該使用什麼。
  2. 我怎樣才能將三個圓圈島嶼移動成插頁而不影響大陸瓦爾帕拉索?

回答

0

您的insets參數失敗,因爲它沒有正確引用。您可以使用以下內容:

--insets "[{\"codes\": [\"CL-VS\"], \"width\": 200, \"left\": 10, \"top\": 370}]"