User Tools

Site Tools


api:dk11:delphi:gislayervector.tgis_shape.exporttowkb_olevariant

Table of Contents

TGIS_Shape.ExportToWKB method

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

Export the Shape geometry into a Well Known Binary (see www.opengis.org). See TGIS_ShapePolygon.ExportToWKB for example.

Available also on: .NET | Java | ActiveX.

Syntax

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

Parameters

Name Type Description
_wkb OleVariant exported WKB 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 )).ExportToWKB(s);
 
  // second, let's see WKT definition
  ShowMessage(TGIS_ShapePolygon( ll.GetShape( 2 )).ExportToWKT());
 
  GIS.FullExtent ;
2020/05/07 01:09