locked
Country polygons RRS feed

  • Question

  • Dear virtual earth colleagues,

    I'm looking for polygons of all countries (which fits perfectly over the borders in virtual earth> on each zoom level). I should find a way to highlight a country and color some countries depending on dynamic data.

    Does anybody know if this data is available somewhere?

    Thanks in advance!

    Best regards,

    Kurt 
    Wednesday, January 7, 2009 9:07 AM

Answers

  • You will have to create polygons for each country. Once that is done you will be able to change their color. The country boundary data can be extracted from a shape file. The following has some useful shape files: http://www.cipotato.org/diva/data/MoreData.htm You may find there are to many data points. This can be reduced if you write an algorithm to remove multiple points that are on the same line. Shape files tend to have a lot more points then needed to represent a line. A line only needs two points. To make the shapefile a little more readable you can use a program that converts shapefiles to kml, http://freegeographytools.com/2007/shapefile-to-kml-converter-shp2kml-updated-to-version-20 Once you have your points it woulld be a good idea to store them in a database as probaubly will be to many points for an xml file. Also, you may find it to be useful to store the bounding box coordinates of each polygon so that only polygons in the viewable map are rendered.
    Wednesday, January 7, 2009 2:58 PM
    Moderator

All replies

  • You will have to create polygons for each country. Once that is done you will be able to change their color. The country boundary data can be extracted from a shape file. The following has some useful shape files: http://www.cipotato.org/diva/data/MoreData.htm You may find there are to many data points. This can be reduced if you write an algorithm to remove multiple points that are on the same line. Shape files tend to have a lot more points then needed to represent a line. A line only needs two points. To make the shapefile a little more readable you can use a program that converts shapefiles to kml, http://freegeographytools.com/2007/shapefile-to-kml-converter-shp2kml-updated-to-version-20 Once you have your points it woulld be a good idea to store them in a database as probaubly will be to many points for an xml file. Also, you may find it to be useful to store the bounding box coordinates of each polygon so that only polygons in the viewable map are rendered.
    Wednesday, January 7, 2009 2:58 PM
    Moderator
  • Hi richard,

    Thanks for your quick reply!
    I will have a look at your steps to follow. At first sight i think i should succeed in it.

    Will keep you posted!

    Best regards,

    Kurt
    Wednesday, January 7, 2009 3:27 PM