Specify Dimensionality When Creating Geometries Using String Specifications

FDO API

 
Specify Dimensionality When Creating Geometries Using String Specifications
 
 
 

When creating a 3D geometry from string specifications, you must specify the Dimensionality argument XYZ explicitly, because the default dimensionality is XY, and the geometry factory code will only process the first two ordinates.

The following code successfully creates pointOne as a 3D point, whereas pointTwo is created as a 2D point.

FdoFgfGeometryFactory * geometryFactory = FdoFgfGeometryFactory::GetInstance();
FdoIPoint * pointOne;
pointOne = dynamic_cast(geometryFactory->CreateGeometry(L”GeomFromText(‘POINT XYZ (1 2 3)’)”));
FdoPoint * pointTwo;
pointTwo = dynamic_cast(geometryFactory->CreateGeometry(L”GeomFromText(‘POINT (1 2 3)’)”));
xmlFeatureFlags = FdoXmlFeatureFlags.Create( None, FdoXmlFlags.ErrorLevel_Normal, True, FdoXmlFeatureFlags.ConflictOption_Add )