Sie sind auf Seite 1von 26

51

4
Getting data
files into (and
out of) MapInfo

AAAA
AAAAAAAA
AAAA AAA
AAA
AAAA
AAAA
AAAA
AAAA AAA
AAAAAAA
AAAA
AAAA
AAAA
AAAA
AAAA
AAAA
AAAA
4
AAAA
AAAA
AAAA
AAAA
AAAA
AAAA
AAA
AAA
AAA
AAA
AAA
AAA
AAA
AAAAAAAA AAA
AAAAAAAAAAA
Understanding MapInfo: A Structured Guide
Ian Johnson 1996. Archaeology (P&H), University of Sydney
52

EXISTING DATA

This chapter is primarily concerned with data which already exist in a database, spreadsheet,
CAD package, desktop mapping package or GIS. You can safely skip it if your data is already
in MapInfo format or you will be entering data from scratch.

Direct entry of tabular data through a Browser or the Info tool, and drawing of map objects
with the mouse or digitiser, are covered in chapters 6, 7 and 9. Exporting maps as bitmaps or
vector images will be covered in chapter 10.

There are several programs available on the GISNet MapInfo FTP site (Appendix I) for
converting data from other programs or file formats to MapInfo. These include tools for
Arc/Info, MicroStation, GRASS, Idrisi, SAS, DLG and Tiger94.

TABULAR-DATA-ONLY FILES

Data in a conventional database may relate to objects (in the broadest sense) such as plants,
animals, buildings or incidents, but will not generally carry graphical or map representations of
those objects. These data are referred to as tabular data, as contrasted with map data, which
are the outlines or symbols used to represent objects on a map (see chapter 2).

Often these data will consist of point objects, i.e. objects which have no substantial size or
shape in relation to the map as a whole - they are merely represented by a point (or symbol) at
some location specified by an X,Y coordinate pair. Typical point data will be sampling
locations, plant observations, species sightings, incidents, archaeological sites, artefacts, or
buildings (although each of these may be treated as polygon data under other circumstances).

Point objects can be simply created from their geographic location using the Table>Create
Points command (page 64) so they are easily imported as a file containing tabular data alone.
Line and area map objects are more problematical, requiring creation of an outline through
drawing or digitising, or through import from an external source. Import of line and area objects
therefore generally requires data in a tabular + graphical data format, such as AutoCAD
Drawing Exchange Format or MapInfo Interchange Format (pages 58 - 63), or the joining of
tabular data with existing map objects (page 175).

The first part of this chapter deals with files containing tabular data only.

Opening tabular data files


MapInfo's File>Open Table (Ctrl-O) command allows MapInfo to open tabular data files in h
several common formats and turn them into MapInfo tables (the original file is not affected by
AAA
AAA AAAA
AAAA AAA
AAA this process - MapInfo simply creates a .TAB file to tell it how to access the data in the original
AAA
AAA
AAAA
AAAA AAA
AAA
AAA
AAA
AAA
AAA
AAA
AAA
AAA
4AAAAAAA
AAAA
AAAA
AAAA
AAAA
AAAA
AAAA
AAA
AAA
AAA
AAA
AAA
AAA
file). Select the format using the File Format pull-down list on the Open Table dialogue box.

AAA AAAA AAA


AAAAAAAAAA

Getting data files into (and out of) MapInfo


53

The formats currently supported are:

DBase (.DBF)
Delimited ASCII (.TXT)
Lotus 1-2-3 spreadsheet (*.WK1/S/3/4)1
Microsoft Excel spreadsheet (*.XLS)

Tables opened in this way will contain tabular data only, since these formats do not allow for
map objects. Map objects can be added with the Table>Create Points command (page 64) or
by joining the table of tabular data with another table containing map objects (page 175).

The File>Open Table command will also open raster (bitmap) images - pages 11, 219. Once a
raster file has been opened once it will appear as a MapInfo format table on future Open Table
dialogues.

ODBC tables
MapInfo can also access data in the formats listed above, and in a number of other common
formats including SQL server databases, through ODBC (Open Database Committee) drivers
using File>Open ODBC Table. A discussion of ODBC drivers is beyond the scope of this
volume: if you already have data you want to access in this way, consult the ODBC sections of
MapInfo Reference (pages 243 - 256, 317, 423) and MapInfo User's Guide (chapter 19 and
Appendix D), or your network administrator.

DBase files
MapInfo will pick up the field names and types automatically from DBase files. Transfer
between MapInfo and DBase format is two-way - MapInfo can modify both the file structure
and the data in DBF files and recognises both structure and data modifications made by other
programs.2 MapInfo's own internal tabular data file format (.DAT) is simply a modified DBase
DBF file (allowing additional field types).

Many database management systems can work directly with files in DBase DBF format,
although functionality is generally restricted compared with the system's native format (e.g.
Paradox can create and use DBF files but is restricted to DBase's limited range of field types). It
may however be possible to program the database system to automatically transfer the data
required by MapInfo into a DBase file on a regular, even continuously updated, basis (but see
following paragraph).

When MapInfo accesses a DBase table, it locks not just the record it is modifying but the entire
table. Simultaneous updating by MapInfo and a database management system is therefore not
possible. If one or more users require simultaneous access to the same tabular database using
both MapInfo and a database management system, or if the database is frequently updated and

1 MapInfo only supports the older Lotus formats (Lotus 1-2-3 releases 1 - 4) with extensions WK1, WKS, WK3 and WK4
and Excel up to the current version at time of release. You may have to save newer format files in a format compatible
with an older version to allow MapInfo to access the file. MapInfo may also have problems with multiple worksheets -
data should be restricted to the first worksheet.

2 AAAA
AAAAAAAA
AAAA AAA
AAA
Both programs should recognise if the tabular data has been modified by the other program and should rebuild their AAAA
AAAA
AAAA
AAAA AAA
AAAAAAA
index files accordingly. MapInfo seems to do this reliably. This does not always happen the other way round, requiring
manual index rebuilds in the database program when tabular data has been modified in MapInfo. This problem may be
specific to particular DBase or DBase-compatible implementations.
AAAA
AAAA
AAAA
AAAA
AAAA
AAAA
AAAA
4
AAAA
AAAA
AAAA
AAAA
AAAA
AAAA
AAA
AAA
AAA
AAA
AAA
AAA
AAA
AAAAAAAA AAA
AAAAAAAAAAA

Getting data files into (and out of) MapInfo


54

you need to be able to display the latest data, you should use the ODBC table function of
MapInfo to access the data directly.

ODBC also gives MapInfo direct access to data in an SQL server application, allowing
retrieval, insertion, update and deletion of records from any server database supporting the
ODBC standard. The server application and MapInfo's ODBC table function will take care of
managing record locking and other functions required to handle multiple users and maintain
integrity of the data.

