CreateFdoFeatureClass

Land Desktop Map 3D Samples

 
CreateFdoFeatureClass
 
 
 

This method creates a new FDO feature class object of type OSGeo.FDO.Schema.FeatureClass based on the specified feature class in the feature source. It takes three arguments: a feature schema name, a class name, and an MgResourceIdentifier identifying the feature source which contains the feature schema and class definition. It does the following:

  1. Uses an OSGeo.MapGuide.MgFeatureService object and the three arguments passed into the method to get an OSGeo.MapGuide.MgClassDefinition object.
  2. Creates a FeatureClass object.
  3. Uses the MgClassDefinition object to get an OSGeo.MapGuide.MgPropertyDefinitionCollection object that contains the class properties.
  4. Loops through the OSGeo.MapGuide.MgPropertyDefinition objects in the MgPropertyDefinitionCollection object. If the object is an OSGeo.MapGuide.MgDataPropertyDefinition object, it creates an OSGeo.FDO.Schema.DataPropertyDefinition object and copies the values in the object’s attributes to the corresponding attributes in the DataPropertyDefinition object. If the object is an OSGeo.MapGuide.MgGeometricPropertyDefinition object, it creates an OSGeo.FDO.SChema.GeometricPropertyDefinition object and copies the values in the object’s attributes to the corersponding attributes in the GeometricPropertyDefinition object. It then adds the FDO property definition object to the FDO feature class object.
  5. Uses the MgClassDefinition object to get an OSGeo.MapGuide.MgPropertyDefinitionCollection object that contains the class identity properties.
  6. Creates an identify property collection in the FDO FeatureClass object that corresponds to the identity property collection in the MgClassDefinition object.
  7. Returns the FeatureClass object.