Hi, everybody,
I want to use two feature iterators (XfmFeatureIteratorP) at the same time.
I'd like to know if it is possible to use one iterator within another?
In my example program ends at the line:
xfmFeatureIterator_getNext(iterator, &feature);
in locate1() procedure. I suppose it's caused by running the second iterator in locate2() or by the second XfmLocateOp.
Am I right?
Regards,
Mariusz
Example (I have removed all necessary code to make the example clearer):
void locate1(XfmLocateOpP locateOp) {
XfmFeatureIteratorP iterator1 = NULL;
XfmFeatureP feature;
int status;
status = xfmLocateOp_getLocatedFeatures (locateOp, &iterator);
status = xfmFeatureIterator_getFirst (iterator, &feature);
while(feature != NULL) {
procedure1(feature);
xfmFeature_free (&feature);
}
xfmFeatureIterator_free (&iterator);
void procedure1(XfmFeatureP feature)
{
XfmLocateOpP locateOp = NULL;
status = xfmLocateOp_create (&locateOp); if (SUCCESS != status) { return status; }
xfmCmdMgr_startLocateOperation (locateOp, locate2, NULL, NULL, NULL, NULL);
void locate2(XfmLocateOpP locateOp) {
// do something