User Tools

Site Tools


api:dk11:delphi:gislayervector.tgis_layervectordirectwritehelper

TGIS_LayerVectorDirectWriteHelper class

DK11 for Delphi | GisLayerVector.TGIS_LayerVectorDirectWriteHelper | Classes | Constructors | Methods | Properties

Helper for direct write into a layer storage.

Available also on: .NET | Java | ActiveX.

Syntax

// Delphi
type
  TGIS_LayerVectorDirectWriteHelper = class
  end;
// C++ Builder
class PASCALIMPLEMENTATION TGIS_LayerVectorDirectWriteHelper

Constructors

Inherited Overrides Protected
Name Visibility Description
Create public Constructor.

Methods

Inherited Overrides Protected
Name Visibility Description
AddShape public Add a new shape to a storage.
Build public Build new layer - prepare storage for direct writing.
Close public Finalize direct writing into a layer storage.

Properties

Inherited Protected
Name Visibility Description
Layer public Attached layer

Remarks

Direct write is the fastest way of adding shapes. It is perfect for batch operation. However, its should be called exclusively - other operations on a layer should not be performed upon use of direct write operation.

Example

Delphi

var
  lv : TGIS_LayerSHP ;
begin
  // create a new layer, initialize and use in helper
  drh := TGIS_LayerVectorDirectWriteHelper.Create( lv ) ;
  try
    drh.Build( 'c:\tmp\drtest.shp', la.Extent,
               la.DefaultShapeType, la.DefaultDimension
              );
    // write all shapes from another layer
    for shp in la.Loop do
      drh.AddShape( shp ) ;
 
    drh.Close ;
  finally
    FreeObject( drh ) ;
  end ;
end ;

References

2019/08/13 10:50