A Visual Essay on Selection

Working with maps in Manifold is often working with databases using the map display as a "handle" to see and manipulate the data. Working with databases is often a matter of Selecting the right records. Manifold has sophisticated, yet easy to use methods to allow you to Select just the records you want.   These methods may be used visually in Map View, in Solvers or the SQL toolbar, and in Table View using Table View selection capabilities.

This Case Study is more of an illustrated example of Selection methods using Table View, SQL Toolbar, and visual selection.  The essay shows how selection modes and selection commands may be used in a free form way.   This case uses thumbnails to avoid loading all of the big images at once.  The screen images are full screen 1024 x 768 Manifold screen displays that have been color-simplified so each is about 50kB in size. Click on the thumbnail to see the full size image.  Use the forward and back buttons in your browser to go back and forth between this page and the full sized image as you read the discussion.

s001.png (62145 bytes)1. Introducing Omo Ranch Gold Mines

This example uses a complex arrangement of maps and layers that was created to support the Manifold GPS verification expeditions to the "Mother Lode" gold country of the California Sierra Nevada.  We used Manifold to create a mixed set of USGS and other maps as a backgrop to display of gold mine data (in the motherload_mines map).   Each gold mine is represented as a small star.    The gold mines were extracted using Manifold's SQL toolbar from the main US Bureau of Mines database.   The area displayed is loosely centered about the Omo Ranch USGS Quad map.  Our first screen shows the map.  Note the small, minimized Table View toolbar floating towards the right edge of the screen.  You can have as many Table Views as you like, and can minimize them or resize them as desired.

If you are not familiar with Manifold's screen display, let's point out a few items.  The Tabs at the bottom of the screen show the various maps and map layers that are in the workspace.  You can drag and drop the boundary between the horizontal scroll bar and the layer tab area if you want more or less space allotted for tabs.  Drag and drop a layer tab to move the relative position of that layer in the display stack.  Objects in upper layers are drawn "over" objects in lower layers.  Double click on a layer's tab to turn that layer off and on for display. A layer's name will be shown in "disabled" Windows style if it is not being displayed.

Manifold has many toolbars, only a few of which are displayed.  Tool bars may be rearranged, docked at whatever screen border is convenient, or simply left floating in Map View however is desired.  The toolbar at the very bottom is the SQL Toolbar, a really wonderful and easy to use toolbar for creating "one liner" SQL queries.  The green toolbar buttons vertically arranged on the left edge of the screen control the action of Solvers, in particular what is done with the Solver's results.   The toolbar buttons with a little mouse cursor icon to the left of the upper edge control the work of selection using the Mouse.   The little buttons with a color palette grid control control formatting, that is the color and style with which objects are displayed.

s003.png (55774 bytes)2. Map View with Table View Open

Here's the screen with Table View opened up.  Just like any Windows window, you can maximize it full screen, if desired, or resize it. Table View shows the data attributes of the map in a classic text table presentation. Table View understands Windows database table ideas.  Click on a column head to sort the table by that column.  Shift click on the column head to reverse sort by that column. Table View also has many controls and its own tool bar buttons.  You can use Table View as a control console to do much more than simply view data.  You can also manipulate the Selection and perform actions on rows that are Selected or even simply highlighted.   Table View shows the entire data attribute contents of the currently active Map.

s004.png (61787 bytes)3. Selection with SQL Toolbar

Let's minimize Table View for a moment and use SQL Toolbar to make a quick and simple selection.   We choose [ELE] in the left box from the pull down menu choice of fields, etc.  This field gives the Elevation of each mine.  We choose >= in the function box in the middle, and we write in 1000 in the value box.  We then push Select.   SQL Toolbar will then go out and Select all mines whose elevation is greater than or equal to 1000 feet.  [This is the US, so they still use feet, not meters!].

The Selected objects in Map View are automatically recolored in Red, the default selection color.  Instantly, we can see all the mines that are located at elevations of 1000 feet or higher.  That was easy, wasn't it?

