Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to create continent map #87

Open
Arpet opened this issue Jun 13, 2018 · 0 comments
Open

How to create continent map #87

Arpet opened this issue Jun 13, 2018 · 0 comments
Labels

Comments

@Arpet
Copy link
Collaborator

Arpet commented Jun 13, 2018

I can't figure out how to make the remaining continent maps (Asia, S. America, Africa, N. America) like the Europe sample (http://jvectormap.com/maps/world/europe/). It seems to me that the arguments
--country_name_index
--country_code_index
are required, but, they don't make sense for maps containing several countries (right?).

$ python converter.py
natural-earth-vector/110m_cultural/ne_110m_admin_0_countries_lakes.shp
africamap.js
--width 900
--projection mill
--where "continent='Africa'"

yields:
ERROR 1: No such field: '1'
ERROR 1: No such field: '0'
Traceback (most recent call last):
File "converter.py", line 295, in
converter.convert(args['output_file'])
File "converter.py", line 143, in convert
self.loadData()
File "converter.py", line 88, in loadData
self.loadDataSource( sourceConfig )
File "converter.py", line 118, in loadDataSource
name = feature.GetFieldAsString(sourceConfig.get('country_name_index')).decode(sourceConfig.get('input_file_encoding'))
AttributeError: 'NoneType' object has no attribute 'decode'

It looks to me like I have the 'where' syntax correct -- this works:
$ ogrinfo -al natural-earth-vector/110m_cultural/ne_110m_admin_0_countries_lakes.shp -where "continent='Africa'"

@Arpet Arpet added the site label Jun 13, 2018
Repository owner locked as too heated and limited conversation to collaborators Jun 13, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant