User Tools

Site Tools


Table of Contents

TGIS_LayerVector.CentroidScope method

DK11 for .NET | TatukGIS.NDK.TGIS_LayerVector.CentroidScope | Constructors | Fields | Methods | Properties | Events

Calculates a centroid for a scope.

Available also on: Delphi | Java | ActiveX.


// C#
public TGIS_Point CentroidScope(
  string _query,
  TGIS_Point _centroid
' VisualBasic
Public Function CentroidScope(
  ByVal _query As String,
  ByVal _centroid As TGIS_Point
) As TGIS_Point
// Oxygene
  function CentroidScope(
    _query : String;
    _centroid : TGIS_Point
  ) : TGIS_Point;


Name Type Description
_query string
Query closely mimics the SQL WHERE clause
_centroid TGIS_Point Current centroid - to be returned if not found


Type Description
TGIS_Point Found centroid or untouched _centroid value.


Use this method to calculate a centroid for a scope. It, in fact, finds the centroid for the first shape.

When using this operation, never call any function which uses FindFirst..FindNext (i.e., any function which iterates through the shapes using it). So never use it inside an operation like Locate etc.

2020/12/18 01:18

Page Tools