Spreadsheet and ASCII delimited files


Transfers between MapInfo and spreadsheet or ASCII delimited formats are strictly one-way, ?
data source to MapInfo. Neither the structure nor the data in a spreadsheet or ASCII delimited
file is modifiable from within MapInfo.

If the structure of a spreadsheet or ASCII delimited file is changed by another program, !


MapInfo may lose track of the data. The data values can, however, be changed by another
program, and the updated data will be used by MapInfo.

Spreadsheet files
For spreadsheet files, MapInfo will pick up an entire worksheet or a defined block of cells.
MapInfo will also read the field (column) names from the row preceding the defined block if
the Use Row Above Selected Range for Column Titles box is checked:

MapInfo will automatically select the range of cells in the full worksheet, as shown by Current
Value above. Pull down the list under Named Range to choose other worksheets within the
spreadsheet file opened (if any). To select data from a specified range, select Other... from the
pull-down list under Named Range and type in the cell range in the following dialogue:

MapInfo determines the field type for each column in the spreadsheet by looking at the values ?
in the column. If any value is non-numeric, it will set the column to a character field type.
AAA
AAA AAAA
AAAA AAA
AAA
AAA
AAA
AAAA
AAAA AAA
AAA
AAA
AAA
AAA
AAA
AAA
AAA
AAA
4AAAAAAA
AAAA
AAAA
AAAA
AAAA
AAAA
AAAA
AAA
AAA
AAA
AAA
AAA
AAA
Field widths are determined from the column width set in the spreadsheet. If data in a column
exceed this width, the data will be truncated.
!
AAA AAAA AAA
AAAAAAAAAA

Getting data files into (and out of) MapInfo


55

h You will be well advised to save your spreadsheet files as a MapInfo native format file, using
File>Save Copy As, to improve access speed and allow modifications to the file (e.g. addition
of columns to hold calculated fields). See notes on pages 55 - 56.

There are some problems with opening .WK4 files with multiple worksheets and complex
formatting, which may result in garbage. It is best to keep the data simple as you expect to see
it in the MapInfo table.

ASCII delimited files


If your data is stored in a database or spreadsheet other than those supported directly or through
DBase files or ODBC drivers, the software can almost certainly export ASCII delimited files,
which MapInfo can open.

h One advantage of transferring data from a database system to MapInfo via a delimited file is
that the database system can be programmed, through a report, to combine a complex multi-
table structure into a single file. This file may be easier for the MapInfo end-user to understand
than the multi-table structure, and can result in faster retrievals.

The main disadvantage of transferring data via an ASCII delimited file is that data transfer is
one-way only, from the database to MapInfo. MapInfo cannot update an ASCII delimited file
(and even if it could, there could be problems getting the data back into the original database).

If you are setting up a regular transfer of data from a frequently updated database or spreadsheet
to MapInfo and require a set of standard symbols to represent, for example site type in a site
register database, you may wish to use the VECTRANS or COMTRANS programs developed by
the Sydney University Archaeological Computing Laboratory (Appendix I).

It is very hard to work with tabular data without proper field names. For ASCII delimited files,
the field names will be Col_1, Col_2, Col_3 etc. unless you enter the field names into the first
line of the file, separated by the same delimiting character as the rest of the file, and check the

ASCII file example

ID#,Length,Width,Material
1,56.5,12,3,3
2,34.7,14.3,2
3,43.6,13.5,3
4,26.3,10.3,2
5,37.9,15.4,3
6,65.2,23.1,1
7,45.3,18.9,1
8,56.3,21.2,2

entry Use first line for column titles on the import dialogue box, as illustrated below:

? When you hit OK on this dialogue box, there will be a certain delay (during which an hourglass
symbol is displayed) while MapInfo reads your file and works out the field types, field widths
and other information. This delay can be up to a few minutes for very large files.

Important
AAAA
AAAAAAAA
AAAA AAA
AAA
AAAA
AAAA
AAAA
AAAA AAA
AAAAAAA
h Before you go any further, use File>Save Copy As to save your data as a
MapInfo native format file (you will need to use a different table name from the
AAAA
AAAA
AAAA
AAAA
AAAA
AAAA
AAAA
4
AAAA
AAAA
AAAA
AAAA
AAAA
AAAA
AAA
AAA
AAA
AAA
AAA
AAA
AAA
AAAAAAAA AAA
AAAAAAAAAAA

Getting data files into (and out of) MapInfo


56

name of the file you opened). This copy, not the file you opened, is the one you
will use in MapInfo.

The reasons:

1. MapInfo will happily access your delimited ASCII or spreadsheet file !


directly, but it is appallingly slow. When saved in MapInfo format,
operations such as thematic mapping can be as much as 10 - 20 times as
fast;
2. Once saved in MapInfo format, the file can be modified: this is not
possible with an ASCII delimited data file or spreadsheet file, which is
obligatorily read-only. Read-only tables are often a nuisance in
exploratory applications, because you can't modify field types or add
fields to hold calculated data.

Preparing ASCII delimited data

Write a comma or tab delimited file from your spreadsheet or database. In most cases it is best
to set up and save an appropriate output report or macro which automates the process, so that
you can easily transfer the data again when the database is updated. Give the file a .TXT
extension, as this is MapInfo's default extension for ASCII delimited files.

The output format should write only the variables you think you will need in MapInfo. In h
particular, avoid long text descriptions (i.e. notes). MapInfo will recognise short character
values (e.g. abbreviations) as unique values for thematic mapping and other operations, but
notes will only clutter up the MapInfo data files, making them very much larger and slowing
down retrievals. Character field width is set to hold the longest value found, so a single
comment along the lines of 'Not quite sure if this is bone or wood' can turn a 5 character
abbreviation field into a 38 character field width - the unused length is stored for every record.

MapInfo will set fields to Character if any non-numeric character is found in the field, even if !
there is just one in many thousands of records, so it is important to ensure that numeric fields
contain only numeric values (e.g. by using a database system and setting the field to a numeric-
only type).

Field names

If possible, include instructions in your output format or macro to add a line at the beginning of h
the file containing the names of the fields/variables exported. If this line has not been included,
use a text editor or wordprocessor to add it to the file before importing the data into MapInfo. If
editing with a wordprocessor such as Word for Windows, make sure you Save As a straight
ASCII file - Text-only or ASCII text. MapInfo will not be able to read the file correctly if it
contains the wordprocessor's own special formatting instructions.

