DK for Delphi | GisLayerVector.TGIS_Shape.ImportFromEWKT | Constructors | Fields | Methods | Properties
Import the Extended Well-Known Binary (EWKB) representation of the geometry with SRID meta data into the current shape (see www.postgis.org).
// Delphi public procedure ImportFromEWKT( const _ewkt : String ); virtual;
// C++ Builder public: virtual void ImportFromEWKT( const UnicodeString _ewkt );
Name | Type | Description |
---|---|---|
_ewkt | String | EWKT text |
Internally it uses CreateFromEWKT method. If WKT is a different type, the shape will be reset.
const EWKTText='SRID=4326;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 EWKT string shp:=layerObj.CreateShape(TGIS_ShapeType.Polygon); shp.ImportFromEWKT( EWKTText ) ; except ShowMessage( 'Bad format' ) ; end ; GIS.RecalcExtent ; GIS.FullExtent ; GIS.Invalidate ; end;