Example: Compare Sizes of Countries

In this example we combine multiple facilities within Manifold to create a presentation that allows comparison of the relative sizes of different countries.   The World drawing used in this example may be downloaded from the world.mxb sample project.

 

See the video version of this project in the Manifold 9 - Compare Country Sizes video.  

 

eg_compare_country_sizes01_39.png

 

We create a presentation like the above using techniques as an experienced Manifold user might apply.  Many of those techniques are a single click, but despite the speed with which an experienced user could create the above display, this topic is lengthy since it shows almost all individual steps.

Open a Project, Create a Map

Launch Manifold, or, we can launch Manifold Viewer as this example works in Viewer too.   If running from a Portable installation, in the installation's bin64 folder (or, for 32-bit installations, the bin folder) double-click on the manifold.exe executable to launch Manifold.    Do the same if using Manifold Viewer.

 

eg_compare_country_sizes01_01.png

 

Manifold opens with a new project.    Use the step-by-step procedure given in the Example: Import Shapefile and Create a Map topic to create a map, to create a Bing streets layer and to drag that layer into the map.

 

In summary, that procedure is:

 

  1. Right-click into the Project pane and choose Create - New Map.  Press the Create Map button.  That creates a new map component called Map in the Project pane.
  2. Right-click into the Project pane and choose Create - New Favorite Data Source - Bing Maps Street Map.  That creates a new Bing Maps Street Map data source in the project.
  3. Double-click on the Map to open it. It opens as a blank display since there are no layers in the map.
  4. Click the + button next to the Bing Maps Street Map data source to open up the data source hierarchy.
  5. Drag and drop the Bing Maps Street Map Image into the open Map window.   That adds the Bing layer to the map as the first layer in the map.

 

eg_compare_country_sizes01_02.png

 

In this example we will show illustrations of the undocked map window to provide bigger map window illustrations.  Undock the map window by Alt-clicking the Map tab.

 

eg_compare_country_sizes01_03.png

 

Resize the window as seen above.   Click and drag in the window to pan it, and use the mouse wheel or right-click-and-drag to zoom.

Change the Projection used by the Map Window

The first layer dragged and dropped into a map window sets the projection used by that map window to whatever is the coordinate system used by that first layer.   We dragged and dropped the Bing layer into the map window as the first layer.  Since Bing uses Pseudo-Mercator, that is the projection now used by the map window as well.   

 

We will change that projection to the Gall projection, which is an equal-area projection that does a reasonable job of showing most countries in the world in a way that their areas can be reasonably compared by lay people.

 

eg_compare_country_sizes01_04.png

 

Click on the Contents pane tab and then choose the Component panel if it is not shown by default.   The Component panel shows the coordinate system used by the map, as well as the coordinate system used by the active layer.

 

btn_coord_sys_picker.png  Press the coordinate picker button for the Map and choose Edit Coordinate System to open the Coordinate System dialog.

 

eg_compare_country_sizes01_05.png

 

The dialog opens to the EPSG tab with the Pseudo-Mercator system selected , since the Pseudo-Mercator coordinate system in use by the Map is designated by its EPSG number.  Click on the Standard tab.

 

eg_compare_country_sizes01_06.png

 

Scroll down to the Gall projection and click on it.  We could also enter Gall into the filter box to find it more quickly in the very long list of projections.   Press OK.

 

eg_compare_country_sizes01_07.png

 

The map immediately switches to using the Gall projection.

Copy and paste the World Drawing and Table

We will now add a new drawing to our map.  We would like to use the World drawing that is in the world.mxb sample project published on the Manifold web site.   

 

There are many ways to get a drawing published in a Manifold project into a different project.   One of the easiest ways is to launch a second Manifold session, to open the world.mxb project in that session, and to then Copy the World drawing from that second session and Paste it into our project.

 

eg_compare_country_sizes01_08a.png

 

Some GIS packages can run only one session at a time.   Manifold can be launched in as many sessions as we like at the same time, and we can copy and paste between them. That is a great way to get data from other projects.  We could, of course, always use File - Link to link those other projects into our current project, but sometimes a casual use of Copy and Paste is what we prefer.

 