AAA
AAA AAAA
AAAA AAA
AAA
AAA
AAA
AAAA
AAAA AAA
AAA
AAA
AAA
AAA
AAA
AAA
AAA
AAA
4AAAAAAA
AAAA
AAAA
AAAA
AAAA
AAAA
AAAA
AAA
AAA
AAA
AAA
AAA
AAA
AAA AAAA AAA
AAAAAAAAAA

Getting data files into (and out of) MapInfo


57

Map object coordinates


h For point objects the tabular data should contain two numeric fields which can be interpreted as
X and Y coordinates (or longitude and latitude) of the objects in the database.

X and Y coordinates need not necessarily be precise coordinates - they can be, for example, the
coordinates of the centre of the grid square containing the object. If some objects are precisely
located, while others are located only to a grid square, you should generally proceed as follows:

1. for precisely located objects, X and Y contain the actual coordinates;


2. for grid-square provenanced objects, X and Y contain the centre/centroid of
the square (or other area);3
3. for non- or very poorly provenanced objects, leave blank.

A separate field should identify the accuracy of the positional information - either by recording
an error figure - e.g. 0 for precisely located material, 50 for 50 cm squares, 100 for metre
squares etc.; or as a code, such as 1=precise, 2=50cm, 3=1 metre square etc. This field will
prove invaluable as a selection mechanism when it comes to plotting shaded density maps or
maps of point location. Similar precision measures are generally required for sites and
monuments registers, or specimen recordings, where older records will often be quite imprecise
while more recent ones will be much more accurate.

AAAA
AAAAAAAA
AAAA AAA
AAA
AAAA
AAAA
AAAA
AAAA AAA
AAAAAAA
3 For squares recorded by the bottom-left or southwest corner, the centre can be calculated by adding half the square size
to both X & Y.
AAAA
AAAA
AAAA
AAAA
AAAA
AAAA
AAAA
4
AAAA
AAAA
AAAA
AAAA
AAAA
AAAA
AAA
AAA
AAA
AAA
AAA
AAA
AAA
AAAAAAAA AAA
AAAAAAAAAAA

Getting data files into (and out of) MapInfo


58

TABULAR-AND-MAP-DATA FILES

MapInfo can import both vector map data and tabular data from AutoCAD DXF files or
MapInfo's own MIF/MID format files using Table>Import from the main menu:

Select the appropriate file type (MapInfo Interchange or AutoCAD DXF) from the Import
Format pull-down.

MapInfo Interchange Format (MIF/MID)


MIF/MID files are ASCII text files which provide a very useful way of getting the data in and
out of tables, and allow modification of the data using a wordprocessor or custom program
before it is reloaded into MapInfo. The format of these files is fairly straightforward and
defined in detail in Appendix A of MapInfo Reference. An example is shown on the following
page.

The MIF file contains data on map projection and a list of the fields in the tabular data,
followed by the coordinate data and style defining the map objects. The MID file contains
tabular data for the objects in the MIF file, generally in a comma delimited format. The records
in the MID file are matched one-to-one with the objects in the MIF file in the order they occur,
so it is essential that the order of the objects/records in the two files is identical.

Numerous programs are available for conversion of proprietary CAD formats and data
exchange formats developed by other software developers or government agencies to MapInfo.
Some of these will read the native format of the source package and write MapInfo MIF/MID
files. MapInfo MIF/MID format is also increasingly used as a data exchange format. For
example, the Australian federal mapping authority, AUSLIG, will supply digital map data
directly in MIF/MID files. See Appendix I for a partial list of sources.

Data from external sources can often be turned into MIF/MID format with a little judicious h
editing and/or a wordprocessor macro or simple filter program. If editing with a wordprocessor
such as Word for Windows, make sure you Save As a straight ASCII file - text-only or ASCII
text. MapInfo will not be able to read it if it contains the wordprocessor's own special
AAA
AAA AAAA
AAAA AAA
AAA formatting instructions.
AAA
AAA
AAAA
AAAA AAA
AAA
AAA
AAA
AAA
AAA
AAA
AAA
AAA
4AAAAAAA
AAAA
AAAA
AAAA
AAAA
AAAA
AAAA
AAA
AAA
AAA
AAA
AAA
AAA
AAA AAAA AAA
AAAAAAAAAA

Getting data files into (and out of) MapInfo


59

? If MapInfo cannot understand something in the MIF file, it will sometimes plough on to the end
of the file before reporting an error. If an error message makes no sense in the context of the
line number given, look for an error in the header records preceding DATA.

Example MIF and MID files

MIF (Header info & map objects) MID (Tabular data)


Version 300 GENERAL 2328,2.3,1,15,"A-STRUCT","SLATE","","","","",23,770.32,"",730,369,110
Charset "WindowsLatin1" HEADERS 2329,2.3,2,15,"A-STRUCT","WOOD","","","","",21,81.31,"",887,412,130
Delimiter "," 2330,2.3,3,15,"FOOD","SHELL","","","","",1,44.25,"COC",906,122,105
Index 5 2331,2.3,4,15,"FOOD","SHELL","","","","",1,2.06,"OY",968,242,107
CoordSys NonEarth Units "cm" Bounds (0, 0) (2000, 2000) 2332,2.3,5,15,"TW","FEW","","","","PW",1,10.75,"",793,190,117
2333,2.3,6,15,"A-STRUCT","FE","","","","",1,56.75,"",950,134,105
Columns 16 FIELD 2334,2.3,7,15,"A-STRUCT","FE","","","","",1,13.82,"",920,389,112
ITEMID Smallint DEFINITIONS 2335,2.3,8,15,"A-STRUCT","CSW","","","","GL",1,94.82,"",898,243,129
UNIT Float FOR 2336,2.3,9,15,"KW","GL","OL","","","",1,55.2,"",954,232,115
A_BAG Float TABULAR 2337,2.3,10,15,"KW","GL","OL","","","",3,63.17,"",907,207,122
2338,2.3,11,15,"KW","GL","CL","","","",1,3.11,"",985,127,112
A_BOX Smallint DATA
2339,2.3,12,15,"KW","GL","CL","","","",1,3.49,"",834,467,110
FUNCTION Char(9)
2340,2.3,13,15,"KW","GL","CL","","","",1,15.14,"",838,178,104
MATERIAL Char(9)
2341,2.3,14,15,"A-NONST","GL","GR-T","","","",1,8.94,"",799,358,117
GLASSCOL Char(4)
2342,2.3,15,15,"H-HOLD","CLINK","","","","",2,6.24,"",861,152,101
BONE_AML Char(9)
2343,2.3,16,15,"A-STRUCT","MORT","","","","",4,3.89,"",817,113,133
BONE_TYP Char(9)
2344,2.3,17,15,"KW","GL","AMB","","","",1,7.89,"",969,410,120
CERAMDEC Char(9)
2345,2.3,18,15,"UN-IDFIED","FE","","","","",1,1697.9,"",965,124,121
_#ITEMS Smallint
A_WGHT Float
SHEL_TYP Char(9)
XX Smallint
YY Smallint
ZZ Smallint

