MapGuide API Reference
 All Classes Functions Variables Enumerations Enumerator Friends
MgFileFeatureSourceParams Class Reference

Contains the parameters used to create a file-based feature source. More...

+ Inheritance diagram for MgFileFeatureSourceParams:

List of all members.

Public Member Functions

STRING GetCoordinateSystemWkt ()
 Gets the well-known text description of the coordinate system.
MgFeatureSchemaGetFeatureSchema ()
 Gets the feature schema definition.
STRING GetFileName ()
 Gets the file name to be created. For SHP FDO provider, it is used to get path name because multiple files will be created if there are multiple feature classes in the specified featue schame.
virtual STRING GetProviderName ()
 Gets the FDO provider name of the feature source.
STRING GetSpatialContextDescription ()
 Gets the spatial context description.
STRING GetSpatialContextName ()
 Gets the user-defined spatial context name.
double GetXYTolerance ()
 Gets the tolerance used for the X and Y ordinates.
double GetZTolerance ()
 Gets the tolerance for the Z ordinate.
 MgFileFeatureSourceParams ()
 Constructs an empty MgFileFeatureSourceParams object.
 MgFileFeatureSourceParams (CREFSTRING providerName)
 Constructs an MgFileFeatureSourceParams object with the specified FDO provider name.
 MgFileFeatureSourceParams (CREFSTRING providerName, CREFSTRING spatialContextName, CREFSTRING srsWkt, MgFeatureSchema *featureSchema)
 Constructs an MgFileFeatureSourceParams object with the supplied parameters.
void SetCoordinateSystemWkt (CREFSTRING srsWkt)
 
void SetFeatureSchema (MgFeatureSchema *featureSchema)
 
void SetFileName (CREFSTRING name)
 
virtual void SetProviderName (CREFSTRING name)
 
void SetSpatialContextDescription (CREFSTRING description)
 
void SetSpatialContextName (CREFSTRING name)
 
void SetXYTolerance (double tolerance)
 
void SetZTolerance (double tolerance)
 

Detailed Description

Contains the parameters used to create a file-based feature source.

Remarks:
Use MgFeatureService::DescribeSchema and MgFeatureService::GetSpatialContexts to get the values needed to construct and configure the MgFileFeatureSourceParams object.

Only file-based FDO providers that support the FdoICreateDataStore command can be used with this class to create Feature Sources. As of this writing, the known supported file-based FDO providers are:
  • OSGeo.SDF
  • OSGeo.SHP
  • OSGeo.SQLite
You cannot create non-file Feature Sources using this class
Example (PHP)
 $schemaCollection = $featureService->DescribeSchema($activeFeatSrcResId, $schemaName, NULL);
 $schema = $schemaCollection->GetItem(0);
 $activeOnly = true;
 $activeSpatialContextReader = $featureService->GetSpatialContexts($activeFeatSrcResId, $activeOnly);
 $activeSpatialContextReader->ReadNext();
 $spatialContextName = $activeSpatialContextReader->GetName();
 $coordSysWkt = $activeSpatialContextReader->GetCoordinateSystemWkt();
 $providerName = "OSGeo.SDF";
 $createSdfParams = new MgFileFeatureSourceParams($providerName, $spatialContextName, $coordSysWkt, $schema);
 $createSdfParams->SetSpatialContextDescription($activeSpatialContextReader->GetDescription());
 $createSdfParams->SetXYTolerance($activeSpatialContextReader->GetXYTolerance());
 $createSdfParams->SetZTolerance($activeSpatialContextReader->GetZTolerance());