How to "cookie cut" in MapInfo
Introduction
This procedure outlines steps to "cookie cut" a portion
of a MapInfo map window, retaining the table structure of each individual table
open in a map window. Download the updated MapBasic program "Cookie98-38.mbx"
before starting this procedure. Place this file with the other MapInfo MBX tools
typically found in C:\Program Files\MapInfo\Professional 6.5\TOOLS\
The Procedure
- From the TOOLS menu select Tool Manager. Click the Add Tool
button
- In the Add Tool dialogue box click on the browse button (the 3 dots
beside the "Location" box) and navigate to the location where you
stored "Cookie98-38.mbx".
- Give the tool an appropriate Title and click OK.
- Click OK to the Tool Manager dialogue box.
Adding the Data to be Clipped
- Open the map table(s) you want to clip.
- Zoom to the desired location.
We need to make a layer editable in order to define a boundary to use as the
"cookie cutter".
- Right-click the mouse to reveal a dropdown menu. Select "Layer Control..."
to reveal a dialogue box showing all tables (layers) open in the map window.
- Check the box
beside the "Cosmetic Layer" to make it editable. See diagram below.
- Select the rectangle tool from the Drawing toolbar
.
- Draw a box around the area you would like to "cookie cut".
- If you can't see through the box, you will need to change the "fill" to "none".
Double-clicking the box with the pointer tool
will reveal the "Rectangle Object" information box.
-
Click on "style" to make the appropriate changes. From the "Region Style"
dialogue box, click on "Pattern" in the "Fill" options. Choose "N" for
"none". Click OK to apply the region style changes.
-
At this point you can also define the dimensions of the box as well
as the geographic coordinates of your location (GEOG 2P11 students
can use this step to define their GRID SQUARE
specifically).
-
Type in the desired width and height of the 'cookie cut' box. See diagram
below for details.
-
NOTE: if the units are defined as miles (mi) you will need to cancel
out of this dialogue and change the map units. Choose Map>Options and define
"kilometres" for distance and "square kilometres" for area. Click ok to
accept these changes.
-
You may also define the centre longitude (X) and latitude (Y) (in
decimal degrees) of your box to locate the area more precisely. To convert
your coordinates from degrees/minutes/seconds to decimal degrees, follow
the procedure outlined below using the MapBasic "Degree
Converter" program.
-
Click OK in the Rectangle Object dialogue to accept these details and return
to the map window.
-
Make sure the box is selected (it will be highlighted in the map window
when selected).
- From the "Tools" menu, select "Cookie Cutter>Cut Cookie from map...".
-
The program automatically runs, prompting you to assign each portion of
the original table with a NEW name. After assigning an appropriate
name, click "Save" to continue with the process. NOTE THE DIRECTORY WHERE
YOU ARE SAVING THE TABLES!! Brock University students can create their
own directory on the hard drive under the "Student" directory. These files
will be cleared at the end each academic year.
-
The "status" window will tell you when the cookie cut process is finished.
Close the status window by clicking the "X" in the top right corner.
-
Choose File>Close All... You will be prompted to save "unsaved"
objects by creating a workspace. The "unsaved" object is your boundary
created in the "cosmetic" layer. If you would like to save it, I recommend
clicking cancel and using the Map>Save Cosmetic Objects... option
to create a <NEW> table for your "boundary". If you don't want to create
a new table, click "discard" and all tables will be closed.
-
Choose File>Open Table... Use the shift key to select all of the
"cookie cut" tables to open. Select "New Mapper" under "Preferred
View" to open the tables in the same map window. Click "Open".
-
Right-click in the map window and select "View Entire Layer..." from the
drop down menu. Choose "All Layers..." and "OK" to see the full extent
of your "cookie cut" selection.

Degree Converter
-
Determine the geographic coordinates of your location
using a topographic map sheet. We recommend the 1:10,000 scale Ontario
Base Map Series for determining the degrees, minutes and seconds
of
a location.
- To convert your coordinates from degrees/minutes/seconds
to decimal degrees you will need to use the MapBasic program called
"Degree Converter". If you cannot find this tool located in the "TOOLS" menu,
you can either locate the application in the "Tool Manager" (check the "Load"
and "Autoload" boxes) or click the "Run MapBasic Program" button
and navigate to "C:\Program Files\MapInfo\Professional\Tools\dmscnvrt.mbx"
to run the program.
-
With the program loaded, choose "Tools>Converter>LongLats
Calculator>Convert Coords..." the following dialogue will appear:
-
Type in your degrees, minutes, seconds and click the "convert" button.
The converted coordinates will appear in the "decimal degrees" box. Write
the decimal degrees on a piece of paper and click "Done" when you are finished.
-
In the map window, double click the "cookie cutter" box, using the selection
tool, to change the geographic coordinates. Type in the decimal degrees
for the centre longitude (X) and latitude (Y) of your square. Click
"OK" when you are finished. The box should automatically centre over the
1 kilometre grid square you defined. If you have any trouble, please ask
staff for assistance.
-
Run the Cookie Cut MapBasic Program as outlined above.
[an error occurred while processing this directive]