A sample class

The following definition creates a class called VLShape, that allows simplified access to a shape within a vector layer. It is built on top of the EASI vector intrinsics functions. It serves as an example of defining and using a class. It includes the use of the Initialize() and Destroy() methods, as well as the GetDynamicField() and SetDynamicField() methods.

The complete definition of VLShape includes the class declaration, which holds various information about the file and vectors being accessed, and the definition of 8 methods. These include an Open() and Close() method for initiating and terminating access to a database file, First() and Next() methods for iterating between shapes in a vector layer, GetVertices() and SetVertices() methods for manipulating vertex lists, and finally the dynamic field methods for accessing attribute fields belonging to a shape directly, as if they were fields within the class definition.

© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.