Generating map using python #8

AgentSource opened this Issue May 21, 2012 · 2 comments


None yet

4 participants


Rig info:

Mac OS X 10.6.8
Python 3.2.2

Have issues creating a map, I have tried a few times in terminal and I keeps spitting back variables it doesn't like or won't run what so ever. The fallowing snippet it the command I run to attempt to create the map.

python \ \
mn.shp \
mnmap.js \
--width 900 \
--country_name_index 4 \
--where "ISO = 'USA'" \
--codes_file path/to/codes-en.tsv \
--insets '[{"codes": ["US-AK"], "width": 200, "left": 10, "top": 370}, {"codes": ["US-HI"], "width": 100, "left": 220, "top": 400}]' \
--minimal_area 4000000 \
--buffer_distance -3000 \
--simplify_tolerance 1000 \
--longtitude0 10w \
--name us

I apologize in advance if I'm missing something.


Actually this library doesn't include converter. The one which does is What error do you have? It should work with Python 2.7, GDAL Shapely and anyjson installed.


I ended up editing the converter that @bjornd provides with his project to make it work properly with this one. As I'm sure others will need the same information, the command that I use to generate maps from the NaturalEarth Data (1:110m) is as follows:

 python \
      ne_110m_admin_0_countries.shp \
      result.js \
      --width 900 \
      --country_name_index 14 \
      --country_code_index 26 \
      --minimal_area 4000000 \
      --buffer_distance -3000 \
      --simplify_tolerance 1000 \
      --longtitude 11.5 \
      --name world

I would however really appreciate knowing what arguments were used to create the maps featured on the jqvmap site. I like a) how small it is (60Kb vs 130~Kb) and b) The cartoon-esque profile of the country boundaries.

If anyone is looking for my version of the converter, I have it in a personal fork jboelen/jqvmap@a85f3f8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment