There's probably an easier way to do this, but here's a method that I found for getting very accurate country borders for Mac users.
1. Source of Information
Digital Chart of the World Server
Select a country. Next you select "download data". Then it asks you what kind of information about the country you want. Not very intuitively (none of this is intuitive by the way), you make no selection and press "continue". The next screen gives you a few options--I skipped the ArcView projects, and selected PC Compression. The next screen gives you a download link to the data--HTTP link will do a regular file download. You now have data for the borders of that country. I did about 15 downloads and one country, Turkey, I couldn't get to work.
2. Render Data
I used some GIS software to render the data. I used the GrassGIS. This is open-source and free. There a couple of versions for Mac. I checked out two that I found were buggy, and I ended up using both to complete the process. The less-buggy version is for download here.
The other version, which is more buggy, is from Open OSX, for donwload here. The 6.2 version wouldn't open for me, but the 6.3 version ran. The Open OSX download came with a tutorial. Do this tutorial or otherwise you'll never figure out the Grass software. Again, not intuitive at all.
The Open OSX and the less-buggy version are similar enough but the menus and commands are layed out a bit differently. The Open OSX would crash as I added layers, but the less-buggy version built up 10 layers for me with no problems. But the less-buggy version crashed when I tried to export the files. Luckily projects would open up in either versions. So I imported the map info into the less-buggy version, saved the "workspace" (which is different than the project--again, you gotta do the tutorial)--then I opened up the project and workspace in the Open OSX version to export the map. The project is where all the data is stored, and the workspace is how it is displayed.
So the Open OSX seem to be bad at running a bunch of layers. As each country is only one layer, it's possible that you could do everything in the Open OSX version without it crashing. I was trying to work with a bunch of countries, so I want ahead and worked with the less-buggy version. But eally you can only export one layer at a time anyway, so I'm not sure if there's any real advantage to working in the less-buggy version for what I describe below.
One handy thing I figured out on my own was that if the software crashed, then it was actually still running. You had to go to the Terminal window where Grass is running and type "exit". Then Grass would stop running, so that you could restart it. Don't worry about starting up Terminal becuase both of these apps automatically open up terminal windows when they start--make sure you find the terminal window that has Grass to enter the exit command.
OK, so how do you import and export the data? When you start up Grass you either open an existing project or start a new project. So I suggest naming your project, like "countrymap". (BTW, I think Grass doesn't like any file names with spaces.) The import command that works with the data you have downloaded is under the File Menu, scroll down to "Import vector map" then choose "Multiple formats using OGR". Pick the file that you got from Digital Chart of the World server, which was called "ponet.e00" (all files downloaded from the site are named that, so you might want to name the file after the country.) In OpenOSX, all the relevant import options are under "Optional" (go figure.) "OGR datasource map" refers to the file you are importing. Enter a name for the "output vector map" and the "new location to create." After you did this, OpenOSX would crash. But it still would import it, and when you restarted you would have a new location. Open that new location (not the new mapset.)
This only imports it into your project, then you have to make a vector layer for it--I won't describe how to do that, again you got to do the tutorial. After you make the vector layer, then in the Display window, hit "Display active layer" and/or the "Redraw all layers" buttons. Then you finally get to see your map displayed.
Unfortunately, only Open OSX would do the export of the map for me. So if you are working in the less-buggy version, save your workspace. Make sure to add the .grc suffix to the workspace file. Open up your "country map" project in the Open OSX verion, then open up your workspace in the Open OSX version. To export your map, go to the File Menu, select "Export vector map", then "SVG". It opens up a window, where you select which layer you want to export (I couldn't figure out how to export more than 1 layer at a time.) Then under output type, select "line" (poly, which is the default, doesn't work.) Name your file and go ahead and find the directory where you want to save it, but make sure to add .svg as the suffix to the file name too.
3) Merge the Border to a Background Image of Earth
Not many programs seem to like the .SVG format. You can see it in a web browser. But Photoshop won't open it. Illustrator does. I don't have Illustrator on my laptop, so I jumped backed into open-source software and downloaded GIMP for Mac. I went ahead and also updated X11 as the GIMP site recommends, but I don't know if that's necessary.
GIMP runs pretty much like Photoshop. It's a raster-based editor. So when it opens your map border, it wants to render it out to a raster image. So make sure you pick a good resolution to render the image to when you import, but the path is just as important because it will preserve vector data too. So when opening, select "Import Paths" and "Merge Imported Paths". You could do the rest of the work in GIMP, I think, but if you know Photoshop, then just save this file as a Photoshop document and do the rest of the work in Photoshop. Just make sure the rastered image resolution is big enough to work with in Photoshop because the paths don't get transfered to Photoshop unfortunately.
The background image I use is from NASA. It's the Blue Marble: Land Surface, Shallow Water, and Shaded Topography. The way the earth is projected onto the map seems to align with the export from the GIS program. NASA has other world images with this projection in their Blue Marble collection. There's actually a special version of this image called a GeoTIFF at unearthedoutdoors.com. The GeoTIFF can be imported into Grass and the country maps will align perfectly over the image. Cool, but it's really only valuable as a preview because you cannot edit the image in Grass.
Sorry I'm going to skip how to composite your border and the background. I actually did this in Illustrator, but you could do it in either Photoshop or GIMP. I align my map and background in Illustrator. Then I edited the image the Photoshop. Finally I wanted to do a spinning globe thing, so I brought the Photoshop doc into After Effects. In After Effect, I used the CC Sphere FX to put my flat map on a globe.
I actually was working on this GIS workflow, then I found the Blank Map SVG file at Wikipedia which had plenty of detail for my map. Plus, there's over 50 countries on this map, and it would taken a super-long time to handle all of those maps in Grass and align them properly. Here's the result of what I did with that (BTW, Bosnia is not a Muslim-majority country).
Muslim Countries Rough Animation from Matt DeVries on Vimeo.
Unfortunately, only Open OSX would do the export of the map for me. So if you are working in the less-buggy version, save your workspace. Make sure to add the .grc suffix to the workspace file. Open up your "country map" project in the Open OSX verion, then open up your workspace in the Open OSX version. To export your map, go to the File Menu, select "Export vector map", then "SVG". It opens up a window, where you select which layer you want to export (I couldn't figure out how to export more than 1 layer at a time.) Then under output type, select "line" (poly, which is the default, doesn't work.) Name your file and go ahead and find the directory where you want to save it, but make sure to add .svg as the suffix to the file name too.
3) Merge the Border to a Background Image of Earth
Not many programs seem to like the .SVG format. You can see it in a web browser. But Photoshop won't open it. Illustrator does. I don't have Illustrator on my laptop, so I jumped backed into open-source software and downloaded GIMP for Mac. I went ahead and also updated X11 as the GIMP site recommends, but I don't know if that's necessary.
GIMP runs pretty much like Photoshop. It's a raster-based editor. So when it opens your map border, it wants to render it out to a raster image. So make sure you pick a good resolution to render the image to when you import, but the path is just as important because it will preserve vector data too. So when opening, select "Import Paths" and "Merge Imported Paths". You could do the rest of the work in GIMP, I think, but if you know Photoshop, then just save this file as a Photoshop document and do the rest of the work in Photoshop. Just make sure the rastered image resolution is big enough to work with in Photoshop because the paths don't get transfered to Photoshop unfortunately.
The background image I use is from NASA. It's the Blue Marble: Land Surface, Shallow Water, and Shaded Topography. The way the earth is projected onto the map seems to align with the export from the GIS program. NASA has other world images with this projection in their Blue Marble collection. There's actually a special version of this image called a GeoTIFF at unearthedoutdoors.com. The GeoTIFF can be imported into Grass and the country maps will align perfectly over the image. Cool, but it's really only valuable as a preview because you cannot edit the image in Grass.
Sorry I'm going to skip how to composite your border and the background. I actually did this in Illustrator, but you could do it in either Photoshop or GIMP. I align my map and background in Illustrator. Then I edited the image the Photoshop. Finally I wanted to do a spinning globe thing, so I brought the Photoshop doc into After Effects. In After Effect, I used the CC Sphere FX to put my flat map on a globe.
I actually was working on this GIS workflow, then I found the Blank Map SVG file at Wikipedia which had plenty of detail for my map. Plus, there's over 50 countries on this map, and it would taken a super-long time to handle all of those maps in Grass and align them properly. Here's the result of what I did with that (BTW, Bosnia is not a Muslim-majority country).
Muslim Countries Rough Animation from Matt DeVries on Vimeo.
No comments:
Post a Comment