s005.png (57378 bytes)4. A Table View that shows the Selection

Suppose we want to see a Table View of just those objects in the Selection?  That's such a common need that Manifold provides Selection Table View, a form of Table View that always shows in table form only those objects in the Selection.   Click open Selection Table View and we see the objects.  Note that the Ele values for all of them are greater than or equal to 1000 (They'd better be!).  Some of the mines have a value other than GOLD in their COM1 field because the mines database can list the minerals involved under several commodities fields (the "com" fields).  We created this database to find all mines that produced gold at any commodity level, not just under the first commodity grouping.

Selection Table View is a "live" window.  If the selection is changed in Map View, any Selection Table View that happens to be open will have its contents also displayed.

5. Make some Mouse Selections and See the Changes in Selection Table View

s006.png (54644 bytes)You can use the mouse to make Selections directly within Map View.   How the mouse makes Selections is set by the visual selection control buttons, those that have a mouse cursor on them.

s002.png (916 bytes)

The image above shows the most important of these controls.   From right to left, it shows

s008.png (56478 bytes)OK, so now we can select in Map View in a free-form way.  Whatever is in a cursor box drawn by the Mouse will be the selection. Let's pick out some objects and see the change in Selection Table View. 

Click on the thumbnails at left to see some different selections and how they are updated in Selection Table View.  We are drawing small boxes with the mouse that enclose only a few objects at a time, so the changes in Selection Table View are more easily seen.  This is a lot easier to show in real life with a few mouse moves than to write about in text on a web page!

s009.png (55142 bytes)6. See Table View and Selection Table View at the Same Time

It's often convenient to leave Selection Table View open while doing other things.  This always provides a text display of what's in the   Selection.  As we will see, it's possible to use any Table View to choose records (each map object is just a record in Table View) to replace, add to, subtract from, invert with, or intersect with what's already in the Selection.

Table View has buttons that make it easy to manage records vis a vis the Selection.  For example, Selection Table View always shows only those records that are in the Selection.  Regular Table View shows all the records all the time. Suppose in regular Table View you wish to see which records are in the selection?    Easy!  click the Show Selection button and it will highlight as shaded rows all the records that are currently in the selection.

s010.png (55056 bytes)7.   Highlighting as a choice mechanism in Table View

Records that are highlighted in Table View are subject to the various actions and command buttons in Table View.  Records may be highlighted or de-highlighted using standard Windows mouse click moves.  Click on a record to highlight it / de-highlight it.  CTRL-click does that without affecting any other records that are highlighted.  SHIFT-click on a record highlights all the records between that record and any other records that are already highlighted.  If you are a UNIX person this may sound unfamiliar, but it is as normal as breathing in the Windows world.

Table View's toolbar also provides some buttons to Highlight All, De-Highlight All and Invert All Rows.    For example, the screen at right shows how to highlight all the records that are not in the Selection:  Click on the Show Selection button and then click on Invert All Rows.  Voila! you've highlighted all the records that are not in the current Selection.

s011.png (54803 bytes)8.   Highlight Some Records of interest

Let's say we are are looking at Table View, and some of the records are of interest to us.  However, it's a big map, and we are only interested in them if they are already in the Selection.

We can highlight a subset of records in Table View.  To do this, we simply CTRL-click on each record, or click on the top record and SHIFT-click on the bottom one to select all the records in a range.  We've highlighted a group of records in Table View.

9.  Intersect with previous Selection

s012.png (288 bytes)

Whenever we highlight records in Table View, we can use the highlighted records as the subject for commands within Table View.  The toolbar buttons in Table View illustrated above show five ways we can combine highlighted records with the previous Selection.  Clicking on the button with a + sign would Add the highlighted records to the Selection.  Suppose we selected some objects in Map View using the mouse, but later in browsing Table View realized we missed an object.  We can highlight it and Add it to the Selection.  Perhaps we accidentally included some objects we don't want in the selection.  We can highlight them and Subtract them (that's the button with the "-" sign!) from the Selection.

