DK11 for Delphi | GisLayerVector.TGIS_LayerVectorDirectWriteHelper | Classes | Constructors | Methods | Properties
Helper for direct writing into a layer storage.
// Delphi type TGIS_LayerVectorDirectWriteHelper = class end;
// C++ Builder class PASCALIMPLEMENTATION TGIS_LayerVectorDirectWriteHelper
Name | Visibility | Description | |
---|---|---|---|
AddShape | public | Adds a new shape to a storage. | |
Build | public | Builds new layer - prepares storage for direct writing. | |
Close | public | Finalizes direct writing into a layer storage. | |
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.
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 ;