Registering Map

download Registering Map

of 41

Transcript of Registering Map

  • 7/28/2019 Registering Map

    1/41

    Maps as LayersYou have already been introduced to the concept of computer maps is a collection oflayers .Each database table that contains graphic objects, set of data values orevents which are displayed as a layer in a Map window such as table of customers, atable of streets, and a table of county boundaries. Layers appears like figure below:

    Think of these layers as transparencies where each layer contains a different part ofthe map. The layers are stacked one on top of the other and allow you to see allaspects of the map at the same time. For example, one layer may contain countryboundaries, a second layer may have symbols that represent capitals, and a thirdlayer might consist of text labels. Laying these transparencies one on top of the otherbuilds a complete map.If you have geographic locations associated with the records in your database, youcan open it as a layer in a Map window. (If not, you can add them by geocoding yourtable, a process that is discussed in the next chapter.)For example, you have a table of public telephone locations with information onfrequency of use and maintenance records for Arlington, Virginia. Display the table ina Map window. You can also display a table of city streets and a table of your servicezones as additional layers in the same Map window.

    You can now see how many public telephones are in each service area just by

    counting how many symbols appear within each boundary (or let MapInfoProfessional count them for you). MapInfo can thematically shade the boundariesaccording to the number of phones per area.

    Creating a MapCreating a map in MapInfo begins once you open your table(s). For instance, if youwant to create a map consisting of a layer of U.S. cities and a layer of states, you cando it in one of several ways.

    No Tables OpenChoose File > Open Table, and select the states table and the city_1k table.Remember, to select nonadjacent tables, hold down the Control key as you click oneach table.Choose Automatic from the Preferred View list, and Click OK. MapInfo places the

    layers in the correct order and displays the map.Table(s) Open but Not DisplayedWhen one or more of your tables is open, but is not displayed in your Map window,you can display them in two ways: Window > New Map Window the states table in a Map window, you can display thecity_1k table with the states table using the New Map Window command.Choose Window>New Map Window. Choose city_1k in the first list box, and choosestates in the second list box. MapInfo draws the layers from the bottom up in theorder you list them. To ensure that your boundaries do not cover your points, list the

  • 7/28/2019 Registering Map

    2/41

    boundary layers below the point layers. Click OK. A new Map window of the city_1kand states tables displays. Map > Layer Control > Add

    Layer Control DialogThe key to controlling your map layers is the Layer Control dialog. You can access itin two ways: Choose Map>Layer Control, or click the Layer Control button in the Main

    Toolbar. Layer Control enables you to manipulate the layers and their attributes tocontrol the display of the map.

    The dialog shows all the layers that make up the current Map window and the status

    of the layer attributes. These attributes are: visible, editable, selectable, and autolabel. The icons above each check box column represent the attributes. ToolTipsdisplay over the attribute icons when you move your cursor over them to helpfamiliarize yourself with each icon. It is easy to change a layers, or multiple layers,attributes using the check boxes. You also have options available to change theDisplay and Label settings; modify any thematic maps you have displayed; andreorder, add, or remove layers.

    Manipulating Layers for DisplayLayer Visibility

    The visible attribute in Layer Control controls whether a layer is visible on the map.For example, to make a layer invisible, clear the layers visible check box. The layerwill no longer display in the Map window. The table, however, is still open. To makemore than one layer invisible, select the layers you want. Use the Shift key to select

    contiguous layers. Use the Control key to select noncontiguous layers. Click on thevisible check box for one of the selected layers. All the layers visible check boxes arecleared. When your map re-displays, the selected layers will no longer be visible. Thisfeature is especially useful when you want to focus on only one or two layers of amulti-layered map.

    Display OptionsWhen you first open a Map window, boundaries, lines, points, and text are alldisplayed using defaults in the map file. You can change how objects display by usingthe Display Mode section of the Display Options dialog.

  • 7/28/2019 Registering Map

    3/41

    Editable and Selectable LayersTo make changes to the graphic objects in a layer, you must make the layer editable.You can draw objects on that layer, add text, combine, or delete objects. Only onelayer per Map window can be editable at one time.

    To make a layer editable, check the Editable box that corresponds to the layer you

    want to make editable in the Layer Control dialog (choose Map > Layer Control, orclick the Layer Control button in the Main toolbar). You can also control the editabilityof the layer via the Status Bar at the bottom of your screen. To change the editablelayer from the Status Bar, click the Editing box to display a list of the layers used intheMap window. Choose the layer you want to make editable. Its name displays in theStatus Bar. To deactivate editability for all the layers, choose None. If you only wantto select objects for further analysis rather than change the objects, make the layerselectable. More than one layer can be selectable at a time. If a layer is editable, it isautomatically selectable.

    The Cosmetic LayerEvery Map window in MapInfo has a Cosmetic Layer. Think of the Cosmetic Layer asthe blank transparency that lies on top of the other map layers (transparencies). It

    stores map titles and other graphic objects you create during a work session. TheCosmetic Layer is always the top layer of the map. You cannot remover the CosmeticLayer, nor reorder it.

  • 7/28/2019 Registering Map

    4/41

    Working with the Cosmetic Layer

    You can only make the Cosmetic Layer editable or selectable. Other Layer Controloptions (labeling, zoom layering, display mode) are not available for the CosmeticLayer. To select fill patterns, line types, symbols, and text font for the Cosmetic

    Layer, use the Line Style, Region Style, Symbol Style and Text Style commands fromthe Options menu. If the Cosmetic Layer is editable, you can access the style optionsfrom the Drawing Toolbar.

    The contents of the Cosmetic Layer are linked proportionally to the map. Map objects(except for symbols) and text in the Cosmetic Layer are proportionally linked to thezoom level of the map. If you draw objects in the Cosmetic Layer and then changethe maps zoom from 30 to 100 miles, the size of the objects will appear smaller.

    Opening a TableThis chapter presents the most common ways to view your data: by mapping,browsing or graphing. Viewing a layout of your maps and displaying raster imagesare discussed in separate chapters.

    To open your table:1. Choose File > Open Table. The Open Table dialog displays.2. Choose the drive and directory for the table you want to open.3. Choose the appropriate table (.tab file). When opening multiple tables, use Shift-click to select adjacent tables and Control-click to select non-adjacent tables.4. Choose New Mapper from the Preferred View list.5. Click Open.

    Mapping a TableOpening a table as a map creates a Map menu on the menu bar. Use the Map menuto control the look and function of the map. You can change certain aspects of theactive Map window in the Map Options dialog (Map>Options), such as the map units,and if the Map windows projection is appropriate, specify Cartesian calculationmethods. With the Layer Control command, you can reorder the layers in the map,change the display, add new layers, create and modify thematic maps, change the

  • 7/28/2019 Registering Map

    5/41

    view, add labels and text, and set/change map units and projection. These optionsare further discussed in Chapter 7, Mapping in Layers, and Chapter 11, ThematicMapping. To create a new map:1. Choose Window > New Map Window.2. Choose the table(s) you wish to display in a Map window and click OK.

    Managing Your TablesDatabase tables are the foundation of many tasks in MapInfo Professional. Theyprovide the basic framework from which you create maps and analyze data. You havealready been introduced to the concept of tables in Chapter4. This chapter focuses on the business of maintaining your tables. It begins,however, with a basic primer on databases. For learning about querying tables, seeChapter 10, Selecting Using Queries

    MapInfo TablesNow that you understand a little more about databases, lets put it in the context ofMapInfo. In MapInfo you can work with two types of tables. Data tables are like the

    address table we just discussed. Most tables in MapInfo are of this type. Furthersubdividing this class of tables are data tables that contain graphic objects (mapobjects) and data tables that do not (such as spreadsheets or external databasetables).

    The second type of table is a raster table, a graphic image that you can display in aMap window. These computerized pictures do not have the same table structure ofrecord, field, and index as data tables do, and therefore, will not be discussed in thischapter. For more on raster images, see Chapter 19, Displaying Raster Images. Thefollowing information applies to data tables.

  • 7/28/2019 Registering Map

    6/41

    Linked TablesA linked table is a special kind of MapInfo table that is downloaded from a remotedatabase and retains links to its remote database table. You can perform mostoperations on a linked table that you do for a regular MapInfo table. For instance, youcan view, edit, copy, save, and rename a linked table just asyou could a regular MapInfo table. However, there are some things you cant do to a

    linked table. For instance, you cant pack a linked table. You also cant modify thetable structure of a linked table (but you can modify its MapInfo index structure).

    You have live access to remote databases, enabling you to make changes to yourremote database directly. To learn about linked tables and find out about live DBMS/remote database access, see Chapter 23, Accessing Remote Database Data.

    Creating a New TableAs you learned in Chapter 4, you can bring in data tables from several outsidesources: dBASE, Excel, Access, Lotus 123, and delimited ASCII. You can also createyour own database directly in MapInfo. These databases can be opened anddisplayed as maps (providing they contain graphic objects), Browsers, or graphs.

    To create a new table in MapInfo:1. Choose File > New Table. The New Table dialog displays.2. Choose Open new Browser so that the new table will be open in its traditional

    tabular form in a window.3. Choose OK. The New Table Structure dialog displays.4. Choose Add Field to begin building the databases structure. Give the field a name,type, width, and specify whether the field will be indexed.5. Continue to add fields until you have the number you want.6. Use the Up and Down buttons to reorder the fields. Keep in mind that the order offields in this dialog (top to bottom) will actually display as columns (left to right) inthe Browser window.7. Choose Create. The Create New Table dialog displays.8. Specify a location for the new table in the Save in box.9. Enter a name for the table in the File Name box.10. Specify the file type in the Save as type drop-down list. You can choose from thefollowing formats:

    MapInfo (*.tab) MapInfo version 2.x (*.tab) dBASE DBF (*.tab) Microsoft Access (*.tab)11. Click Save. If you chose either of the MapInfo formats, MapInfo creates your table.

    You are finished. If you chose dBASE DBF, proceed to step 12.12. If you chose dBASE DBF, the dBASE DBF Information dialog displays, asking you tospecify a file character set. Choose the one appropriate for your language and clickOK. Click Save in the Create New Table dialog. MapInfo creates the new table. Youare finished.Note: Do not use Districts as a name for your base tables. MapInfo uses Districtsinternally as a system table when beginning a redistricting session.See the section on Microsoft Access Tables later in this chapter for information on

    creating a new Access table.

    Tracing Existing ObjectsMapInfo makes it much easier to trace an existing polygon network, e.g., theUnited States. The new autotrace feature allows you to easily trace the nodesof an object when using the Polyline or Polygon tools. This makes it easier todigitize objects that share a border because you dont have to re-digitize theshared portion of the border. You can autotrace it.

  • 7/28/2019 Registering Map

    7/41

    Autotrace is available when Snap mode is turned on. Note that you can onlyuse autotrace with existing polylines and polygons. You cannot autotracerectangles, ellipses, arcs, or other shapes made with the drawing tools. Toautotrace a polyline/polygon while digitizing, do the following:

    a. Activate Snap mode (press the S key), and click on a node of thepolyline/ polygon you want to autotrace.

    b. Move the puck to another node of the same object.c. Do one of the following: For polylines, hold down the Shift key and

    click. For polygons, hold down either the Shift or Ctrl key and click. Assoon as you press either the Shift or Ctrl key, MapInfo highlights thepath to be autotraced. When you click, MapInfo automatically traces allthe segments between the two nodes and adds them to thepolyline/polygon you are drawing.

    Note: The Shift key autotraces the shorter path between the two nodes (thepath with the less or number of nodes), and the Ctrl key autotraces thelonger path (the path with the greater number of nodes). Autotrace works thesame way as when you are selecting multiple nodes in Reshape mode.

    Digitizing with MapInfoSometimes the only way to bring a map into MapInfo Professional is to tracethe map by hand. Using MapInfos digitizing feature, you can trace the detailsof a paper map with a puck and a digitizing tablet and record the tracings asa vector image (object with geographic coordinates) that can then bedisplayed in MapInfo as a map layer. Since they are vector images, digitizedmaps allow you to use all of MapInfos powerful functionary with them.Digitized Maps vs. Raster ImagesWhile digitizing is a time-consuming process, it has some advantages overscanned raster images, particularly if you want to use the map for geographicanalysis. Digitizing a map creates a vector image that is just like any otherMapInfo map layer. Each feature you digitize becomes a map object that youcan edit, move, customize, or attach data to. You can include as much detailas you want to trace from the paper map. A raster map, on the other hand, issimply a graphic image that is used for display purposes only. You cannotedit or attach data to it. It is used as a backdrop for other map layers. Itsmain advantage over digitizing is input speed. For more on raster images,see Chapter 19, Displaying Raster Images.Digitizer Setup

    To communicate the tracings on the paper map to MapInfo properly, youmust provide some information about your map. In the Digitizer Setup dialog,you specify control points for your map, the map projection and appropriatemap units, and configure the buttons on your digitizing puck.Choose Map > Digitizer Setup to begin.

    The Digitizer Setup dialog displays. Each part of the dialog is discussedbelow.Map ProjectionMaps are drawn using a particular projection, or distortion, of the earthssurface to maintain the relationship of the curved earths features on a flatpiece of paper. When you digitize a map using MapInfo, you must specify the

  • 7/28/2019 Registering Map

    8/41

    projection so that MapInfo can take the maps distortion into considerationand maintain the correct relationship among the map features.

    You cannot change the projection after you have begun to digitize, so makesure you set it correctly now. Click the Projection button in the Digitizer Setupdialog to select a projection. In general, the projection is specified in the maplegend. MapInfo supports a wide variety of projections. For aerial

    photographs, use Longitude/Latitude as the projection.Map UnitsIn addition to knowing the projection, you must specify the map units usedfor the coordinate system. For instance, a map in the Longitude/Latitudeprojection will show map coordinates in degrees.If you do not have coordinates for the map, you will need to digitize it as anon-earth map, which means points on the image will only be relative to eachother, not to points on the earth. Create a non-earth map table first anddisplay it in the active Map window.Specify the map units from the Map Units drop-down list in the dialog thatmatches the coordinate units on the paper map. Degrees will always beavailable for earth maps. In addition, other map units may be available if you

    have identified the map in a projection other than Longitude/Latitude.Entering Control PointsFor MapInfo to make a digitized copy of your paper map, it must be able tocorrectly interpret the location of the digitizing puck on the tablet as youtrace the map. To do this, you must first set the parameters by specifyinglocational coordinates for several control points on the map. To set a controlpoint, choose a point on the tablet and click a button on the puck. Type thecoordinates that correspond to that point in the Digitizer Setup dialog. Toadd, edit, remove, or clear all control points, choose the appropriate button inthe Digitizer Setup dialog. A dialog appears for each button to walk youthrough the steps. For instance, to add a control point, choose Add. The Pick

    Tablet Point dialog displays telling you to choose a point on the tablet andclick a digitizer button. Now the Add Control Point dialog displays promptingyou for a label (optional) and the map coordinates for the point. When youare through, click OK. Repeat this process for each control point you enter.Keep in mind that you must enter the coordinates in the units you specified inthe Digitizer Setup dialog. If your map unit is in degrees, be sure to type inthe coordinates as decimal degrees. For a discussion on converting degrees,minutes, and seconds to decimal degrees see Appendix 4, ConvertingCoordinates, in the MapInfo Reference.Editing Control Points

    To edit a control point, choose the point from the list of control points in theDigitizer Setup dialog and press the Edit button. The Edit Control Point dialogdisplays. Make the appropriate changes to the label or X and Y coordinates.

    Digitizing Your MapOnce you have specified the control points, projection and map units of yourmap and have determined that the error for control points is acceptable, youare ready to digitize your map.

    To begin digitizing:

  • 7/28/2019 Registering Map

    9/41

    Working with SpreadsheetsWhen you have a table that is based on a spreadsheet or database, MapInfo does notrequire that you create a new table or import the data. MapInfo works with theoriginal .DBF (or .XLS) file, which saves time and disk space. The first time you open

    the file, MapInfo creates a .TAB file. After that, the .TAB file will appear on the list offiles available to open. There are some limitations, however, when working withspreadsheet data: You cannot change the structure of a table that was based on a spreadsheet file. You cannot edit a table based on a spreadsheet. To work around these limitations,use Save Copy As before making any changes. See Saving a Table, below.

    Microsoft Access TablesSeveral improvements have been added to MapInfos support of Microsoft Accesstables. As before, both MapInfo and MapBasic enable you to open Microsoft Accesstables directly from the Open Table dialog (File>Open Table). With MapInfoProfessional 6.0, this support now includes both Access 2000 tables and Access 95/97 tables. You will notice this support when you create a new Access table and whenyou save an existing table as an Access table. Control the Save Access Table dialog

    enables you to choose the version of Access that you want to save the database to.In addition, multi-user support has been implemented for Access tables. This supportincludes the ability for multiple users to read, add, update, and delete records froman Access table. Some table operations from the Maintenance sub-menu are notsupported (Table>Maintenance). These are: Pack, Rename, Delete, and Alter TableStructure.

    You can also use Access databases on read-only media; however, the table musthave an autonumber column that is uniquely indexed.

    Opening a Microsoft Access Table in MapInfoTo open an Access table in MapInfo, do the following:1. Choose File > Open Table. The Open Table dialog displays.

  • 7/28/2019 Registering Map

    10/41

    2. Choose Microsoft Access Database from the Files of type menu. The Accessdatabases (.mdb) for the specified location display.3. Choose an Access database to open. If database security is turned on, you will beprompted to give the password for the database.

    Open Access Table dialog displays the tables for the opened database.

    4. Choose an Access table or tables to open. The table or tables are opened inMapInfo. MapInfo handles Access files the same way it handles opening files in otherformats in MapInfo. After you open the Access table in MapInfo for the first time,

  • 7/28/2019 Registering Map

    11/41

    MapInfo creates a definition for the table and gives it a .TAB extension. This enablesyou to it treat it like any other MapInfo table. The next time you open the file, youwould open it as you would any other MapInfo table. Please note that even thoughthe table now has the .TAB extension in MapInfo, your data is still in your originalAccess database table and is not a duplicate.

    Creating an Access Table

    Creating a Microsoft Access table has several additional steps than creating aMapInfo table. To create an Access table, first perform steps 110 in the Creating aNew Table section of this chapter. The Create New Table dialog should be on yourscreen, as shown below. Do the following:

    1. In the Save in field, specify the location where you want to create the MapInfo tabledefinition of your Access file. The MapInfo table definition is the .tab file. It is used byMapInfo to keep information about an Access file registered in MapInfo.2. In the Save As Type field choose Microsoft Access Database.3. Click Save in the Create New Table dialog. The Save Access Table dialog displays.

    The default database displays in the dialog. The default is determined by the name ofthe .tab file you entered. The default has the same name as the .tab file. A databasefor this file may or may not exist.

  • 7/28/2019 Registering Map

    12/41

    If the database you specified does not exist, the Save Access Table dialog nables youto specify the version of Microsoft Access you want to use for the database. Chooseeither Microsoft Access 2000 or Microsoft Access 95/97 from the Version drop-downlist.If a database does exist, the Save Access Table dialog indicates the version of thedatabase. It also lists the tables in the database.

  • 7/28/2019 Registering Map

    13/41

    4.To create your table in the default database, use the default file name or enter anew one in the Enter the name of the new Access table box. The default file name isthe same name specified in the Create New Table dialog. Click OK.MapInfo creates the new table to the default database. To create your table in adatabase other than the default, proceed to step 5.5. Click the Database button. The Select Access Database dialog displays.

  • 7/28/2019 Registering Map

    14/41

    6. In the Save in drop-down list, specify the location of the Access database. This iswhere you will create the table.7. Click on the database you want to create the table in. The name displays in the FileName box. To specify a new database, enter the name in the File name box.8. Choose Save. The Save Access Table dialog displays again. If you chose an existingdatabase, the name and version display in the dialog Any tables already in thedatabase are listed in the Existing Tables box. If you specified a new database, selectthe database version from the Version drop-down list. Choose either Access 2000 or

    Access 95/97.9.The file name you chose in the Create New table dialog is displayed in the Enterthe name of the new Access table box. You can use this name or specify a differentname. Click OK. MapInfo creates the table as a Microsoft Access table in the databaseyou specifiedSaving Access and MapInfo Tables

    You can save a MapInfo table as an Access table, save an Access table as a MapInfotable, and save an Access table as an Access table using the File > Save Copy Asmenu command.

    Saving a MapInfo Table as an Access TableTo save a MapInfo table as an Access table, do the following:1. Choose File > Save Copy As. The Save Copy of Table As dialog displays.

  • 7/28/2019 Registering Map

    15/41

    2. In the Save in field, specify the location where you want to save the MapInfo tabledefinition of your Access file. The MapInfo table definition is the .tab file. It is used byMapInfo to keep information about an Access file registered in MapInfo.3. In the Save As Type field choose Microsoft Access Database.4. Choose Save. The Save Access Table dialog displays. The default database displaysin the dialog. The default is determined by the .tab file you selected. It has the samename as the .tab file. A database for this file may or may not exist. If the databaseyou specified does not exist, the Save Access Table dialog enables you to specify the

    version of Microsoft Access you want to use for the database. Choose either MicrosoftAccess 2000 or Microsoft Access 95/97 from the Version drop-down list.

  • 7/28/2019 Registering Map

    16/41

    If a database does exist, the Save Access Table dialog indicates the version ofthe database, as shown below. It also lists the tables in the database.

  • 7/28/2019 Registering Map

    17/41

    5. To save your table to the default database, use the default file name or enter anew one in the Enter the name of the new Access table box. The default file name isthe same name specified in the Save Copy As dialog. Click OK. MapInfo saves thenew table to the default database. To save your table to a database other than thedefault, proceed to step 6.

  • 7/28/2019 Registering Map

    18/41

    6. Click the Database button. The Select Access Database dialog displays

    7. In the Save in drop-down list, specify the location of the Access database. This iswhere you will save the table.8. Click on the database you want to save the table in. The name displays in the FileName box. To specify a new database, enter the name in the File name box.9. Choose Save. The Save Access Table dialog displays again. If you chose an existingdatabase, the name and version display in the dialog. Any tables already in thedatabase are listed in the Existing Tables box. If you specified a new database, select

    the database version from the Version drop-down list. Choose either Access 2000 orAccess 95/97.10. If you want to use a different file name, enter the name in the Enter the name ofthe new Access table box, and click OK. MapInfo saves the table as a MicrosoftAccess table in the database you specified.

    Saving an Access Table as a MapInfo TableUse the Save Copy As command as you normally would to save the Access table as aMapInfo table.

    Saving an Access Table as Another Access TableThis option is used to save an Access table to a different database. The process issimilar to saving a native MapInfo table. Use the Save Copy of Table As dialog tospecify the database path and name, then use the Save Access Table dialog tospecify the name of the new table.

    Deleting a TableDeleting a table allows you to remove the .tab file and all component files associatedwith the table.

    To delete a table:1. Choose Table > Maintenance > Delete Table.2. Choose the table to delete and click OK. A message displays to inform you that thetable will be permanently deleted and the operation cannot be undone.3. Click OK and MapInfo deletes the table.

    Packing a Table

  • 7/28/2019 Registering Map

    19/41

    Packing a table allows you to compress tables to take up less disk space. You canchoose to pack only tabular data or graphic objects or both. Packing tabular dataremoves deleted records. When you pack a table, MapInfo requires that you havetwice as much free space as the table takes up to handle a copy of the database as ascratch file. To pack a table:1. Choose Table > Maintenance > Pack Table. The Pack Table dialog displays.

    2. Choose the appropriate table and whether you want to pack tabular or graphicdata, or both.3. Click OK.Note: Packing a table can corrupt customized labels saved to a workspace. If you aregoing to be working with customized labels, pack the table before you create thelabels.

    Adding Data to a TableOne important operation in maintaining tables is the ability to update the datacontained in the table. MapInfos Update Column feature allows you to: Add a temporary column or update an existing column with data from anothertable. Update a subset of a table.

    Place graphics information into visible columns.

    Adding a Temporary Column to a TableOften you will need to bring data from one table into another. In MapInfo you caneither create a temporary column in the table you wish to update or update anexisting column. In both cases, use Table > Update Column to bring over theinformation automatically.Note: If you plan to update a table with data from another to create a thematic map,you can access the Update Column dialog directly from the thematic dialog. SeeChapter 11, Using Thematic Mapping to Analyze Your Data, for details. You havetremendous flexibility with how and what information is transferred, such asperforming aggregate functions to transfer averages, minima, maxima, sums,weighted averages, and proportional sums. You can also create expressions to derive

    additional information from the data.Once the information is transferred, any changes you make to the original table willbe automatically updated in the temporary column. To save the temporary column,use File > Save Copy As. You can also save the information if the table is part of aworkspace that you save. If the information is saved with Save Copy As, the valueswill remain the same. If saved in a workspace, the column is recomputed wheneverthe workspace is opened. For example, you want to calculate the sum of yourcustomers order amounts and report the information by state. Update Columncreates a temporary column in the states table to store the information from thecustomer table. During the operation each customers order amount is calculatedwith other customers from the same state.

  • 7/28/2019 Registering Map

    20/41

    A Browser of the states table will show the sum of order amount by state. To do this,choose Table > Update Column and fill in the Update Column dialog as shown below:

    automatically enters Add new temporary column to the Column to Update box. Thisalso activates the Join button. In this example the Join operation will match columnsin each table based on a common column name (where State from table STATESmatches State from table CUSTOMER). In other situations you can match informationbased on common geography. At the Calculate list box, choose Sum from the list thatincludes Value, Avg, Count, Min, Max, Sum, WtAvg, Proportion Sum, Proportion Avg,and Proportion WtAvg. (For a discussion of these functions, see Aggregating Data

    with Update Column later in this chapter.) At the Of list box, MapInfo automaticallydefaults to the first numeric field in the table when you choose any function otherthan value. Click OK when through. MapInfo updates the STATES table and reportsthe order amount by state in a Browser. When the order amount of a customerchanges, you can simply make the change in the CUSTOMER table. MapInfoautomatically updates the sum of the order amount for that state in the STATEStable. To save the temporary column, choose File > Save Copy As.

    Displaying your Access dataTo convert Microsoft Access data into a MapInfo Professional table:

    1. Choose File > Open. The Open dialog box displays.2. Choose Microsoft Access Database from the Files of type menu.3. Choose an Access database to open. If security is turned on, a prompt

    will be display to give user and password information to open thedatabase.

    4. The Open Access Table dialog box displays the tables in the openeddatabase.

  • 7/28/2019 Registering Map

    21/41

    5. Choose Name of the table or tables to open. The table or tables areopened in MapInfo Professional. (Please note that for a table name witha space such as Order Details can be saved in MapInfo Professional butsubsequently will not be visible to MapInfo Professional) hence alwaysavoid white space in database naming.

    Opening Comma Delimited Files in MapInfo ProfessionalYou can export tables to comma delimited .csv text files. You can open .csvfiles from our File > Open dialog box as well. To open a comma delimitedfile:

    1. From the File menu, click Open to display the Open dialog box.2. From the Files of type box, select Comma delimited CSV (.csv).3. Navigate to the folder that contains the file you want to open and click

    it to select it.4. Click Open to display the Comma Delimited CSV Information dialog

    box. he Delimiter option buttons in this dialog box are disabledintentionally because commas are he only expected delimiters in thisfile format.

    5. Select the File Character Set for this file from the drop-down list andselect the Use First Line for Column Titles check box if applicable.

    6. Click OKto open the file. When you export a file to a comma delimited(CSV) format, a Comma Delimited CSV Information dialog box displays.In this dialog box, you can select a new delimiter, choose the filecharacter set, and choose to use the first column in the file for columnheadings. When you have made your selections, click OK.

    To create a MAPINFO_MAPCATALOG manually:1. If the RDBMS requires owners and users, then create the user MAPINFO

    with the PASSWORD MAPINFO in the specific database where themappable tables are located.

    2. Create the table MAPINFO_MAPCATALOG in the database. The CreateTable statement must be equivalent to the following SQL Create Tablestatement. It is important that the structure of the table is exactly likethis statement. The only substitution that can be made is for databasesthat support varChar or text data types; these data types can besubstituted for the Char data type.

    3. Create a unique index on the TABLENAME and the OWNERNAME, soonly one table for each owner can be made mappable.

    4. Grant Select privileges to all users on the MAPINFO_MAPCATALOG. Thisallows users to make tables mappable. The Update, Insert, and Deleteprivileges must be granted at the discretion of the databaseadministrator.

    Prepare your Connection and DatabaseTo work with your DBMS data in MapInfo Professional, you need to set upyour database connection by following the steps in the sections:

    1. Creating a Data Source ConnectionThere may be prerequisites, in addition to installing a driver that youneed to connect and work with a database. Each of the followingAccess, SQL Server, Oracle and PostGIS provides different mode of

  • 7/28/2019 Registering Map

    22/41

    connection. When connecting to a data server, two choices wereavailable: to use windows authentication or to provide a username andpassword unique to the data server. Windows authentication is theusername and password you use to log in to your network. Dependingon how your database server is set up, you may only require yourwindows authentication to log in. Otherwise, you would provide a

    username and password that is unique to the server. Windowsauthentication were usually provided by database administrator.

    2. Creating a Map Catalog in the DBMS to Work with DataYour database administrator may need to grant you specific accessprivileges to the database to work with the data. The following sectiongives details:

    Before you Begin Creating a Map Catalog Table on page 191.3. Making a DBMS Table Mappable to Display it on a Map

    Access your DataAfter setting up your database connection, you are ready to work with yourdata in MapInfo Professional, see Opening a DBMS Table in MapInfoProfessional.

    For details, see: Working with SQL Server Tables Working with PostGIS Tables Working with Oracle Spatial TablesIf your data includes spatial data, which can be columns holding X and Yvalues, such as Latitude/Longitude, or a column holding sptial data in theformat specified by the database system. With no spatial information, youcan work with your data in a table browser (a Browser window) in MapInfoProfessional. If your data does not include coordinate information, thenconsider geocoding, adding the coordinate information, using a Pitney BowesSoftware Inc. product, such as MapMarker or Spectrum.

    Creating a Data Source ConnectionThe first step to working with data in a DBMS is setting up a data sourceconnection on your machine to the DBMS. This is necessary for a DBMSinstalled on to your machine or on the network. SQL Server and Post GISrequire an Open Database Connectivity (ODBC) connection and Oracle Spatialrequires an Oracle Call Interface (OCI) connection. You must have the ODBCdriver or OCI installed on your machine before creating a data sourceconnection. MapInfo Professional installs or updates Windows ODBC drivers ifthey are older than the version that MapInfo Professional supports. For non-Windows databases, such as Oracle and PostgreSQL with PostGIS, consultwith your database administrator for information on how to obtain and installthe driver provided with your database.Creating a Data Source Connection to SQL ServerBefore you begin, you need a SQL Server driver installed on your machine.Check with your database administrator to install the driver for yourdatabase. You need to know the SQL Server name, and the login ID andpassword if required.

    To create a new SQL Server data source connection:1. From the File menu, select Open DBMS Connection.

  • 7/28/2019 Registering Map

    23/41

    2. If the Open DBMS Connection dialog box displays, select ODBC fromthe list and then click New.

    3. In the Select Data Source dialog box, select either the File DataSource or the Machine Data Source tab and then click New. Youcan share the connection information for a file data source with otherusers on the network if they have the necessary drivers, because it is

    stored in a file. You cannot share the connection information for amachine data source, because it is stored in the registry on the localcomputer.

    4. In the Create New Data Source wizard:a. Select the type of data source to create: User Data Source or

    System Data Source. Make a selection to display thedescription for it in the wizard. Click Next to continue.

    b. From the driver name list, select the SQL Server driver youhave installed for the database and then click Next.

    c. Click Finish.5. In the Create a New Data Source to SQL Server wizard set the

    following. If you are unsure of the settings to use for your database,

    consult with your database administrator.a. In the first screen provide the following information: Description

    Optionally, type a description if you plan on connecting to morethan one database and would like a description for this connection.From the Server list either select from the list or type the name ofthe SQL Server to connect to. Click Next.

    b. In the next screen, select how SQL Server will verify theauthenticity of the login ID. Optionally select to connect to SQLServer to obtain default settings for more configuration options.Click Next.

    c. Keep the default settings (check with your database administrator)and click Next.

    d. Keep the default settings (check with your database administrator)and click Finish.

    6. In the ODBC Microsoft SQL Server Setup dialog box, click Test DataSource.

    7. In the SQL Server ODBC Data Source Test dialog box, click OK. If therewere errors, click OKto return to the ODBC Microsoft SQL Server Setupdialog box. Click Cancel to return to the Create a New Data Source toSQL Server wizard and use the Backbutton to view your settings andmake changes. Return to step 5.

    8. In the ODBC Microsoft SQL Server Setup dialog box, click OK.9. In the Select Data Source dialog box, under the Machine Data Source

    tab, your new SQL Server connection displays in the list of availabledata source connections. Click OK.

    10.In the SQL Server Login dialog box, type your login ID and password ifrequired and click OK. You must now create a map catalog for thedatabase, continue to Creating a Map Catalog Table UsingEasyLoader

    Creating a Data Source Connection to Microsoft Access

  • 7/28/2019 Registering Map

    24/41

    You can work with your Microsoft Access database from MapInfo Professionalthrough an ODBC connection. Microsoft Access does not allow spatial data,but you can display in MapInfoProfessional data that has X and Y coordinate values associated with it.Before you BeginBefore you begin, you must have the Microsoft Access Driver installed on

    your machinethe driver is installed by default with your Microsoft Access.The driver is necessary for establishing an ODBC connection to the datasource.

    To check that the driver is installed on your machine, run the ODBCAdministrator:

    1. Open the Control Panel; from the Start menu select Control Panel.2. In the Control Panel, in the Classic View, select Administrative

    Tools and then Data Sources ODBC (ODBC).3. In the Data Sources ODBC Administrator dialog box, select the User

    DSN tab.4. In the list, locate and select the MS Access Database. Or, if you do

    not see this name, then under the Driver list look for Microsoft

    Access Driver (.mdb or .accdb).5. Click Configure to ensure that it is properly set up. If the driver is not

    there, then click Add to check if the Access driver is installed. You mayneed to install the Microsoft Access drivers. These are included withMicrosoft Access, Microsoft Office Professional, ODBC SDK, Visual C++,MapInfo Professional, or purchased separately.To verify if this is therequired version of this driver, select the Drivers tab in the ODBCAdministrator. Locate the MS Access Driver (.MDB or .ACCDB) andcheck that it is the latest version.

    To add a new Microsoft Access Data Source:1. Run the ODBC Administrator.2. Under the User DSN tab, click Add.3. In the Create New Data Source wizard, select MS Access Driver

    (.MDB or .ACCDB) from the list and click Finish.4. In the ODBC Microsoft Access Setup dialog box, in the Data Source

    Name box, type in a name for the data source. (This is the name thatappears in the list when you connect from MapInfo Professional.) ClickSelect.

    5. In the Select Database dialog box, select the Microsoft Accessdatabase you wish to use and then click OK. If you do not select adatabase for this data source, a prompt displays during the connectionto do so. MapInfo Professional provides a sample Microsoft Accessdatabase.

    Making a DBMS Table Mappable (In order to Geocode Table)1. Add two numeric columns in the Table on the database server to hold the Xcoordinates and one for the Y coordinates.2. In MapInfo, choose Table >Maintenance > Make DBMS Table Mappable. Select thetable you want to make mappable.3.The Make Table Mappable dialog will appear. Choose XY Coordinates for the Index

    Type, X column for the X Coordinate and the Y column for the Y Coordinate.

  • 7/28/2019 Registering Map

    25/41

    If your MapCatalog has the capability to support styles, you can set up the table touse per row styles. Simply select the Per Row Styles check box and choose thecolumn that you want to obtain the style attributes. The only column types availablefor use with the Per Row Styles option are character or varchar columns.

    This option is only available when the MapCatalog has the structure to support styles.It must contain the columns RENDITIONTYPE, RENDITIONCOLUMN, andRENDITIONTABLE.

    4. Next, Open the remote table in MapInfo using File >Open DBMS Table. You will geta blank mapper. Then use Table > Geocode to geocode your records.5. Once you have completed geocoding use File >Save Table to save the changes tothe remote database. Answer Yes to Refreshing the table in order to see your

    points.

    Downloading DBMS Tables

  • 7/28/2019 Registering Map

    26/41

    Downloading a DBMS table involves the following steps: Connect to a database. Select which table to download from the database. Select which columns to download from the table. Select which rows to download from the table. Save the table locally to MapInfo as a linked table.

    Opening a DBMS TableStep 1, Choosing a TableAfter a connection is established, the Open DBMS Table wizard will be invoked. TheOpen DBMS Table Wizard builds an SQL query in the DBMS dialect to be executed onthe remote database. The Wizard provides an easy way to execute an SQL querywithout having to know any SQL. For those users familiar with SQL using DBMSstandards, an Expert dialog is available to build your own SQL query.

    The Wizard displays a series of four dialogs that will assist you in opening a DBMStable for downloading into a MapInfo linked table. Each dialog will have an identicalset of buttons along its bottom edge.

    The dialog sequence that displays depends on what DBMS support components youhave installed

    Open DBMS Table Dialog . Step 1 of 4

  • 7/28/2019 Registering Map

    27/41

    1. Choose a Connection Type from the Connection Type list. The connection typesthat appear in the list depend on what types of DBMS Support you have installed:MapInfo ODBC, Oracle8i, or both.2.You can choose a connection from the Connection list if any are open, or you canclick New to make a new connection. If there are multiple connections open, the last-used connection displays in the Connection type box. To change connections, choosea connection from the pull-down list. A list of the tables for that database connection

    displays in the Table group. To make a new connection, click the New button. If yourconnection type is MapInfo ODBC, the Select Data Source dialog displays. If yourconnection type is Oracle8i, the MapInfo Oracle Connect dialog displays.MapInfo ODBC

  • 7/28/2019 Registering Map

    28/41

    File Data Source Displays all file DSNs (data source names) and subdirectories containedwithin the directory displayed in the Look In box. Doubleclicking a DSN connects to the datasource.Look In Displays the current directory for which the subdirectories and file DSNs are displayed

    in the window below. Clicking the down arrow to the right of the text box displays the entiredirectory structure.DSN Name Displays the file DSN name selected in the File Data Sources list, oryou can enter a new file DSN name. New Adds a new file data source. If you click this button,the Create NewData Source dialog box appears with a list of drivers. Choose the driver for which you areadding a file DSN. After you click Next, you may specify the keywords for the file DSN. See thesection CreatingNew Data Sources, above, for instructions on creating a new data source.OKCloses the Administrator dialog box, and connects to the file data source that is highlightedin the list or entered in the DSN Name text box. You do not have to click OK to accept changesto the File Data Sources list. Changes to the list are accepted once the OK button in the DataSource Setup dialog box has been clicked.Cancel Closes the Administrator dialog box without connecting to the file data source.

    Changes to the File Data Sources list are not rejected if the Cancel button is clicked.

  • 7/28/2019 Registering Map

    29/41

    Enter the server name, user name, and password, and then click OK. When you havechosen or created a connection a list of tables for that connection will display in the

    Tables field. The directory path of the database connection or the database namealso displays. This field is not present for data sources that do not provide thisinformation.3. Click the name of the table you want to download to highlight it.4. As an optional step, use the Filter button to select which types of tables to list. Thedefault shows Tables, View, and Synonyms, and hides System tables.5. Click Next. For data sources that make use of owners, such as Oracle, the Ownerfield is activated. It allows you to list tables owned by different users.

    Step 2, Choosing ColumnsThe Open DBMS Table Step 2 of 4 dialog is the second dialog of the Open DBMSTable wizard. When you selected a table in the first dialog, in effect, you selected allthe rows and columns in that table. In this dialog you will be selecting the columnsthat contain the data to be downloaded. By default, all columns will be downloaded

    Open DBMS Table Dialog . Step 2 of 4

  • 7/28/2019 Registering Map

    30/41

    1. Move the columns you want from the table from the Available group to theSelected group using the arrow buttons. The single arrow keys move one selected

    column at a time. The double arrow buttons move all the columns at once from onelist to the other.2. Change the order of the selected columns in the Selected list using the Up andDown buttons. Click on a column to highlight it, and then move it up or down in thelist by clicking the appropriate button.3. If you wish, click the Expert button to create a SQL query that selects data from thetable.4. Click Next.

    If the table is mappable, the Available list also displays an additional column calledOBJECT, which refers to the spatial column. You can select it to download pointobjects from the table. If the table is spatialized, it will download lines and polygonsdepending on what the table contains. At the initial display of this dialog, an asterisk

    (*) appears in the Selected list. If you leave the asterisk, all the columns will beselected from the table.

    Step 3, Choosing RowsThe Open DBMS Table Step 3 of 4 dialog is the third dialog of the Open DBMS Tablewizard. The third dialog asks you to restrict the downloading of data from rows thatmatch the criteria you specify. (This is the same as specifying the WHERE clause in aSQL query.) If you select no filtering criteria in this dialog, all rows will be selected.

    Open DBMS Table Dialog . Step 3 of 4

  • 7/28/2019 Registering Map

    31/41

    1. In the Column list, choose the column(s) from which you want to filter rows. If youare filtering rows for one column, select a column, operator, and value. If filteringrows on more than one column, select a column from the next drop down list. Thiswill also activate the next row of fields for data entry.2. Choose how you would like to filter the rows using the Operator and Value boxes.

    These are explained below.3.You can also click the Expert button to bypass the wizard and write a SQL query toselect the rows from the table.4. Click Next when you have finished filtering the rows. The Operator list boxescontain all supported operator symbols for their corresponding selected column. Thelist of operators will vary depending on the type of the selected column. For example,

    the operators , and = (among others) will be available for numeric columns, butobject columns will have only the operator WITHIN.

    The type of the Value control also varies depending on the column type. For objectcolumns, this control will be a list box containing the values CURRENT_MAPPER andSELECTION.

    Step 4, Saving the Table LocallyOnce the data to be downloaded has been determined, the user must determine thepath name for the local table created in the fourth dialog:

    Open DBMS Table Dialog . Step 4 of 4

  • 7/28/2019 Registering Map

    32/41

    1. Specify the directory where the table is to be saved. Directories and files appear inthe window below the Save in box.2. Specify the filename and type for the table. The name must not be the name of a

    table that is already open in MapInfo.3. Choose the view in which you want the table data displayed:Automatic: MapInfo selects the appropriate display for the table: mapper, add tomapper, or browser.Browser: Open table in a Browse window.Current Mapper: Add table to current map window.New Mapper: Display table in a map window.No View: Open table; do not display data.4. Check the Download data (Linked Table) box to download the data and make it intoa linked table. Clear the box for live access. (See Creating Live Remote DBMS Access,below.)5. For live access, the Cache check box is displayed. Check the Cache box to keepattributes and objects that have been read in memory. If you perform an operation

    such as zooming in they do not need to be fetched from the database (since MapInfolooks in memory for a record you may not see the latest updates). If cache is on,another users updates may not appear until the check box, all data will be fetchedfrom the database whenever it is needed. It will give the most up to date data but itwill be less efficient because it must be re-read from a database. (See Creating LiveRemote DBMS Access, below.)6. Click Finish to save the data to the table you specified.

    When Is a DBMS Table Read-Only?The DBMS table can be read-only under any of the following circumstances:

  • 7/28/2019 Registering Map

    33/41

    The data downloaded from the server database is not editable. There are no editable columns in the data downloaded from the server database. The data downloaded from the server database does not contain a primary index.If the data downloaded from the server database does not contain a primary index,you can create one. Then the table will become editable. The next section explainshow to create a primary index on a remote table from MapInfo.

    Labeling Your MapThe labeling features in MapInfo Professionalmake it easier for you to display, edit,and save labels. You can specify whether to display labels automatically when youdisplay the map or display the map without labels. You can edit automatic labels, usethe customizing options to make your labels unique, and createindividual labels with the Label tool. Text enhancements such as haloing, and morepositioning options enable you to get the precise look you want for your labels.

    Label ContentLabeling with a Column Options dialog. You can label an object with any columnfrom its associated table.

    Labeling with Expressions Select Expression from the drop-down list in the Label

    Options dialog. Create the expression in the Expression dialog. You can type theexpression directly or use the drop-down lists to create it.

  • 7/28/2019 Registering Map

    34/41

    What Is a Selection?While MapInfo allows you to attach data to objects on a map, its true analytical poweris its ability to group and organize data. Once your data is broken down into logicalgroups, you can analyze it based on one or more variables.

    categories, based on one or more variables: Put all the apples into one group

    Put all the citrus fruit into one group (oranges, lemons, grapefruit) Put all the fruit that begins with a vowel into one group (oranges, apples, apricots)

    There are many different ways that you could group the fruit. Some fruit would fallinto more than one category (oranges are citrus fruit and also begin with a vowel).

    You could also use more than one variable to group your fruit put all the citrus fruitthat begins with a vowel into one group. You could also group the fruit according tothe countries that grow them select all fruit that is indigenous to South America.Finally, you could group the fruit randomly put apples and lemons in one group

    and cherries and oranges in a second group. MapInfo can create similar groups withyour data. MapInfo refers to these groups as selections. A selection is a subset ofdata that has been grouped together based on one or more variables. For example,you have a table of customer records. You could create a subset of all customers wholive within a 50 mile radius of Prague. Or, you could create a subset of all customers

    who purchased over $1000 of merchandise. Or, you could create asubset of all customers whose last name begins with the letter B. The statementsabove used to create these subsets are known as queries.A query is just another word for a question which of my customers spent morethan $1,000? Which of my customers lives within 50 miles of Prague? As with thefruit example, there are many different ways to group your data. Some data recordswill obviously fall into more than one category. You could also use more than onevariable to group your data. Which of my customers lives within 50 miles of Pragueand purchased over $1000 of merchandise?

  • 7/28/2019 Registering Map

    35/41

    Characteristics of SelectionsSelections are temporary tables. When you make a selection, MapInfo creates thistemporary table to store the records youve selected. You can perform many of thetasks with a selection table that you can perform with a permanent (base) table suchas: View it in a Browser, a Map window (if it has graphic objects), a Graph or a Layout

    window.

    Cut and copy it into the clipboard and paste it into another table, or even intoanother application. Use it to edit a table. If you want to edit only certain records in a table, you can getthose records into a selection and then edit that selection. Make a further selection from it.

    To convert selections into permanent tables, use File > Save Copy As. Once youvesaved the temporary selection table as a permanent table, you can treat the newtable like any other table. Selection tables are totally dependent on the table fromwhich they were created. If you close a base table, all associated selection tables aredeleted.

    Making SelectionsMapInfo gives you a number of commands and tools for making selections. They fall

    into two categories: Selecting from the screen: Select tool, Radius Select tool, Boundary Select tool,Marquee Select tool, Select All command. To select records with the tools, click on orencircle the associated graphic objects. To select records from a layer at the sametime, choose Query > Select All. Selecting with queries: Select, SQL Select. When you select records with either ofthese methods, you create a logical expression that MapInfo uses to select therecords. For example, the expression SALES > 20000 means that MapInfo will selectonly those records with sales higher than $20,000. (Select and SQLSelect will be explained in the next chapter).

    Selecting from the ScreenTo select objects from the screen, the layer that contains the objects must beSelectable. To make a layer Selectable, choose the Layer Control command from theMap menu and check the Selectable box for that layer. When you select map objectsin a Selectable layer, MapInfo highlights the objects using the settings defined in theHighlight Control section of the Preferences dialog (Options menu). When you selectmap objects in an Editable layer, MapInfo places edit handles (little squares) aroundthe extents of the object you selected.

    Selecting ToolsMapInfo includes several tools on the Main Toolbar to allow you to choose records forfurther viewing and analysis, including:Selection types

  • 7/28/2019 Registering Map

    36/41

    Select tool Radius Select tool Marquee Select tool Polygon Select tool Boundary Select tool Invert Selection tool

    To select an object:1. Make the layer that you want to select objects from Selectable (Map > LayerControl).2. Choose the Select button from the Main Toolbar.3. Click on an object in the Map window. If that objects layer is Selectable, MapInfohighlights the object. If the layer is Editable, MapInfo puts edit handles around theextents of the object. If the layer is neither Editable nor Selectable, MapInfo does notallow you to select the object.4. Choose Window > New Browser Window to display selected records in a Browser.Choose Selection from the list of tables. MapInfo creates a Browser of the newtemporary table. To select records from the Browser, simply click on each record withthe Select tool. To select multiple objects individually, click on the first object toselect it. Hold down the Shift key and click on another object. MapInfo selects thatobject, too. If you select a second object without holding down the Shift key, MapInfounselects the first objectand selects the second object. When selecting a point object, you generally want toposition the Select tool in the center of the symbol. However, some symbols have ahot spot that you must hit in order to select it. For example, the hot spot on the golfflag symbol is the base of the pole.

    Selecting Using QueriesA queryis just another word for a question

    In the case ofSelect, you have a table of information and you ask MapInfo to select asubset of it. For example, Which of my customers spent more than $20,000? Which of my customers live in Vermont? In the case ofSQL Select, you have atable(s) of information and you ask MapInfo to:

  • 7/28/2019 Registering Map

    37/41

    Derive new columns columns that calculate new values based on the contents ofyour existing columns. Aggregate your data so that you see only a listing of subtotals instead of seeingyour entire table. Combine two or more tables into one results table. Show only the columns and rows that interest you.

    What Is Select?Selectallows you to query a table. It allows you to select records and objects from atable according to their attributes. You can use it to highlight objects in a Mapwindow or a Browser that meet certain criteria. You can also create a results tablethat you can browse, map, or graph like any other table.For instance, by formulating queries with Select, you can ask MapInfo to: Show only ZIP Code regions where the average household income is above$65,000. Show only ZIP Code regions where the median age is 42. Show only the ZIP Code regions where the household income is above $65,000 andthe median age is 42. Show only records for all orders received in July or September. Show cities of over 100,000 people in Texas, California and Florida. When you are

    working in a Browser, MapInfo highlights the records meeting the criteria of thequery. When you are working in a Map window, the graphic objects of the chosenrecords are highlighted. When you are working in both windows, the objects in bothare highlighted. In all cases, MapInfo automatically creates a working table calledSelection that contains the results of the query. You can browse, map, or graph thistable like any other table. The table can also be saved as a separate table with SaveCopy As.

    Creating ExpressionsTo perform a Select query, you must create an expression. An expression is a logicalstatement that is used to ask your question. For example, you have a table ofapartments for rent. If you want to create a temporary table of all apartments thatcost less than $800 a month, you could use the expression: RENT < 800 where RENT is the column that contains the per month rent rate. The

    < sign means less than. MapInfo searches the apartment table for all records thatsatisfy this condition and puts those records in a temporary table that you can map,browse, graph or carry out additional queries.

    You can also perform mathematical operations on your data. For example, you wantto create a temporary table of all apartments that have a total cost of less than $800.

    Total cost is equal to the sum of the rent and the monthly utilities. You could use theexpression: RENT + UTILITIES < 800 You are telling MapInfo to add the number in the RENTcolumn and the number in the UTILITIES column and then compare that number to800. There are two ways of creating an expression. The first method is to type in theexpression directly. When you are creating very simple expressions, this method isusually faster. The second method is to press the Assist button in the Select dialog

    and build your expression using the pop ups in the Expression dialog. This method isparticularly useful when you are just learning how to build expressions or when youare building very complex expressions.

    The Expression dialog gives you three pop ups that you can use to build yourexpression: columns, operators, and functions. Each is discussed below.

    ColumnsThis pop up lists every column in the table from which you are selecting. If the tablecontains derived columns from previous queries, those columns will also be listed.

    Operators

  • 7/28/2019 Registering Map

    38/41

    This pop up contains mathematical and logical operation symbols. The mathematicaloperators in this pop up include addition, subtraction, multiplication, division, greaterthan, less than, and equal signs. You can use these symbols to create mathematicalformulas. For example, from your table of sales representatives you want to selectthose sales representatives who, on the average, gross more than $2000 per month.Gross sales is computed by adding together sales and commission.

    You have two columns in your table: TOTAL_SALES, which is total sales for the yearfor each representative and COMMISSION, which is total commission for the year foreach representative. You could build the following expression: (TOTAL_SALES + COMMISSION) / 12 < 2000

    This expression tells MapInfo to add the number in the TOTAL_SALES column with thenumber in the COMMISSION column. However, this gives you gross sales for the year.We want average gross sales for the month. Therefore, we divide the sum by 12,which will give us a monthly average. We then compare that figure with 2000. TheOperators pop up also includes logical operators conjunctions AND, NOT, OR andLIKE. The LIKE operator can be used with two wildcard characters: % and _. The %character matches zero or more characters. The _ character matches only onecharacter.

    Functions

    This pop up contains mathematical functions that take one or more parameters andreturn a value. You use functions to perform basic mathematical functions on thedata in that column. For example: abs() takes the absolute value of the numbers in the specified column.For example, a meteorologist wants to select all days where the temperature in hercity was more than 10 degrees warmer or cooler than the national average. She hasa column in her table, AVG_DIFF, that contains the difference between the nationalaverage and city average. She could create the following expression: AVG_DIFF < 10 Or AVG_DIFF > 10

    This expression tells MapInfo to select all records that have an average differenceless than -10 or greater than +10. However, she could also create the followingexpression: abs(AVG_DIFF) > 10

    This expression tells MapInfo to select all records where the absolute value of theaverage difference is greater than ten.The Functions pop up has many other functions, including area, perimeter, sin, cos,and date-related functions. For a complete list of functions, see Expressions andAppendix E, Creating Expressions, in the MapInfo Reference.

    Steps Using SelectIn general the process for selecting objects using Select is:1. Choose Select from the Query menu.2. Specify the table from which you want to select records.3. Create a logical expression that will be used to select records.4. Choose a column on which to have the query sorted (optional). By default, thequery is unsorted.5.To see a list of the records you have selected, check the Browse results box.

    6. MapInfo creates a Browser of the new selection table.MapInfo names the table Query1. It will name the next temporary selection tableQuery2. You can override MapInfos default name and give the selection a descriptivename. Type the new name into the Store Results in Table box. The table can also besaved as a separate table with Save Copy As.Make sure mapinfo/ data is the directory that displays in the Directories list box. If itis not, you may need to double click on the data directory in the directories list box.

    Example: SelectingMapInfo makes finding information and locations easy. You can use the Select featureto create subset databases of your information. As an example, we will use the

  • 7/28/2019 Registering Map

    39/41

    sample world table to select particular countries with a literacy rate greater than90%. Open the world.tab table, and choose Query > Select to display the Selectdialog.

    Do the following:1. Complete the Select dialog:From the Select records from table drop-down list, choose World. Click on Assist. TheExpression dialog displays

    2. Complete the Expression dialog as shown in the following figure: From the Columnsdrop-down list, choose Literacy. From the Operators drop-down list, choose > (thegreater than sign). Type 90. Click Verify to confirm the syntax of your expression.Click OK to close the Verify dialog. Click OK to close the Expression dialog. The Selectdialog re-displays. Make sure the Check the Browse results option is checked.3. Click OK to select the countries. MapInfo creates a Browser that contains theselections. Notice that the

    selections display in both the World map and Browser.

  • 7/28/2019 Registering Map

    40/41

    LegendsCartographic Legends: Cartographic legends display cartographic data for a maplayer. A legend is created for each layer in your Map window that you choose toinclude in the legend1. Choose Map > Create Legend. The Create Legend Step 1 of 2 dialog displays.2. Select the layers you want to use in the legend and click Next. The Create Legend Step 2 of 2 dialog displays.3. Specify the legend properties and legend frame elements and click Finish. Yourlegend displays on the screen.

    Theme LegendsTheme legends are created automatically when you create a thematic map. Theyprovide a key of the colors, symbols, and styles used in the map

    Browsing a TableThere are times when viewing the tabular data in a table is necessary. In MapInfo,this is called browsing the table.

    To browse a table:1. Choose Window > New Browser Window.2. Choose the table you wish to browse and click OK The Browser shows the fields ofthe data table (column headings) and the records of data (rows).

  • 7/28/2019 Registering Map

    41/41