WRAPPER_API void ImportCoordSysFromString(HorizontalCoordSys
**horizontal, VerticalCoordSys **vertical, const BmgChar *value);
Description
The ImportCoordSysFromString method allows the user to populate a Horizontal or Vertical CoordSys object from a string containing a Well-Known-Text (WKT) definition of a coordinate system. The input parameters for this method are a vector of horizontal and a vector of vertical coordinate systems, along with the WKT string. If the string passed as argument does not contain a valid WKT coordinate system definition, then a GeoCalcException will be thrown with an ErrorCode specifying CannotImportCoordinateSystem. If only a vertical system definition is found in the string definition, the returned horizontal CRS pointer will be null, as with the situation where the vertical is not found only the horizontal will be returned. The user is responsible for cleaning up any coordinate systems returned from this method.
Example
void DataSource_ImportCoordSysFromString(GEOCALCPBW_NAMESPACE::DataSource
& data)
{
_towchar wktString("A Well-Known
Text definition for a CoordSys goes here");
GEOCALCPBW_NAMESPACE::VerticalCoordSys
*vertical;
GEOCALCPBW_NAMESPACE::HorizontalCoordSys
*horizontal;
data.ImportCoordSysFromString(&vertical,
&horizontal, wktString.c_str());
...
if (null != horizontal)
Disposal::Dispose(horizontal);
if (null != vertical)
Disposal::Dispose(vertical);
}
Comments
0 comments
Please sign in to leave a comment.