User Tools

Site Tools


api:dk11:delphi:gislayervector.tgis_shape.exporttoewkb_olevariant

Table of Contents

TGIS_Shape.ExportToEWKB method

DK11 for Delphi | GisLayerVector.TGIS_Shape.ExportToEWKB | Constructors | Fields | Methods | Properties

Export the Shape geometry into an Extended Well-Known Binary (EWKB) representation of the geometry with SRID meta data. (see www.postgis.org). Spatial referencing identifier SRID can be provided by TGIS_Shape.SetSRID See TGIS_ShapePolygon.ExportToEWKB for example.

Available also on: .NET | Java | ActiveX.

Syntax

// Delphi
public
  procedure ExportToEWKB(
    var _ewkb : OleVariant
  ); virtual; abstract;
// C++ Builder
public:
  virtual void ExportToEWKB(
    OleVariant* &_ewkb
  ) = 0;

Parameters

Name Type Description
_ewkb OleVariant exported EWKB array

Example

Delphi

var
  // some declarations
  s : OleVariant;
  ll : TGIS_LayerVector ;
begin
  // use a sample data
  GIS.Open( GisSamplesDataDir + 'topology.shp' ) ;
 
  // to get a layer with shapes
  ll := TGIS_LayerVector (GIS.Items[0]) ;
  if not assigned( ll ) then exit ;
 
  // there are two shapes, let's use second one
  // first export shape to an array
  TGIS_ShapePolygon( ll.GetShape( 2 )).ExportToEWKB(s);
 
  // second, let's see EWKT definition
  ShowMessage(TGIS_ShapePolygon( ll.GetShape( 2 )).ExportToEWKT());
 
  GIS.FullExtent ;
2020/05/07 01:09

Page Tools