Armenia under water??

Home Forums Natural Earth Map Data Cultural Vectors Armenia under water??


This topic contains 1 reply, has 1 voice, and was last updated by  Nathaniel 5 years, 3 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #3801


    I have created a map using python and the admin-0 10m database. Some European contries are coloured all other countries are white and ocean blue. This works well except for Armenia. What ever I do here it ends up beeing blue as the ocean. Any idea what happend to those poor people??

    Just realised, that Albania is suffering the same fate!




    @rth: what column (field) attribute are you using to color the countries?

    Can you attach a screen shot showing your problem?



    I use name_long to find those countries I want to colour in a specific way, continent I use to colour all countries in Europe (which have not been coloured otherwise), Africa and Asia white, then all others are coloured blue (if you can tell me how to colour just the ocean in blue that would also be nice :-) ).

    I am solving this problem, that after all countries have been dealt with, I explicitly go to the Armenia and Albania data and plot them again.

    (I would really like to attach a little picture, but have no idea how …)



    You should be using mapcolor_9 for this, it’s precalculated for you. There’s also a continent attribute to do the filting you describe. There is a separate ocean theme for coloring that just blue.

    What application are you in?



    Thanks for the quick answer and sorry for my late reply.

    The thing is running in python. Here is the code I use (I did not write that myself, I simply have not had enough time to fully understand the structure of the data file):

    `for npoly in range([0]):

    shpsegs = []

    shpinfo = []

    shp_object = shp.read_object(npoly)

    verts = shp_object.vertices()

    rings = len(verts)

    for ring in range(rings):

    if ring == 0:

    shapedict = dbf.read_record(npoly)

    name = shapedict[“name_long”]

    continent = shapedict[“continent”]

    lons, lats = zip(*verts[ring])

    if max(lons) > 721. or min(lons) < -721. or max(lats) > 91. or min(lats) <-91:

    raise ValueError,msg

    x, y = m(lons, lats)


    # add information about ring number to dictionary.

    shapedict = ring+1

    shapedict = npoly+1


    print name, continent

    lines = LineCollection(shpsegs,antialiaseds=(1,))`

    It gives me the desired reults so I was happy :)

    Concerning your comments:

    What does


    do for me?

    As you see I use the continent attribute for all countries which should not be couloured in a specific way.

    And where do I find this ocean theme you were talking about? That would be most interesting.



    the mapcolor attributes guide on color coding countries.

    There are many other themes for download at:

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.