You can use Bulk
Copy to copy data from one feature source to
another, either in the same format or in a different one.
Copy, you can copy the complete feature source or
a subset based on a specified schema, feature class,
You can also filter a Display Manager layer
using an expression, and then use Bulk Copy to
create a data store that contains only the filtered data.
What You Can Do With Bulk
Copy to do the following:
- Make your own copy of data owned by another
- Upgrade from file-based (SDF or SHP)
data storage to multi-user database storage (Microsoft SQL Server,
MySQL, or Oracle), which provides advanced features, such as versioning and long transaction.
- Move joined data and calculated fields
into a new data store.
- Transform coordinate systems easily.
For example, you can do any of the following:
- Assign a coordinate system to a data
store that does not have one.
- Create a new data store whose coordinate
system is different from the source. The target class uses the override
coordinate system as the projection for the spatial context.
- Convert a foreign schema to a native
Bulk Copying to SHP Format
A single SHP file can
hold only one class. To copy multiple classes, to an empty folder
through the FDO SHP provider. When you copy to that connection, Bulk
Copy creates a new SHP file for each class you copy.
Do not create a new SHP file in Schema Editor and
use the new SHP as your Bulk Copy target.
A SHP schema cannot be
modified once it is applied.To avoid this limitation when you copy
SDF data to SHP, export the SDF schema. Then, when you create the
target SHP schema, delete its default schema and import the SDF schema.
This way, you can fix any errors in the schema. During the Bulk Copy,
select the feature class and property names in the To column
and match them exactly to the From column.
Depending on the size
of the file, you can also import the SDF data and export it as SHP.
Bulk Copying To or From
SQL Server Spatial
When you copy data from
an FDO-enabled SQL Server Spatial data store to a non-FDO data store,
class and property names may not be accepted by the destination
data store because naming rules vary between providers. You can use
schema mappings to rename schema elements that you copy, to be sure they
meet the naming rules of the destination data store.
You can also pass in
a set of schema capabilities to the target data store, so the cloned
schemas conform to the capabilities of that data store.
When you copy geodetic
polygons with clockwise rings to SQL Server Spatial, check Unmatched
Data Or Geometric Type Errors as an error type to ignore.
For geography, SQL Server
Spatial considers the inside of a polygon to be to the left of the
outer boundary. If a polygon with a clockwise boundary is inserted,
the polygon actually covers the rest of the world, excluding what appears
to be inside the polygon from an onscreen perspective. If you ignore unmatched
geometry type errors when using Bulk Copy,
the geometry and orientation are adjusted when the target is SQL
Server Spatial. If you do not check this option and you copy a
polygon with the wrong orientation to SQL Server Spatial, that object
will fail to copy.
Also, SQL Server Spatial
does not currently support such polygons that are bigger than one
Other Ways to Migrate Data
If you are moving data
from DWG format to any other format, you cannot use Bulk
Copy. Instead, see Migrating DWG Data to GIS.
If you are moving geospatial
data into SDF format, it may be easier to save or export its Display
Manager layer to SDF, without going through Bulk
Copy. See Saving or Exporting a Display Manager Layer.
Things to Remember
When using Bulk
Copy, keep in mind the following points :
- The copied schema is created if it does
not exist in the destination feature source.
- The names of schemas, feature
classes, and properties in the source
feature source do not need to match the names in the destination feature
- You can save or load an XML mapping file
to set up the mapping between the source and destination feature
- You can copy geometry with no transformation
of the coordinates.
- You must make sure that the data you
are moving are inside the extents of the destination data store.
(When you create
a data store, you specify the minimum
and maximum X and Y spatial extents for the new data store.) MySQL
and Oracle support expanding the extents automatically if incoming
data are beyond the scope of the extents.
- If you do not have adequate rights to
the target data store, you must either create a new, empty data
store as the target or ask your administrator to grant you the rights
required to insert data in the target tables.