VECQueryAttribute

Demonstrates how to query attributes.

Remarks

This example illustrates how to extract a list of all shapes with an area greater than 44000. Then from the extracted list, retrieve those shapes that have a perimeter value greater than 200.

Code

  local int layer
 local int  tfid

 local int ptr ShapeArray
 local int ptr ShapeArray2

 tfid = DBOpen( GetPCIHOME() + "/demo/irvine.pix", "r")

 layer = 31

 ShapeArray = VECQueryAttribute(tfid, layer, "AREA > 44000")

 print "Number of shapes: ", F$Len(ShapeArray)

 ShapeArray2 = VECQueryAttribute(tfid, layer, "PERIMETER > 200", ShapeArray, 10)

 print "Number of shapes: ", F$Len(ShapeArray2)

 call DBClose(tfid)

 call EFree( ShapeArray )
 call EFree( ShapeArray2 )

Output

 Number of shapes:            216 
 Number of shapes:            10

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