Purpose
Modifies the structure of a table, making the table mappable. You can issue this statement from the MapBasic window in MapInfo Pro.
Syntax
Create Map
For table [ BlockSize block_size ]
[ CoordSys... ] Using from_table]
table is the name of an open table.
from_table is the name of an open table from where to copy a coordinate system.
block_size is a value of between zero (0) to 32767. If not specified, the default value is 16384. If the value is less than 512, it rounds up to 512.
Description
The Create Map statement makes an open table mappable, so that it can be displayed in a Map window. This statement does not open a new Map window. To open a new Map window, use the Map statement.
You should not perform a Create Map statement on a table that is already mappable; doing so will delete all map objects from the table. If a table already has a map attached, and you wish to permanently change the projection of the map, use a Table As statement. Alternately, if you wish to temporarily change the projection in which a map is displayed, issue a Set Map statement with a CoordSys clause. The Create Map statement does not work on linked tables. To make a linked table mappable, use the Server Create Map statement.
The BlockSize clause have a value of zero (0) to 32767. If not specified, the default is 16384. If the value is less than 512, it rounds up to 512. Generally, the larger the block size, the faster the data transfer rate. When converting from NativeX (MapInfo Extended) format to Native (MapInfo) format, the original block size of the NativeX file is preserved. Users can specify a new block size when committing from NativeX to Native format.
CoordSys is a coordinate system clause; see CoordSys clause and refer to the next section, Specifying the Coordinate System.
Specifying the Coordinate System
Use one of the following two methods to specify a coordinate system:
- Provide the name of an already open mappable table as the from_table portion of the Using clause. In this case, the coordinate system used will be identical to that used in the from_table. The from_table must be a currently open table, and must be mappable or an error will occur.
- Explicitly supply the coordinate system information through a CoordSys clause (set in preferences). If you omit both the CoordSys clause and the Using clause, the table will use the current MapBasic coordinate system.
Note that the CoordSys clause affects the precision of the map. The CoordSys clause includes a Bounds clause, which sets limits on the minimum and maximum coordinates that can be stored in the map. If you omit the Bounds clause, MapInfo Pro uses default bounds that encompass the entire Earth (in which case, coordinates are precise to one millionth of a degree, or approximately 4 inches). If you know in advance that the map you are creating is limited to a finite area (for example, a specific metropolitan area), you can increase the precision of the map's coordinates by specifying bounds that confine the map to that area. For a complete listing of the CoordSys syntax, see CoordSys clause.
See Also:
Commit Table statement, CoordSys clause, Create Table statement, Drop Map statement, Map statement, Server Create Map statement, Set Map statement