Data START MAP


OBJECTS Text in BOLD UPPERCASE
Point 906 122 POINT shown on the left is
Symbol (42,16711680,6) OBJECTS annotation and does not
Point 968 242
Symbol (42,16711680,6) appear in the MIF file itself.
Blank lines have also been
Region 1 POLYGON
9 OBJECT added for clarity.
727.240504 458.648719
763.60128 482.889231
813.294304 502.281647
843.594944 488.949359
827.838592 465.920879
812.082272 427.136079
774.509504 407.743663
730.876584 413.803791
727.240504 458.648719
Pen (1,2,0)
Brush (2,16777215,16777215)
Center 785.417724 455.012655

Pline 8 POLYLINE
726.02848 333.810127 OBJECT
778.145568 341.082279
778.145568 322.901899
820.566464 327.749999
841.17088 365.322783
867.835456 332.598103
911.468352 367.746831
951.465152 348.354431
Pen (1,2,0)
GEOMETRIC
OBJECTS
Point 866.623424 471.981007
Symbol (35,12632256,12)
Rect 926.012672 439.256335 991.461952 496.221519
Pen (1,2,0)
Brush (2,16777215,16777215)
Roundrect 952.677184 366.534815 1013.2784 416.227855 29.088608
Pen (1,2,0)
Brush (2,16777215,16777215)
Ellipse 764.81328 385.927215 873.895552 453.800623
Pen (1,2,0)
Brush (2,16777215,16777215)
Arc 803.598112 402.895567 1079.93968 606.515727 180 270 AAAA
AAAAAAAA
AAAA AAA
AAA
AAAA
AAAA
AAAA
AAAA AAA
AAAAAAA
Pen (1,2,0)
Line 878.74368 499.857583 969.645504 336.234175
Pen (1,2,0)
AAAA
AAAA
AAAA
AAAA
AAAA
AAAA
AAAA
4
AAAA
AAAA
AAAA
AAAA
AAAA
AAAA
AAA
AAA
AAA
AAA
AAA
AAA
AAA
AAAAAAAA AAA
AAAAAAAAAAA

Getting data files into (and out of) MapInfo


60

Drawing Exchange Format (DXF)


Like MapInfo MIF/MID files, AutoCAD DXF files are normally ASCII text files containing
both tabular data and map objects, but they are extremely verbose (20 KBytes of MapInfo data
can expand into as much as 2 MBytes of DXF data!) and consequently not nearly as easy to
follow as the MIF/MID format, should you have to look at their content.

Data is often available from organisations such as Government departments, utility companies
and surveyors in DXF format, particularly for development-related EIS, CRM or conservation
work. The DXF import capability of MapInfo 4 is much improved on previous versions, but you
may have to fiddle around a bit before you get such data to register correctly with other map
layers.

Import of DXF files is covered in detail in MapInfo Reference pages 161 - 168. This material is
well worth reading carefully if you have trouble getting DXF data into MapInfo and registered
with other data layers. See also MapInfo User's Guide chapter 21 ("Projections and Coordinate
Systems").

Importing DXF files

DXF files can contain multiple layers of data, each containing both map objects and tabular
data (attribute data). When a DXF file is selected in the Table>Import dialogue, MapInfo will
scan the DXF file header to determine the layers present, and display them in the following
dialogue box:

You can select several DXF layers in this dialogue using standard Windows Shift-click and h
Ctrl-click multiple selection. All the layers can be imported into one MapInfo table, but it is
generally a good idea to import different layers into different tables, unless they contain very
similar data, as this provides flexibility by allowing one to switch individual layers on and off
and change object styles individually.

Checking the box Create Separate Tables causes each of the AutoCAD layers to be imported
into MapInfo as a separate table. When it is checked, the bottom left button changes from OK
to Next>>. Clicking this button displays the DXF Table Name dialogue shown on the
following page, allowing the creation of different files with different characteristics for each of
AAA AAAA AAA the DXF layers. This step is omitted if all layers are to be imported as a single table.
AAA AAAA AAA
AAA
AAA
AAAA
AAAA AAA
AAA
AAA
AAA
AAA
AAA
AAA
AAA
AAA
4AAAAAAA
AAAA
AAAA
AAAA
AAAA
AAAA
AAAA
AAA
AAA
AAA
AAA
AAA
AAA
The check box for Preserve Attribute Data causes attribute (tabular) data to be imported as
well as map objects, in other words a table of attribute data is attached to the map objects. If the
h
AAA AAAA AAA
AAAAAAAAAA

Getting data files into (and out of) MapInfo


61

box is not checked, only the map objects are imported, with a single dummy field in the tabular
data.

! Importing the map objects alone is much faster than importing both map and tabular data. If
you have large DXF files, import one or two of the layers first without attributes to check that
they are importing correctly and that the imported data registers with other data layers, before
importing all the layers with attribute data.

The check box for Preserve Blocks as Multi-Polygon Regions determines the handling of map
objects made up of multiple polygons - see discussion of DXF import in MapInfo Reference,
pages 161 - 168, for details.

? Note that MapInfo is rather picky about which particular variant of DXF it will accept. MapInfo
Version 4 is claimed to be compatible with files following the standards set by AutoCAD DXF
versions 10 through 13.

Importing as separate tables

Checking the box Create Separate Tables and clicking the Next>> button, displays the
following dialogue:

The DXF layers selected in the first dialogue are listed with the proposed file name and the
default treatment of blocks and attribute (tabular) data specified in the previous dialogue. The
treatment of individual layers can be changed by highlighting the layer and modifying the check
boxes under Affects Selected Layer.

The table name can also be changed by clicking the Change Table Name button e.g. to avoid
overwriting existing tables shown by an X in the Table Exists column. When you click OK you
will be prompted with the Import into Table dialogue for each table, giving a further chance to
change the table name.

AAAA
AAAAAAAA
AAAA AAA
AAA
AAAA
AAAA
AAAA
AAAA AAA
AAAAAAA
AAAA
AAAA
AAAA
AAAA
AAAA
AAAA
AAAA
4
AAAA
AAAA
AAAA
AAAA
AAAA
AAAA
AAA
AAA
AAA
AAA
AAA
AAA
AAA
AAAAAAAA AAA
AAAAAAAAAAA

Getting data files into (and out of) MapInfo


62

Data storing options

Pressing the Options button on the DXF Import Information dialogue, brings up the
following dialogue:

The radio buttons under Import Whole Numbers as and Import Floating-Point Numbers as
will be greyed out if there is no tabular data containing whole numbers or floating point
numbers respectively. You will normally want to leave whole numbers as integers unless you
plan to add decimal data or transform the data e.g. by converting metres to kilometres. You may
want to convert floating point numbers to decimals to obtain better display in browsers and
greater numeric accuracy (floats are only stored to 6 significant digits). The Store Handles and
Store Only Visible Objects check boxes will also be greyed out if these CAD features have not
been used in the file.

Since MapInfo has no provision for storing the elevation of nodes forming a map object,
elevation data can only be stored as a field in the tabular data. Check Store Elevation if you
want the average of the third dimension (Z) for each object to be stored in the tabular data. If
the DXF file is two dimensional, a zero value will be stored in this field.

Projection

When importing DXF files, MapInfo defaults to a Non-Earth coordinate system. If you want
the layer to have an Earth coordinate system, choose a projection with the Projection button. If
you do this, make sure that you enter the appropriate transformation coordinates in the Set
Coordinate Transformation dialogue (below).

AAA
AAA AAAA
AAAA AAA
AAA
AAA
AAA
AAAA
AAAA AAA
AAA
AAA
AAA
AAA
AAA
AAA
AAA
AAA
4AAAAAAA
AAAA
AAAA
AAAA
AAAA
AAAA
AAAA
AAA
AAA
AAA
AAA
AAA
AAA
AAA AAAA AAA
AAAAAAAAAA

Getting data files into (and out of) MapInfo


63

Coordinate transformations

Since many CAD drawings are not referenced to real-world coordinates, but use some arbitrary
plan coordinates, MapInfo provides a means of converting between the two with Set
Transformation:

! MapInfo uses the CAD coordinates for two points, together with their corresponding real-world
(MapInfo) coordinates, to work out a transformation between the two systems. Because
MapInfo works with latitude and longitude and projected coordinate systems for Earth maps,
whereas CAD systems typically work with a plane cartesian system, the transformation will not
be perfect when dealing with large areas - see the Import section of MapInfo Reference (pages
164 - 165) for a detailed discussion. Transformation is available on both import and export.

BITMAP FILES

The File>Open Table dialogue will also open raster image files (page 11) in BMP, GIF, TIF,
PCX, JPG, TGA and BIL format as MapInfo tables. These can be registered (page 219) to the
same coordinate system as other mapped files, but cannot be manipulated - they are available
only as non-transparent4 backdrops to vector data. They have no tabular data attached.

AAAA
AAAAAAAA
AAAA AAA
AAA
AAAA
AAAA
AAAA
AAAA AAA
AAAAAAA
4 From version 4, one colour can be set as transparent - typically the background of a scanned drawing or logo, or a mask
area. Although the rest of the raster is opaque on-screen, raster images may be printed transparently on a laser printer, i.e.
light colours will not necessarily mask underlying dark coloured objects.
AAAA
AAAA
AAAA
AAAA
AAAA
AAAA
AAAA
4
AAAA
AAAA
AAAA
AAAA
AAAA
AAAA
AAA
AAA
AAA
AAA
AAA
AAA
AAA
AAAAAAAA AAA
AAAAAAAAAAA

Getting data files into (and out of) MapInfo


64

CREATING MAP OBJECTS

CREATING POINTS

Data imported from ASCII delimited, spreadsheet and database files will only contain tabular
data, i.e. data fields describing the objects to be plotted. They do not contain any map data, i.e.
symbols or outlines which might be plotted on a map. To create this map data for point objects5
we use Table>Create Points:

In the dialogue box, select the fields you have used for X and Y. For longitude and latitude,
longitude is the X coordinate (left to right) and latitude is the Y coordinate (bottom to top). A
multiplication factor of -1 allows inversion of a coordinate axis, for example longitudes west of
Greenwich or southern hemisphere latitudes which have been recorded as positive values. Other
multiplication factors allow conversion of units, for example 1000 would convert kilometre
coordinates to metre coordinates for use on a UTM map.

If your X or Y coordinate fields don't appear in the pull-down for Get X/Y coordinates from ?
column it is because they are not defined as a numeric field type. Look for a non-numeric
character in the imported data which has forced the field(s) to be defined as character type.
Correct the data and reimport or convert the field type with Table>Maintenance>
Table Structure (you will lose the faulty data unless it is corrected before converting the field
type).

If Table>Create Points is greyed out, check to see that you have at least one non read-only ?
table open, with at least two numeric fields. MapInfo cannot create points for a table without
numeric X and Y coordinates in the tabular data.

AAA
AAA AAAA
AAAA AAA
AAA
AAA
AAA
AAAA
AAAA AAA
AAA
AAA
AAA
AAA
AAA
AAA
AAA
AAA
4AAAAAAA
AAAA
AAAA
AAAA
AAAA
AAAA
AAAA
AAA
AAA
AAA
AAA
AAA
AAA
5 For line and area objects, map data must generally be drawn, digitised or imported and then joined with the tabular data -
see page 174. Map objects can also be created with MapBasic instructions (see page 66).
AAA AAAA AAA
AAAAAAAAAA

Getting data files into (and out of) MapInfo


65

Symbols
h You may wish to click on the symbol shown and select something more interesting than the
default black square, e.g. a red triangle in 6 point size. Keep the symbols small (between 2 and
6 point - you are not restricted to the minimum value of 9 shown in the pull-down list), so that
the symbols don't obscure too much of the underlying maps and/or merge into one solid mass.
You can change symbols later by selecting points to be changed (chapter 5) and using
Options>Symbol Style (chapter 6), or through thematic mapping (chapter 8).

h If you have a small number of different categories of point in your data, and you want each
category to plot with a different symbol (e.g. open sites vs rockshelter sites, or stone vs bone vs
ceramics vs metal), select all the records for one category, using Query>Select (chapter 5), and
run Create Points for the Selection table choosing the desired symbol for that category. Repeat
for each of the categories. For large numbers of categories, you will need to use thematic
mapping or import data via a conversion utility such as COMTRANS (available from the Sydney
University Archaeological Computing Laboratory) which sets symbol styles according to values
for a field in the tabular data.

Existing map objects


! If Table>Create Points is run on a table containing records which already have map data
associated, no new map data is created for them. In other words, if you modify the X and Y
fields in a record, or if you previously created points using the wrong fields, Create Points will
not create a new map object at the new location or delete the old map object (see next section
for a method of forcing the creation of new map objects, which may be more convenient than
the method outlined below).

On the other hand, you can delete selected map objects from the map (with Edit>Clear Map
Objects Only)6 and then run Create Points to create new map objects for those tabular records
whose map objects have been deleted.