Launch a second session of Manifold and use File - Open to open the world.mxb sample project.   MXB is a Manifold, compressed archive format that Manifold (and Viewer) can open as if it was regular .map format, decompressing the archival format automatically.

 

eg_compare_country_sizes01_08.png

 

In the second session highlight both World and World Table, that is, choosing both the drawing and the drawing's table.  We can do that by ctrl-clicking both or in Windows fashion by clicking and dragging a box from lower right corner to upper left corner that covers the two components.

 

Press Ctrl-C to Copy.   If we prefer we can right-click on the highlighted items and choose Copy, or press the Copy button in the project pane toolbar.

 

eg_compare_country_sizes01_09.png  eg_compare_country_sizes01_10.png

 

Click into the Project pane for our first Manifold session and press Ctrl-V to Paste.   If we prefer we can right-click into the main part of the Project pane and choose Paste, or press the Paste button in the project pane toolbar.

 

The World drawing and the drawing's table are copied from our other Manifold session into our current Manifold session.   This is very cool and useful but it is only a small part of how  experienced Manifold users will take advantage of Copy and Paste between multiple Manifold sessions.

 

eg_compare_country_sizes01_11.png

 

Drag and drop the World drawing into our map.   It appears as a layer above the Bing layer.   Although the map is in Pseudo-Mercator and the World drawing is in Latitude / Longitude,  the map window will re-project the World layer into Pseudo-Mercator on the fly for display.   The area objects that show countries in the World drawing thus neatly cover the countries shown in the Bing image.

Eliminate All but Four Countries

We intend to show only four countries, the US, Brazil, China and Australia, so we will eliminate all other countries from the drawing.  That is quickest to do by selecting only the four we want, inverting the selection and then pressing Delete.

 

eg_compare_country_sizes01_12.png

 

Ctrl-click on a country to select that area object.  In the illustration we have already ctrl-clicked on the US to select it, and now we will ctrl-click on Brazil to select that country as well.

 

eg_compare_country_sizes01_13.png

 

When all four desired countries have been selected, we will press Ctrl-I to invert the selection.

 

eg_compare_country_sizes01_14.png

 

Inverting the selection will select all countries except those four we previously had selected.   We now press the Delete key to delete all selected objects.

 

The result in a few quick clicks is a drawing with only four objects in it, the four area objects representing the four countries of interest.

Move Countries to Desired Positions

Our next step is to move the countries we have in our drawing to a position nearer each other so their relative sizes are easier to compare.

 

eg_compare_country_sizes01_15.png

 

Shift-Alt-click on Brazil to choose it for editing.

 

eg_compare_country_sizes01_16.png

 

Editing handles appear at the vertices which define Brazil.

 

eg_compare_country_sizes01_17.png

 

The Record panel automatically pops open to the Coordinates tab, ready for editing.   We click anywhere into the list of coordinates to move the focus there and then we press Ctrl-A to select all coordinates.

 

eg_compare_country_sizes01_18.png

 

All coordinates are now selected and shown in red selection color.  

 

eg_compare_country_sizes01_19.png

 

Editing handles for all of the coordinates are now displayed in solid blue, to indicate that now all coordinates are selected and will participate in any move.    We can click and drag any of the editing handles and all of them will move together, as seen in the illustration above where we have moved all of the coordinates together nearer to the Equator and closer to Africa.

 

eg_compare_country_sizes01_20.png

 

So far the move is just a preview.   Right-click and choose Save Changes to apply the move.   Or, we could press the Update Record button in the Record panel to apply the changes.

 

eg_compare_country_sizes01_21.png

 

Brazil moves to the new location.

 

eg_compare_country_sizes01_22.png

 

Next, we Shift-Alt-click on the US, we click into the Coordinates list in the Record panel and press Ctrl-A to select all coordinates, and then we move the US onto the Equator next to Brazil.

 

eg_compare_country_sizes01_23.png

 

In the Record panel we press Update Record to apply the change, demonstrating an alternative to right-clicking in the map and choosing Save Changes to apply the move.

 

eg_compare_country_sizes01_24.png

 

We can continue moving countries by Shift-Alt-clicking China and moving China.

 

