User Tools

Site Tools


api:dk11:delphi:gislayervector.tgis_layervector.foreach_tgis_extent_string_tgis_shape_string_boolean_double_tgis_foreachshapeevent

Table of Contents

TGIS_LayerVector.ForEach method

DK11 for Delphi | GisLayerVector.TGIS_LayerVector.ForEach | Constructors | Fields | Methods | Properties | Events

Fetch all shapes from the layer using callback function.

Available also on: .NET | Java | ActiveX.

Syntax

// Delphi
public
  function ForEach(
    const _extent : TGIS_Extent;
    const _query : String;
    const _shape : TGIS_Shape;
    const _de9im : String;
    const _skipDeleted : Boolean;
    const _scale : Double;
    const _callback : TGIS_ForEachShapeEvent
  ) : Boolean; virtual;
// C++ Builder
public:
  virtual bool ForEach(
    TGIS_Extent* const _extent,
    const UnicodeString _query,
    TGIS_Shape* const _shape,
    const UnicodeString _de9im,
    const bool _skipDeleted,
    const double _scale,
    TGIS_ForEachShapeEvent* const _callback
  );

Parameters

Name Type Description
_extent TGIS_Extent extent of items to be found; expected _extent units are in a Layer coordinate space
_query String query which must be matched by item; closely mimics SQL WHERE clause; for examples you can use 'AGE >= 18'; empty (default) means that no items will match.
_shape TGIS_Shape if not nil, then only shapes matched _de9im matrix with _shape will be found
_de9im String DE-9IM matrix of comparison
_skipDeleted Boolean set a skip deleted treatment; by default deleted items will be ignored
_scale Double required to properly prepare shape parameters according ParamsList section visibility; meaningless if layer is not attached to the Viewer
_callback TGIS_ForEachShapeEvent procedure to be called on each shape

Result

Type Description
Boolean True if all shapes are passed. False if operation was interrupted.

Remarks

Fetched shapes will have colors, sizes parameters setup according to rendering layout

2019/09/27 01:09