User Tools

Site Tools


api:dk11:net:tatukgis.ndk.tgis_layervector.centroidscope_string_tgis_point

Table of Contents

TGIS_LayerVector.CentroidScope method

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

Calculate a centroid for a scope.

Available also on: Delphi | Java | ActiveX.

Syntax

// 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
public
  function CentroidScope(
    _query : String;
    _centroid : TGIS_Point
  ) : TGIS_Point;

Parameters

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

Result

Type Description
TGIS_Point Found centroid or untouched _centroid value.

Remarks

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

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

2019/06/20 01:19