eg_compare_country_sizes01_25.png

 

We continue in this way to move Australia as well, so that all four countries have now been moved onto the Equator next to each other.

Format Countries using Style

Default formatting in gray color looks drab, so we will improve the visual appeal of our presentation by coloring the countries using the Style panel.

 

eg_compare_country_sizes01_26.png

 

We open the Style panel in the Contents pane.  We click the Fill color for areas button, and then we click the field selection box and choose Name as the field for our thematic format.  We use unique values as the method, we right click onto the palette button and choose the Color Brewer CB Spectral palette.   The illustration above shows the palette colors applied in reverse order.   We can reverse colors by first applying the CB Spectral palette, next clicking anywhere into the intervals list to move the focus there, pressing Ctrl-A to select all intervals, and then right clicking on one of the color wells and choosing Reverse.    Press Update Style to apply the palette.

 

eg_compare_country_sizes01_27.png

 

The result is a livelier, more appealing display.

Alter Layer Opacity

In the illustration above our Bing background layer is slightly too intrusive.  We can make it less intrusive by changing the opacity of the layer so it is slightly transparent, allowing some of the white background color to show through.  That has the effect of lightening the Bing layer.

 

eg_compare_country_sizes01_28.png

 

In the Layers panel of the Contents pane we double-click into the opacity value for the Bing layer and we change it to 50.   Press Enter.

 

eg_compare_country_sizes01_29.png

 

Making the Bing layer only partially opaque lightens the layer as the white background becomes partially visible through the Bing layer.  The lighter Bing background allows the four, brightly colored countries to appear more prominently.

Create Labels

We will create a labels layer to label the countries with their names.   

 

eg_compare_country_sizes01_30.png

 

In the Project pane, right-click onto the World drawing and choose Create - New Labels.     In the New Labels dialog we use a Name of Labels and we choose Name  as the field for the Text of the labels.   Press Create Labels.   That creates a new labels component in the Project called Labels.

 

eg_compare_country_sizes01_31.png

 

Drag and drop the Labels component into the map.   Labels taken from the Name field for each country object automatically appear.

Create a Drop Shadow Effect

We can quickly create a drop shadow effect that will make the country shapes appear more solid.    We do this by making a copy of the World layer, coloring all areas in that copy black, and then shifting that copied layer slightly.

 

eg_compare_country_sizes01_32.png

 

Ctrl-click on both the World component and the World Table component and then press the Copy toolbar button.   

 

Next, press the Paste toolbar button.  That creates copies in the Project pane called World 2 and World 2 Table.  

 

eg_compare_country_sizes01_34.png

 

Drag and drop the World 2 drawing into the map.  Drag the layer tab for the World 2 layer so it is just below the World layer.     The World 2 layer is an exact copy of the World layer, so we cannot see it in the map because the World layer is exactly above it.

 

eg_compare_country_sizes01_35.png

 

With the focus on the World 2 layer, in the Style panel click the Fill color button for areas, clicking twice to get the drop down menu with many color choices, instead of the thematic formatting display.

 

eg_compare_country_sizes01_36.png

 

Change the color to black.   The color of all areas in the World 2 layer, if we could see it, would change instantly to black.

 

eg_compare_country_sizes01_37.png

 

Next, with the focus still on the World 2 layer we choose the Transform panel of the Contents pane.  We choose the Shift template operating on the Geom field with a Shift X setting of 4000 and a Shift Y setting of -6000.   

 

eg_compare_country_sizes01_38.png

 

The transform template shows a preview using blue preview color in the map what the template will do with those settings.   As we can see, it will move objects in the World 2 layer downward (a negative Shift Y value) and to the right (a positive Shift X value).    To apply that proposed change, we press Update Field.

 

eg_compare_country_sizes01_39.png

 

The result is that we have shifted the black areas in the World 2 layer slightly downward and to the right.   This gives a visual effect of a hard-edged drop shadow and helps the countries to stand out more from the background.

 

eg_compare_country_sizes01_40.png

 

If we prefer, we can double-click the Bing layer tab to turn off that layer.  That shows all four countries next to each other in a simpler presentation.

