Iterating layer features in mapscript effectively

Tamas Szekeres szekeres.tamas at FREEMAIL.HU
Wed Sep 28 17:32:41 EDT 2005


Hi list,

I would like to iterate the features of the layers with mapscript in order
to represent the attributes (of the features drawn) in table format for
the user. I think the most effective way of this work would be supporting
the proper functions could be mapped to msLayerWhichShapes and
msLayerNextShape similar to msDrawLayer accesses features. The only way I
could find is to call layeobj.getFeature which calls msLayerGetShape to
provide random access to features, however there is no interface to find
out the range of valid record numbers.
Performing querying by rect would be an other way, but it involves much of
overhead by copying all of the features into the result cache.

Could anyone suggest a feasible soution for this issue?

Thanks,

Tamas Szekeres



More information about the mapserver-dev mailing list