CopyFeatures

Land Desktop Map 3D Samples

 
CopyFeatures
 
 
 

This method takes two arguments: a collection of feature source id strings identifying the source of the features being copied and an MgResourceIdentifier object identifying the destination of the features being copied. It loops through the feature source id strings and does the following.

  1. Creates an MgResourceIdentifier object using the feature source id string as the argument to the constructor.
  2. Uses an MgFeatureService object to get the names of the schemas contained in the MgResourceIdentifier object.
  3. Uses an MgFeatureService object to get the names of the classes contained in schema.
  4. Uses an MgFeatureService object to get all of the features for each class.
  5. Gets the collection of properties in each feature. This is described in topic ReadFeature.
  6. Creates an OSGeo.MapGuide.MgFeatureCommandCollection object.
  7. Creates an OSGeo.MapGuide.MgInsertFeatures object passing the collection properties to the constructor.
  8. Adds the MgInsertFeatures objec to the MgFeatureCommandCollection object.
  9. Uses the MgFeatureService object to insert the collection of properties as a feature into the destination feature source.