DK for Delphi | GisLayerVector.TGIS_Shape.ImportFromWKT | Constructors | Fields | Methods | Properties
Import the Well Known Text (see www.opengis.org) into the current shape.
// Delphi public procedure ImportFromWKT( const _wkt : String ); virtual;
// C++ Builder public: virtual void ImportFromWKT( const UnicodeString _wkt );
Name | Type | Description |
---|---|---|
_wkt | String | WKT text |
Internally it uses CreateFromWKT method. If WKT is a different type, the shape will be reset.
const WKTText='POLYGON((15 15,25 15,25 25,15 25,15 15),(10 10,10 20,20 20,20 10,10 10))'; var layerObj : TGIS_LayerVector ; procedure MyClass.Shape(); var shp : TGIS_Shape ; begin layerObj.RevertAll ; try // create a shape using WKT string shp:=layerObj.CreateShape(TGIS_ShapeType.Polygon); shp.ImportFromWKT( WKTText ) ; except ShowMessage( 'Bad format' ) ; end ; GIS.RecalcExtent ; GIS.FullExtent ; GIS.Invalidate ; end;