For Extra Credit

Once we become familiar with Manifold we can manipulate data as we like.   For example, suppose we wish we had shown other countries, but now those other countries have been deleted from the World drawing we use.   How do we get them?   Suppose, for example, we wanted to add Russia to the display.

 

eg_compare_country_sizes01_41.png

 

That is easy.  In our second session of Manifold, which we opened with the world.mxb project, we open the World drawing and we Ctrl-click on Russia to select that object.  We press Ctrl-C to Copy that object.    In our Map above, we click on the World layer to move the focus there and then we press Ctrl-V to Paste the copied object, thus pasting Russia into the World layer.   We Shift-Alt-click on Russia, click into the Coordinates list of the Record pane, press Ctrl-A to select all coordinates and then we can drag Russia into whatever location we want.  

 

To make a drop shadow, we Ctrl-click on Russia to select it, Ctrl-C to Copy and then we click the World 2 layer tab to move the focus there and we Ctrl-V to Paste.   We temporarily turn off the World layer so we can see what we are doing, we click on the World 2 layer to move the focus there, Ctrl-click on Russia to select it, and now we can use the Transform panel's Shift template to move just the Russia object by checking the Restrict to selection box.    

 

We double-click the World layer back on and we use Style to change the color of Russia to a dark green, as seen above.

 

eg_compare_country_sizes01_42.png

 

Using similar moves we can copy and paste other areas we might want to use from our second session, to provide a display that compares the various countries from very large, Russia, to smaller, France, plus adding Alaska for comparison as well.  

 

Notes

Viewer is Free  - We can create the above display using Manifold Viewer, which is a completely free product.    We cannot save the above as a layout or print to PDF, but we can make a screenshot using the PrtScrn button and then edit the screenshot using Paint to create an image that is perfectly suitable for use on a web site or in documents.

 

Copy and Paste on Local machines - Alas, Windows Remote Desktop does not understand copy/paste between Manifold sessions, so we cannot RDP into a distant machine, launch a Manifold session there and then copy something from the Project pane in that session into a Manifold session's Project pane on our local machine.

 

Gall is approximate - The Gall projection is used in this example because it is equal area and also because it produces country shapes, however inaccurate in "real life," that are familiar to most people.   Any equal area projection will provide a geometrically accurate way to visually compare the relative sizes of countries.   Different equal area projections, however, will distort the shapes of countries in different ways.   The Gall projection artificially lengthens the North - South "height" of countries near the Equator while flattening that dimension of countries in higher latitudes.   The areas may be preserved as accurate, but the change in shape can make countries near the Equator seem bigger than they are.

 

There is no way around having at least some distortion, since we cannot flatten a 3D spherical or ellipsoidal shape into a flat, 2D plane without inducing some distortion.  That is the central problem for all cartography, known to cartographers for over 2000 years.    The only question is what sort of distortion is acceptable for a given purpose.  

 

Videos

Manifold 9 - Compare Country Sizes - Many people want to compare the true sizes of countries. In this video we show how to use different capabilities within Manifold to create a display that instantly shows the relative sizes of four countries: United States, Brazil, China and Australia. Very fast and easy! Works with Manifold Release 9 and the free download of Manifold Viewer.

 

See Also

Drawings

 

Maps

 

Projections

 

Contents - Component

 

Contents - Layers

 

Contents - Style

 

File - Export

 

Change Coordinate System

 

Map Projection

 

SHP, Shapefiles

 

Example: Re-project a Drawing - An essential example on changing the projection of a drawing, either within the drawing itself, or by changing the projection of a map window that shows the drawing and re-projects on the fly for display.

 

Example: Import Shapefile and Create a Map - Step by step process to import a shapefile and to create a map.

 

Example: Import a Shapefile - ESRI shapefiles are a very popular format for publishing GIS and other spatial data.  Unfortunately, shapefiles often will not specify what projection should be used.  This example shows how to deal with that quickly and easily.

 

Example: Re-project a Drawing - An essential example on changing the projection of a drawing, either within the drawing itself, or by changing the projection of a map window that shows the drawing and re-projects on the fly for display.

 

Projections Tutorial