! Beware: Edit>Clear or the Delete key both delete the map objects and the tabular data.

An alternative way of deleting all map objects in a layer is to use Table>Maintenance>Table


Structure and uncheck Table is Mappable, click OK, then repeat and re-check Table is
Mappable. This may be useful for very large tables, but you will lose the projection and
coordinate limits for the map data.

AAAA
AAAAAAAA
AAAA AAA
AAA
AAAA
AAAA
AAAA
AAAA AAA
AAAAAAA
6 Edit>Clear Map Objects Only will only clear the current selection. If there is no current selection, the menu option will
be greyed out.
AAAA
AAAA
AAAA
AAAA
AAAA
AAAA
AAAA
4
AAAA
AAAA
AAAA
AAAA
AAAA
AAAA
AAA
AAA
AAA
AAA
AAA
AAA
AAA
AAAAAAAA AAA
AAAAAAAAAAA

Getting data files into (and out of) MapInfo


66

CREATING OTHER TYPES OF MAP OBJECT

Table>Create Points will only create point objects for records in the tabular data which do not
have a map object attached. Use of a simple MapBasic instruction allows you to:

Create line and area objects as well as point objects;

Force creation of new objects for all records in a table or selection.

To use a MapBasic instruction, open the MapBasic window ( icon or Options>Show


MapBasic Window), type the instruction in the window and hit Enter.

The MapBasic instructions to create various types of object are as follows:

Update tablename Set obj = CreatePoint (X, Y)

Update tablename Set obj = CreateLine (X1, Y1, X2, Y2)

Update tablename Set obj = CreateCircle (X, Y, radius)

Update tablename Set obj = Centroid (obj)

Update tablename Set obj = Buffer (obj, smoothness, radius, "units")

Replace the italicised words as follows:

tablename Name of table to be updated


X, Y Names of (numeric) fields containing X and Y position of point or
centre of circle
X1, Y1, X2, Y2 Names of (numeric) fields containing start (X1,Y1) and end
(X2,Y2) points of lines
radius Circle radius in miles (sic) or buffering radius in the units
indicated by units
units The units for the buffering radius, e.g. "km", "mi", "m" etc.
smoothness The number of nodes to be created per 360 degrees of arc

For more information, see MapInfo Reference pages 138 - 139.

Note: CreatePoint, CreateLine etc. cannot be used as 'columns' within the Select clause of an
SQL query (chapter 7).

AAA
AAA AAAA
AAAA AAA
AAA
AAA
AAA
AAAA
AAAA AAA
AAA
AAA
AAA
AAA
AAA
AAA
AAA
AAA
4AAAAAAA
AAAA
AAAA
AAAA
AAAA
AAAA
AAAA
AAA
AAA
AAA
AAA
AAA
AAA
AAA AAAA AAA
AAAAAAAAAA

Getting data files into (and out of) MapInfo


67

Checking the data


Once you have created points or other map objects, display a map of the objects using
Window>New Map Window (F3). This map will often only show part of the area, so use
Map>View Entire Layer to show all the objects you have created.