s013.png (52130 bytes)We are going to use the Intersect button here.  That's the button with the ampersand, &, sign.  This is a cool mode. It says "take all the highlighted records, and make the Selection consist of them that are in the previous selection."  This is an intersection between the previous Selection and the set of objects that are highlighted.

After pushing this button, we see that only the mines named SHELL, ONTOP MINE, and GOLD PROSPECT are in the Selection.   That's because they are the only records that were in the previous Selection and also were in the rows we highlighted in Table View. (Thumbnail)

s014.png (57504 bytes)10. Refining Selections Within Selection Table View

Let's switch gears a little.  Using the mouse, we will Select all the mines in the Omo Ranch quad.  We will also close Table View and leave Selection Table View Open.  The result is illustrated at right. (Thumbnail)

s015.png (54933 bytes)We will now remove some items from the Selection by highlighting them in Selection Table View.  When they are highlighted, we can then  press either Subtract from Selection or Invert with Selection.    It's obvious what Subtract from Selection will do and why.    Is it clear why Invert with Selection has the same effect when operated from within Selection Table View?

The Invert with Selection command takes any highlighted records and if they are in the Selection subtracts   them.  If they are not in the Selection it adds them.  Remember, Selection Table View shows the contents of the Selection in table form, so that all the records in Selection Table View are by definition already in the Selection. Any highlighted records are in the the Selection and would therefore be subtracted.  Note that regular Table View shows all records in the map, so that using Invert from within regular Table View may subtract some highlighted records and may add some depending on whether they are in or out of the previous Selection.s016.png (57231 bytes)

The illustration shows the result of the Subtract or Invert operation.  Note that some of the mines in the Omo Ranch quad (the ones we highlighted before pushing Subtract or Invert) are no longer shown in red Selection color since they are no longer in the Selection.

s017.png (56384 bytes)11.   Using Multiple Table Views

We can open as many Table Views or Selection Table Views as we like.  They will all be automatically updated if there are any changes made from Map View or from any of the table style Views.  The illustration shows two Selection Table Views with the Selection containing mines in the Omo Ranch quad. 

s018.png (56330 bytes)The upper Selection Table View presents the records sorted by elevation.  This was done by clicking on the Ele column header.  The lower Selection Table View presents records sorted by name.  This was done by clicking on the Name column header.  Note that one can look at different parts of the data base simultaneously with multiple table style Views.

12. Refining the Selection using Solvers or SQL

s020.png (507 bytes)So far, we've used the mouse to select objects in Map View, and we've used highlighting and selection command buttons in Table Views to interact with the Selection.   We also started this essay by using SQL Toolbar to select all mines with elevations >= 1000 feet. 

We can also use Solvers or SQL to further refine the Selection by adding, subtracting, inverting or intersecting the previous selection.   How the output of solvers intereracts with any previously existing Selection is guided by the solver output mode buttons.  These buttons are illustrated at left.

From top to bottom, they say to Do Nothing with the result, Replace the Selection, Add to the Selection, Subtract from the Selection, Invert with the Selection and Intersect with the Selection.  When we ran the SQL Toolbar earlier, we had the solver mode set to Replace, the default.  This meant that every time the SQL Toolbar ran, whatever it came up with became the new Selection.  Had the Add button been pushed in, any result from the SQL Toolbar would have been added to whatever was in the previous Selection.

The difference between the two may be explained as follows.   Suppose the Selection contains all mines at elevations between 500 and 750 feet.   Running SQL Toolbar with Replace mode to find all mines at 1000 feet and above will result in a Selection that contains only mines located at 1000 feet and up.  Running the same SQL Toolbar with Add mode will result in a Selection that still has mines from 500 to 750 feet as well as those at 1000 feet and up.

13. Using Intersect Mode with SQL Toolbar.

s018.png (56330 bytes)We will use a slightly more sophisticated mode, Intersect mode with SQL Toolbar.  That's the button enabled in the solver mode buttons illustration above.

