Web API Reference | MapGuide Open Source

- Overview
- Modules
- Classes

# MgCreateSdfParams Class Reference
[MgCreateSdfParams]

Contains the parameters used to create an SDF feature source. More...

Inherits MgFeatureSourceParams.

List of all members.

## Public Member Functions
STRING | GetCoordinateSystemWkt ()
| Gets the well-known text description of the coordinate system.
MgFeatureSchema * | GetFeatureSchema ()
| Gets the feature schema definition.
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.
| MgCreateSdfParams (CREFSTRING spatialContextName, CREFSTRING srsWkt, MgFeatureSchema *featureSchema)
| Constructs an MgCreateSdfParams object with the supplied parameters.
| MgCreateSdfParams ()
| Constructs an empty MgCreateSdfParams object.
void | SetCoordinateSystemWkt (CREFSTRING srsWkt)
void | SetFeatureSchema (MgFeatureSchema *featureSchema)
void | SetSpatialContextDescription (CREFSTRING description)
void | SetSpatialContextName (CREFSTRING name)
void | SetXYTolerance (double tolerance)
void | SetZTolerance (double tolerance)

## Detailed Description

Contains the parameters used to create an SDF feature source.

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

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();
     $createSdfParams = new MgCreateSdfParams($spatialContextName, $coordSysWkt, $schema);
     $createSdfParams->SetSpatialContextDescription($activeSpatialContextReader->GetDescription());
     $createSdfParams->SetXYTolerance($activeSpatialContextReader->GetXYTolerance());
     $createSdfParams->SetZTolerance($activeSpatialContextReader->GetZTolerance());

Comments or suggestions? Send us feedback.