Exemplo n.º 1
0
        void IVisitor.Visit(IAlgorithm alg)
        {
            //thong tin bang dau:from,by,result duoc dua vao bag truoc
            //khi xet den thuat toan 2, from,result cua bag la result cua thuat toan 1
            //by cua thuat toan tu cai dat san truoc khi duoc visit
            ISpatialBag spBag=(ISpatialBag)this._bag;
            alg.SetResultLayer(spBag.ResultFeatureLayer);
            //MessageBox.Show(_index.ToString());
            ISpatialAlgrorithm spAlg = (ISpatialAlgrorithm)alg;
            //spAlg.SetLayers(spBag.FromFeatureLayer, spBag.ByFeatureLayer);
            spAlg.FromLayer = spBag.FromFeatureLayer;
            spAlg.SetResultLayer(spBag.ResultFeatureLayer);

            spBag.ResultSelectionSet = spAlg.Execute();

            spBag.ResultFeatureLayer = spAlg.GetResultLayer();
            spBag.FromFeatureLayer = spAlg.GetResultLayer();
            _index++;
        }