TatukGIS menu

Knowledge Base





KB10332 - Get the number of shapes in a layer or within a scope.

There is no such thing as a shape count. Querying for an object requires, in fact, the traversing of whole layer (in order to skip deleted shapes, out of scope shapes, etc). But you can use:


 lastpos := layer.GetLastUid ; // first time you will call this can be time consuming

 layer.MoveFirst ;
 while ... begin
  percentage = ( layer.Shape.Uid. * 100 ) div last_pos
 end ;
 ... ]
Created: November 21, 2003, Modified: August 03, 2015