Example: Combining Two Shapes with the Union Function

Top  Previous  Next

This example shows you how to use MPSuperShape to combine two shapes into one shape. The example uses two drive time zones set at 20 minutes from two depots (blue, yellow), to produce a combined shape that encloses the entire area that is within 20 minutes drive time of one of these depots.

 

The starting map file, example_NA.ptm, can be found in the MPSuperShape examples file:

 

http://www.mpsupershape.com/downloads/examples.zip

 

This example is based in the Baltimore area. European users can use the similar example_EU.ptm file which is based in the Coventry / Leicester area of the UK.

 

Load the map file in MapPoint. For clarity, the map has been set to a terrain map with the smallest font size. The two depots are marked with flag pushpins. 20 minute drive time zones have been created around each depot. These have been colored to match the flag pushpins.

 

eg_union_start

 

The following example screenshots have the MPSuperShape selection colors set to cyan fill and red outline. The defaults are black and white. They can be changed by using the Options Dialog box, reached by selecting MPSuperShape Options and Help on the MapPoint Tools menu.

 

Select the MPSuperShape: Activate item on the MapPoint Tools menu. Note: this will be replaced by an item that says MPSuperShape: De-Activate if MPSuperShape has already been activated.

 

Right click on the map to display the MPSuperShape popup menu. This will look like this:

 

popup_menu_basic

 

Most of the menu items are disabled because no shapes have been selected in MapPoint or MPSuperShape. Click the Add All menu item. This will select all shapes in MPSuperShape. MPSuperShape indicates this by drawing them in different colors (as set in the Options Dialog box). The map will now look like this:

 

eg_union_selected

 

The shapes overlap and are opaque, so that a part of one shape is hidden beneath the other shape.

 

Right click on the map again to display the popup menu. This time, select Union. MPSuperShape will then combine the selected shapes into one shape. The end result (selected), will look like this:

 

eg_union_selunion

 

De-select the shape by right clicking on the map and pressing Drop All from the popup menu. The completed map of all areas within 20 minutes of one of the depots will look like this:

 

eg_union_final

 

The next example shows you how to use the import and export functions to copy shapes between maps.