/// <summary>Imports a geometry from a WKT string.</summary> /// <remarks> /// Imports a geometry from a WKT string. /// See OperatorImportFromWkt. /// </remarks> /// <param name="wkt">The string containing the geometry in WKT format.</param> /// <param name="importFlags"> /// Use the /// <see cref="WktImportFlags"/> /// interface. /// </param> /// <param name="geometryType">The required type of the Geometry to be imported. Use Geometry.Type.Unknown if the geometry type needs to be determined from the WKT context.</param> /// <returns>The geometry.</returns> /// <exception cref="GeometryException">when the geometryType is not Geometry.Type.Unknown and the WKT contains a geometry that cannot be converted to the given geometryType.</exception> /// <exception cref="IllegalArgument">exception if an error is found while parsing the WKT string.</exception> public static com.epl.geometry.Geometry GeometryFromWkt(string wkt, int importFlags, com.epl.geometry.Geometry.Type geometryType) { com.epl.geometry.OperatorImportFromWkt op = (com.epl.geometry.OperatorImportFromWkt)factory.GetOperator(com.epl.geometry.Operator.Type.ImportFromWkt); return(op.Execute(importFlags, geometryType, wkt, null)); }
public static com.epl.geometry.ogc.OGCGeometry FromText(string text) { com.epl.geometry.OperatorImportFromWkt op = (com.epl.geometry.OperatorImportFromWkt)com.epl.geometry.OperatorFactoryLocal.GetInstance().GetOperator(com.epl.geometry.Operator.Type.ImportFromWkt); com.epl.geometry.OGCStructure ogcStructure = op.ExecuteOGC(0, text, null); return(com.epl.geometry.ogc.OGCGeometry.CreateFromOGCStructure(ogcStructure, com.epl.geometry.SpatialReference.Create(4326))); }