CreateSdfFile

Land Desktop Map 3D Samples

 
CreateSdfFile
 
 
 

This method creates a SDF file with a schema defined by a FDO feature schema object. It takes three arguments: an absolute path for the SDF file, the FDO FeatureSchema object, and a string containing the well-known-text (WKT) description of the coordinate system the SDF file will use. It does the following:

  1. Use the OSGeo.FDO.ClientServices.FeatureAccessManager class to create an OSGeo.FDO.IConnectionManager object.
  2. Use the IConnectionManager object to create an OSgeo.FDO.Connections.IConnection object.
  3. Use the IConnection object to create an OSgeo.FDO.Connections.IConnectionPropertyDictionary object.
  4. Use the IConnectionPropertyDictionary object to set the File property to the SDF file argument and the ReadOnly property to False.
  5. Use the IConnection object to create an OSgeo.FDO.Commands.DataStore.ICreateDataStore object.
  6. Use the ICreateDataStore object to set its File property to the SDF file argument.
  7. Use the ICreateDataStore object to create the SDF file in the local filesystem.
  8. Use the IConnection object to open a connection to the SDF file.
  9. Use the IConnection object to create an OSgeo.FDO.Commands.SpatialContext.ICreateSpatialContext object.
  10. Use the ICreateSpatialContext object to set its CoordinateSystemWkt attribute to the value of the string argument containing the WKT description of the coordinate system.
  11. Use the ICreateSpatialContext object to set other attributes.
  12. Use the ICreateSpatialContext object to add a coordinate system to the SDF file.
  13. Use the IConnection object to create an OSgeo.FDO.Commands.Schema.IApplySchema object.
  14. Use the IApplySchema object to set its FeatureSchema attribute to the value of the FeatureSchema argument.
  15. Use the IApplySchema object to add a feature schema to the SDF file.
  16. Use the IConnection object to close the connection to the SDF file.