DK11 for Delphi | GisLayerVector.TGIS_Shape.CreateFromEWKT | Constructors | Fields | Methods | Properties
Create the shape geometry from an Extended Well-Known Text (EWKT) representation of the geometry with SRID meta data. (see www.postgis.org).
// Delphi public function CreateFromEWKT( const _ewkt : String ) : TGIS_Shape; virtual;
// C++ Builder public: virtual TGIS_Shape* CreateFromEWKT( const UnicodeString _ewkt );
Name | Type | Description |
---|---|---|
_ewkt | String | EWKT text |
Type | Description |
---|---|
TGIS_Shape | Newly created shape. |
var //public declarations layerObj : TGIS_LayerVector ; str : String = 'SRID=4326;POLYGON((5 5,25 5,25 25,5 25,5 5),(10 10,10 20,20 20,20 10,10 10))'; procedure MyClass.EWKT(); var shp : TGIS_Shape ; begin try layerObj.RevertAll ; shp:=TGIS_Shape.Create(nil,nil,false,0,layerObj); layerObj.AddShape( shp.CreateFromEWKT() ) ; shp.Free ; except ShowMessage( 'Bad format' ) ; end ; GIS.RecalcExtent ; GIS.FullExtent ; GIS.Invalidate ; end;