Intersect means to take the results of the SQL Toolbar and to intersect them with what's in the Selection.   The new Selection consists of only those objects that were already in the previous selection and were picked out by SQL Toolbar.

To take an example, suppose we use the mouse to visually select all mines in the Omo Ranch quad.  We now want to refine the selection by keeping only those that are below 1128 foot elevation.   To do this, we simply set solver output mode to Intersect and then run SQL Toolbar with elevation <= 1128.   The result is shown at right in an illustration that has two Selection Table Views, one sorted in reverse order by elevation (from 1128 on down) and the other sorted by name.

s019.png (49279 bytes)Suppose we decide we want only those mines in the Omo Ranch quad below 780 feet?  That's easy.  We simply run SQL Toolbar again with elevation <=780, and continue to use Intersect mode.  The result is shown at right.

Note that some users like to think of Intersect mode as "restricted to" mode.  That is, they visualize this selection mode as restricting the items selected by the solver as being "restricted" to only the pool of items already in the previous Selection.   So, if you have selected all the mines in the Omo Ranch quad, using Intersect mode means you are restricting the operation of the SQL Toolbar to only those mines.

Summary: Free Form Selection

Manifold lets you select from

In all three cases, you can specify how the selection made will be combined with what's already in the Selection.   Each method of selection (Map, Table, Solver) has mode buttons that govern how its results combine with selection.

s002.png (916 bytes)

Map View selections can Replace, Add to, Subtract from, Invert with, or Intersect previous selections.  The Map View selection buttons incorporate a mouse cursor in the button's icon.

s012.png (288 bytes)

Table View selection command buttons can take the highlighted records and use them to Replace, Add to, Subtract from, Invert with, or Intersect previous Selections.  The Table View selection command buttons incorporate a splash of red selection color in them to show they work with Selections.s020.png (507 bytes)

Solver or SQL results can automatically Replace, Add to, Subtract from, Invert with, or Intersect previous selections.  The solver mode selection buttons show a green solver wedge in the button's icon.

We've seen in this essay how one can combine various selection methods in a free form way to make and refine Selections. We've also seen how the controls are conveniently available in the main Manifold console or within Table Views as needed. You can have multiple Table Views open at once, and leave Selection Table View popped open to see what is in the Selection at all times.  Finally, we've seen that the gold mines in the Omo Ranch area feature some colorful and imaginative names.

This is a very small part of Manifold.   But, it's an important part.  There are many other facilities within Manifold that have the same philosophy of approach to working with data.  We like to think of it as the "Software Tools" approach eloquently described by Kernighan and other writers.  The idea is that all software processes should be modular, so you can string modules together like pearls on a necklace with the output of one feeding into the input of the next.  Within this approach, we use Selection as the central meeting ground (a combined "stdin-stdout" for UNIX heads, or a "clipboard" for Windows heads) into which or from which Solvers can read and write, or which can be used interactively as we have done in this Essay.

btn_purchase_now.png (2836 bytes)Like what you see? Now is the time to buy Manifold System and get all these capabilities for yourself.  It's only $145 and it totally outperforms ancient systems from an earlier era.  You get more power, better ease of use and a spectacularly driven engineering organization working to serve you better.  While you are at it, why not order a copy of TIGER/Line 1997 as well? Visit the Manifold.net Online Store for a quick, easy, and secure purchase of Manifold products, or (in the US) call 800-556-5919 to order by telephone (9-5 PST).

Home Page - Products - Search - Support - Shopping - News - Online Store
Personal Mapping - GIS - Database Commander - 3D View Studio - Maps and Data
Testimonials - Y2K - Links - Licensing - Privacy Statement - Terms Of Use


© 2001 CDA International Ltd. All Rights Reserved.
Manifold is a Registered Trademark of CDA

Prices, terms and conditions, and product specifications subject to change without notice.  Please contact Manifold Net with any special needs or requests.

Back to Manifold Home Page