? If all the objects cluster in a very small area, look for one or two objects which have spurious
coordinates, e.g. 0,0 (particularly 0,0 longitude/latitude, which tends to be a long way from
most people's study areas, being in the Atlantic west of central Africa!).

Select the Info tool and click on any outlying objects to look at the tabular data (see page
152 for a description of the Info tool). You will probably find a missing value (0), a typo, a
misplaced decimal point, a negative value, or two values which have been run into one, in either
the X or Y fields.

h You can also look at several objects at once by selecting all the objects in question (see
"Selection of map objects", page 86) and using Window>New Browser Window (F2) to view
data for the Selection table.

ENTERING MAP OBJECTS DIRECTLY

h Map objects can be drawn or digitised and attached to records in existing tabular data directly,
as follows:

Select a record without an attached map object in the browser;


Make a map window active by clicking in the title bar not on the map
(clicking on the map itself will de-select the record in the browser);
Draw or digitise the object on the map (see chapters 6 and 9 for a discussion
of drawing and digitising respectively).

The object will be automatically associated with the selected browser record.

AAAA
AAAAAAAA
AAAA AAA
AAA
AAAA
AAAA
AAAA
AAAA AAA
AAAAAAA
AAAA
AAAA
AAAA
AAAA
AAAA
AAAA
AAAA
4
AAAA
AAAA
AAAA
AAAA
AAAA
AAAA
AAA
AAA
AAA
AAA
AAA
AAA
AAA
AAAAAAAA AAA
AAAAAAAAAAA

Getting data files into (and out of) MapInfo


68

GEOCODING

When we use Table>Create Points to attach point objects to records in a table, the records
already contain the geographic coordinates (X and Y or latitude and longitude) for the objects to
be created. Geocoding allows us to work out the appropriate geographic position for the points
using other data, typically street addresses, city or locality names. It does this by matching data
in each record against tabular data attached to existing map objects in another table (known as
the search table).

Simple geocoding
For example, a list of historic monuments might include the name of the nearest village or town.
Given a map with all the town and village locations, with their names attached as tabular data,
geocoding would allow you to place a point object for each monument at the geographic location
of the corresponding town. To do this, it would match the NearestPlace field in the monuments
table (the geocode table) with the PlaceName field in the table of towns and villages (the search
table), and create a point in the monuments table at the same location as the matched town or
village. If the towns and villages are recorded as polygons rather than points, then the point
object for the monument will be created at the centroid of the polygon.7

The column in the search table must be indexed. Tables without indexed columns will not ?
appear in the pulldown list.

When geocoding is complete, MapInfo will tell you how many of the records in your table have
been successfully geocoded, how many failed to match, and how many already had point
objects attached. MapInfo only geocodes records where there is an exact match and there is no
existing map object.

AAA
AAA AAAA
AAAA AAA
AAA
AAA
AAA
AAAA
AAAA AAA
AAA
AAA
AAA
AAA
AAA
AAA
AAA
AAA
4AAAAAAA
AAAA
AAAA
AAAA
AAAA
AAAA
AAAA
AAA
AAA
AAA
AAA
AAA
AAA
7 MapInfo does not actually use the outline of the object when geocoding, merely its centroid. To allow geocoding based
on US zip codes, MapInfo comes with a special file ZipInfo containing point objects representing the centroids of each
US Zipcode region, with the zip code attached to each point as tabular data.
AAA AAAA AAA
AAAAAAAAAA

Getting data files into (and out of) MapInfo


69

h Your next step will probably be to find out which records failed to geocode and fix the
problems. To retrieve all the non-geocoded records, use Query>Select or Query>SQL Select
with the selection criteria Not obj, for example:

Select * from MONUMENT where NOT obj into Selection


Browse * From Selection

These records may have failed to geocode because the name being matched was incorrectly
spelt (look out for differences in spacing between words) or because the name you wanted to
match does not exist in the search table.

If there are geocoding failures due to misspellings in the table being geocoded (or, less
commonly, the search table), or if you can add to the search table, make these corrections and
run Table>Geocode again.

Another way of obtaining additional matches is to check the Interactive radio button on the
initial geocode dialogue. When a record fails to geocode, MapInfo displays a variant of the
Find dialogue (pages 102 - 105), allowing you to manually select an appropriate matching place
from the search table. MapInfo shows potential matches which are alphabetically close to the
value in the table being geocoded:

This can be useful where there are alternative spellings (as in transliteration of non-English
names) or you have local knowledge which may allow you to link local names with larger
places.

If the value you are trying to match is misspelt, is a transliteration, or can be replaced with an
alternative name, you can make the correction in the field at the top of this dialogue and hit
Enter. The new value will be matched with the search table and geocoded if a match is found,
or a new list of potential matches will be displayed if not. Note that changing the value here
does not affect the data value in the table being geocoded.

AAAA
AAAAAAAA
AAAA AAA
AAA
AAAA
AAAA
AAAA
AAAA AAA
AAAAAAA
AAAA
AAAA
AAAA
AAAA
AAAA
AAAA
AAAA
4
AAAA
AAAA
AAAA
AAAA
AAAA
AAAA
AAA
AAA
AAA
AAA
AAA
AAA
AAA
AAAAAAAA AAA
AAAAAAAAAAA

Getting data files into (and out of) MapInfo


70

Address-based geocoding
MapInfo has no way of knowing where in a polygon the point object belongs, which is why the
point object is placed at the centroid. If the polygons are small in relation to the whole map (for
example, individual suburbs or logging coupes on a regional map) or if you simply want to
shade polygons according to number of incidents - this may be quite satisfactory.8 However,
you will generally require a more precise location when dealing with larger scale maps,
particularly street maps and individual house addresses. Given appropriate information about
street numbering, MapInfo can make an intelligent guess at positioning points at the appropriate
position along the street, based on the street address. MapInfo Corporation and other data
providers sell special StreetInfo databases9 which contain the necessary street objects, street
names and address ranges to allow geocoding to street address.10

MapInfo allows for abbreviations, such as St or Str for Street, Av or Ave for Avenue, through
the file MAPINFOW.ABB (located in the MapInfo program directory) which provides
alternative abbreviations for common terms. If you have a lot of records which fail to geocode,
this may be because they use abbreviations which are different from those used in the search
table. You can edit MAPINFOW.ABB (it is a plain ASCII text file) to add additional terms and
abbreviations as required (see MapInfo Reference page 131 and Appendix C "Advanced
Geocoding").

Where an address fails to fall within one of the ranges of address numbers listed for the street in
the search table, MapInfo will either:

not geocode the record (Automatic mode enabled and Use the Closest Address
Number not checked);
give you the option of selecting an address range (if the Interactive radio button is
checked);
geocode it to the nearest address in an existing range (Use the Closest Address
Number checked).

MapInfo allocates addresses proportionally along each street segment (each street generally
consists of multiple segments/blocks) leaving a short length unused at either end. Points are
positioned a fixed distance of one metre back from the edge of the street segment. Street
intersections are identified by &&, for example Broadway&&City Rd is located at the
intersection between these two streets.

8 If several objects fall within one polygon, however, they will all end up at the same position, which can result in a
misleading map with far fewer objects shown than actually exist. MapInfo comes with a MapBasic program
DISPERSE.MBX which will randomly or systematically distribute points which land up on the same location. See page
248 for instructions on using MapBasic programs.

9 StreetInfo files consist of one file of tabular data only, containing street names, joined to a table recording street
segments with the address range of the segment attached as tabular data. Multiple segments are joined to a single street
AAA
AAA AAAA
AAAA AAA
AAA name record using a shared reference code.
AAA
AAA
AAAA
AAAA AAA
AAA
AAA
AAA
AAA
AAA
AAA
AAA
AAA
4AAAAAAA
AAAA
AAAA
AAAA
AAAA
AAAA
AAAA
AAA
AAA
AAA
AAA
AAA
AAA
10 MapInfo Corporation also sells a more sophisticated geocoding program called MapMarker for applications where
MapInfo's geocoding proves inadequate.
AAA AAAA AAA
AAAAAAAAAA

Getting data files into (and out of) MapInfo


71

Refining geocoding with boundaries


Since the same address or locality name can repeat in more than one suburb, in different towns
or in different administrative areas, MapInfo provides the ability to refine the search using an
additional table which gives the boundaries of towns, local government areas, counties etc.
MapInfo can then match the record to be geocoded with the address or locality name which falls
within the same boundary. For example:

In this example, MapInfo will geocode monuments to the position of a corresponding place
name, but only if the geocode location is within the boundary of the map object in the Cnty-Bnd
table which shares the same value of the County field.

? No fields will be shown under Boundary Column until a table and fields have been selected in
the Optional section.

Checking Use a Match Found in a Different Boundary in the Geocode Options dialogue
allows the boundary search to be overridden where one, and only one, match is found, but the
match does not fall within the boundary indicated. This is useful where the boundary names in
the table being geocoded are not fully standardised - for example, an address may be given in
one suburb when in fact it lies just across the boundary in the next suburb (or because the
owners are trying to increase their market value!); LGA names may change; different
organisations may use different names for the same area.

AAAA
AAAAAAAA
AAAA AAA
AAA
AAAA
AAAA
AAAA
AAAA AAA
AAAAAAA
AAAA
AAAA
AAAA
AAAA
AAAA
AAAA
AAAA
4
AAAA
AAAA
AAAA
AAAA
AAAA
AAAA
AAA
AAA
AAA
AAA
AAA
AAA
AAA
AAAAAAAA AAA
AAAAAAAAAAA

Getting data files into (and out of) MapInfo


72

Geocoding options
The Options button brings up an additional dialogue, allowing refinement of the geocoding
search:

The status of the geocoding operation for each record can be written into a numeric field
selected from the Put Result Code in Column pulldown list. Only numeric fields will be
shown. The result code is a numerical code describing the steps taken, and errors encountered,
in trying to geocode that particular record - see MapInfo Reference pages 471 - 472 for the
meaning of result codes.

Selecting a field in Display Additional Column refines the matching in Interactive mode (see
discussion under Find dialogue, pages 102 - 105) allowing use of a boundary to distinguish the
same name in different boundaries (towns, administrative areas, catchments etc.):

The dialogue displays a list of potential matching names within the boundary identified by the
boundary column (County in this case).

The check boxes under When an exact match cannot be found are discussed on page 105.

Geocoding can also be carried out on a temporary table created by an SQL query (chapter 7).
Because temporary tables are dynamically linked to the base table from which they are derived,
AAA AAAA AAA creation of map objects in the temporary table will attach those objects to the base table
AAA AAAA AAA
AAA
AAA
AAAA
AAAA AAA
AAA specified as the first table in the From Tables clause of the query.
AAA
AAA
AAA
AAA
AAA
AAA
AAA
4AAAAAAA
AAAA
AAAA
AAAA
AAAA
AAAA
AAAA
AAA
AAA
AAA
AAA
AAA
AAA
AAA AAAA AAA
AAAAAAAAAA

Getting data files into (and out of) MapInfo


73

GETTING DATA OUT OF MAPINFO

Data can be exported from temporary tables (selections, tables with computed fields) as well as
from tables which are permanently stored on disk, using Table>Export. This allows MapInfo
to be used to create new data (including data derived from spatial operations)11 and export this
new data to programs which might not be capable of such operations (such as conventional
database management systems) or to save temporary data as permanent tables on disk.

Select the export format from the File Format pulldown list. The default format is MapInfo
Interchange Format (MIF/MID).

Both the map objects and the attached tabular data can be exported (if the export format
accommodates map data - MapInfo MIF/MID and DXF), or the tabular data alone can be
exported to common data exchange formats (DBF and ASCII delimited).

! If you cancel an export operation part way through, you will get an output file which appears
OK but only contains part of your data.

AAAA
AAAAAAAA
AAAA AAA
AAA
AAAA
AAAA
AAAA
AAAA AAA
AAAAAAA
11 For example, determining polygon attribution of point objects (e.g. attribution of sites to National Park or administrative
authority, area or perimeter of polygons, length of polylines, proportion of overlap between different classes of feature.
AAAA
AAAA
AAAA
AAAA
AAAA
AAAA
AAAA
4
AAAA
AAAA
AAAA
AAAA
AAAA
AAAA
AAA
AAA
AAA
AAA
AAA
AAA
AAA
AAAAAAAA AAA
AAAAAAAAAAA

Getting data files into (and out of) MapInfo


74

TABULAR + MAP DATA

MapInfo Interchange Format (MIF/MID)


MapInfo Interchange Format is the default export format for Table>Export, and the one which
will carry with it a maximum amount of information from the table, including projection, field
definitions, pen assignments, map objects and tabular data. It is a fairly straightforward ASCII
format (see pages 58 - 62) which lends itself to tinkering with a wordprocessor or simple filter
program.

Drawing Exchange Format (DXF)


A MapInfo table, permanent or temporary, can also be exported to an AutoCAD version 12 or
13 standard DXF file (MapInfo Reference pages 119 - 120). Since only a single table is
exported at a time, only one DXF layer is created, called "0".

Multi-polygon region objects are normally output as DXF blocks, but can be output as separate
objects if the check mark is removed from Preserve Multi Polygon Regions as DXF Blocks.

If the Preserve Attribute Data box is checked, both map objects and tabular data are exported,
otherwise only the map objects are exported.

Click the Set Transformation button to set the transformation between the coordinate system
used within MapInfo and the coordinate system you want used in the DXF file (page 63).

If you try and export a non-mappable table to DXF, MapInfo displays the Export Table to File ?
dialogue but nothing happens when you click the Export button. You will get a warning
message only once you click Cancel.

AAA
AAA AAAA
AAAA AAA
AAA
AAA
AAA
AAAA
AAAA AAA
AAA
AAA
AAA
AAA
AAA
AAA
AAA
AAA
4AAAAAAA
AAAA
AAAA
AAAA
AAAA
AAAA
AAAA
AAA
AAA
AAA
AAA
AAA
AAA
AAA AAAA AAA
AAAAAAAAAA

Getting data files into (and out of) MapInfo


75

Coordinate system

? When exporting, coordinates are output in the native projection of the table, e.g. longitude and
latitude in degrees for a longitude/latitude projection or metre grid references relative to the
selected zone for a UTM projection. The coordinates are not affected by the current projection
in which maps are displayed.

h To output coordinates in a different projection, you will first need to save a copy of the table
using File>Save Copy As, changing the projection of the copy (Projection button below) and
export from the copy:

Note also that changing the projection12 will not change the coordinates in the tabular data. To
change these you must first save a copy of the table in the new projection, as noted above, then
use Table>Update Column to set the X and Y values in the tabular data to CentroidX(obj)
and CentroidY(obj) respectively.

AAAA
AAAAAAAA
AAAA AAA
AAA
AAAA
AAAA
AAAA
AAAA AAA
AAAAAAA
12 X and Y coordinates in the tabular data are also not updated when a map object is moved - there is no formal link
between the position of the map object and any particular fields in the tabular data. The link is only established
temporarily by Table>Create Points for the purpose of positioning points to represent the tabular data records.
AAAA
AAAA
AAAA
AAAA
AAAA
AAAA
AAAA
4
AAAA
AAAA
AAAA
AAAA
AAAA
AAAA
AAA
AAA
AAA
AAA
AAA
AAA
AAA
AAAAAAAA AAA
AAAAAAAAAAA

Getting data files into (and out of) MapInfo


76

TABULAR DATA ONLY

DBase DBF and ASCII Delimited


MapInfo can also export data as DBase DBF and delimited ASCII files through Table>Export. !
However, only tabular data can be exported in these formats, as they have no provision for
map objects. Default extensions are .DBF for DBase and .TXT for delimited ASCII. Field
names and types are maintained automatically for DBase. Field names can be output as the first
line of ASCII delimited files if Use First Line for Column Titles is checked:

Data exported in ASCII delimited format can be read by most programs. The field names can
often be picked up by the destination program from the first line of the file.

File>Save Copy As can also be used to write tabular data to DBase format, but this will create
unnecessary map data files (if map objects exist in the table being saved). Table>Export is
therefore recommended where the only purpose is to export the tabular data.

In cases where the tabular data will frequently be accessed by other programs, you should store h
the table in DBase format, allowing direct access by both MapInfo and other software.

AAA
AAA AAAA
AAAA AAA
AAA
AAA
AAA
AAAA
AAAA AAA
AAA
AAA
AAA
AAA
AAA
AAA
AAA
AAA
4AAAAAAA
AAAA
AAAA
AAAA
AAAA
AAAA
AAAA
AAA
AAA
AAA
AAA
AAA
AAA
AAA AAAA AAA
AAAAAAAAAA

Getting data files into (and out of) MapInfo

Das könnte Ihnen auch gefallen