Can I extract individual country polygons – say one for France?

Home Forums Natural Earth Map Data Cultural Vectors Can I extract individual country polygons – say one for France?

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

    rinpoche
    Participant

    Hi everyone.

     

    A total newby to this. I’m an amateur programmer contemplating a freeware app based on the CIA Fact Book.

     

    Can I extract individual country polygons from these files? I would appreciate an answer before I get too involved with *.SHP files, a format I don’t know.

     

    I can get individual country polygons from a Versimap database I purchased some years back but I can’t make these available in a freeware app as that would infringe their copyright.

     

    #4250

    rinpoche
    Participant

    Well to reply to my own post, I discover I can. This @ http://www.nceas.ucsb.edu/files/scicomp/Dloads/GISProgramming/HowToSelectShapeFileSubset.pdf gives a manual method for doing it with ArcMap and I was able to extract a single shapefile for the United Kingdom and therefore must be able to extract its polygons under program control.

    Is there in fact an honest to goodness (Windows) application (I don’t mean a script) that will do this? Otherwise I’ll write my own but it’s not a trivial task and naturally I would prefer to use a utility.

    Help appreciated.

    [Added] And I’ve just found this C# based on Net 4.0 framework project here @ http://sharpmap.codeplex.com/ which is perfect for me. All sorted here but comments and advice certainly appreciated. Thank you.

    #4251

    Nathaniel
    Keymaster

    Give QGIS and OGR (GDAL) a try.

    #4252

    rinpoche
    Participant

    Thanks Nathaniel. I missed on both on these and both look useful, QGIS definitely. Very grateful for that. I did look at the *.shp file description and it’s straightforward.

    Done enough research to know I can go ahead on my idea – a very simple portal for young people into the CIA World FactBook presenting a small subset of its database, a few quizzes, a jigsaw or two and a few basic map projections supporting some simple chloropleths and cartograms.

    #4254

    ginkgomaps
    Participant

    hi rinpoche,

    this is how i used the ogr2ogr tool to extract france from the global dataset:

    ogr2ogr -f "ESRI Shapefile" -where 'SOVISO="FR"' FRANCE_110m_admin_0_countries.shp ../110m_admin_0_countries.shp

    this can be applied to every country in the dataset. you only need to alter the ‘where’ statement.

    i used qgis to look into the attribute table of the shape file and identitify the data field name (‘SOVISO’ in this case) and the value for france (‘FR’ in this case).

    enjoy,

    Dirk

    #4255

    rinpoche
    Participant

    Hi Dirk,

    Thanks for this. I did find a workround but your technique is considerably simpler!

    regards,

    William

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

You must be logged in to reply to this topic.