User's Guide and Reference
This section describes the processes of importing and
exporting data, and explains how to use the Control Center to:
- Import data from a data exchange file to a new or existing table
- Import data from a data exchange file to an existing table
- Export data from a table to a data exchange file
This section lists reasons for importing and exporting spatial data.
It also discusses the data exchange files that serve as interfaces between
sources of the export and targets of the import.
You can use DB2 Spatial Extender to import spatial data from, and export it
to, data exchange files. Consider these scenarios:
- Your GIS contains spatial data that represents your offices, customers,
and other business concerns. You want to supplement this data with
spatial data that represents your organization's cultural
environment--cities, streets, points of interest, and so on. The
data that you want is available from a map vendor. You can use DB2
Spatial Extender to import it from a data exchange file that the vendor
supplies.
- You want to migrate spatial data from an Oracle system to your DB2 Spatial
Extender GIS. You proceed by using an Oracle utility to load the data
into a data exchange file. You then use DB2 Spatial Extender to import
the data from this file to the database that you have enabled for spatial
operations.
- You want to use a GIS browser to show visual presentations of spatial
information to customers. The browser needs only files to work
from; it does not need to be connected to a database. You could
use DB2 Spatial Extender to export the data to a data exchange file, and then
use a browser utility to load the data into the browser.
The Control Center supports two kinds of data exchange files for DB2
Spatial Extender: shape files and ESRI_SDE transfer files.
Shape files are often used for importing data that originates in file systems
and for exporting data to files that are to be loaded into file
systems. ESRI_SDE transfer files are often used for importing data
that originates in ESRI databases.
This section gives an overview of the steps to import data from a shape or
ESRI_SDE transfer file to a new or existing table. The overview is
followed by details of how to complete each step.
To find out what authorization is required for importing shape data, see Authorization. To find out what authorization is required for
importing ESRI_SDE data, see Authorization.
Overview of steps to import data to a new or existing
table:
- Open the Import Spatial Data window.
- Specify the path, name, and format of the file that contains the data to
be imported.
- Specify how many records to import before each commit.
- If you want to import spatial data to a table that is to be created,
supply a name for this table and a name for the column that the data is
intended for. If importing spatial data to an existing table, indicate
which column the data is intended for.
- Specify which spatial reference system is to be associated with the
data.
- Designate a file to collect the records that fail the import.
- Tell DB2 Spatial Extender to import the data and, if you defined a table
from this window, to create the table and to register the column for which the
data is intended as a layer.
Details of steps to import data to a new or existing
table:
- Open the Import Spatial Data window.
- From the Control Center window, expand the object tree until you find the
Databases folder under the server where you are running DB2 Spatial
Extender.
- Click Databases folder. The databases are displayed in
the contents pane on the right side of the window.
- Right-click the database to which you want to import data and click
Spatial Extender --> Import Spatial Data in the
pop-up menu. The Import Spatial Data window opens.
- Specify the path, name, and format of the file that contains the data to
be imported:
- Use the File name field to specify the path and name.
- Use the File format box to specify the format. The
format can be:
- Shape
- This is the default.
- ESRI_SDE
- If you specify this format, the Spatial reference name field
defaults to the name of the spatial reference system that is associated with
this format.
- Use the Commit scope field to specify the number of records
that you want imported before each commit. For example, to require DB2
to commit 100 records at a time, specify the number 100.
Tip: | If you want DB2 to issue a commit only after all records are processed,
specify zero.
|
- Specify the table and column that the data is intended for.
- Use the Layer schema box to specify the schema for the table to
which data is to be imported.
- Specify the table and the column:
- If the table does not yet exist:
- In the Layer table field, type a name for the table.
- In the Layer column field, type a name for the column that is
to contain the imported data. DB2 Spatial Extender will automatically
register this column as a layer.
- If the table already exists:
- In the Layer table field, specify the table. It must
already contain the column that you want the imported data to go into.
In addition, this column must already be registered as a layer.
- In the Layer column field, specify the name of the column that
the imported data is intended for.
- In the Spatial reference name field, type or select the spatial
reference system that is to be associated with this data. (If the data
is to come from an ESRI_SDE transfer file, the name of the associated
spatial reference system is displayed in the field automatically.)
- In the Exception file field, specify the path and name for a
new file into which records that fail the import can be collected.
Later, you can fix these records and import them from this file.
DB2 Spatial Extender will create this file; do not specify one that
already exists.
- Click OK to import the data. Also, if you supplied a
name for a table that does not exist yet, this table will be created and the
column for which the data is intended will be registered as a layer. In
addition, the exception file that you specified will be created.
[ Top of Page | Previous Page | Next Page ]