Ejemplo n.º 1
0
        private void Identify(IEnumerable <ILayer> layers, Extent strict, Extent tolerant)
        {
            if (layers is IGroup)
            {
                layers = layers.Reverse();
            }
            foreach (var lr in layers)
            {
                var grp = lr as IGroup;
                if (grp != null)
                {
                    Identify(grp, strict, tolerant);
                }
                else
                {
                    var gfl = lr as IMapFeatureLayer;
                    if (gfl != null && gfl.IsVisible /*CGX*/ && gfl.SelectionEnabled)
                    {
                        _frmFeatureIdentifier.Add(gfl, gfl.DataSet.FeatureType == FeatureType.Polygon ? strict : tolerant);
                        continue;
                    }

                    var rl = lr as IMapRasterLayer;
                    if (rl != null)
                    {
                        _frmFeatureIdentifier.Add(rl, strict);
                    }
                }
            }
        }
Ejemplo n.º 2
0
        private void Identify(IEnumerable <ILayer> layers, Extent strict, Extent tolerant)
        {
            foreach (IMapLayer layer in layers)
            {
                IGroup grp = layer as IGroup;
                if (grp != null)
                {
                    Identify(grp, strict, tolerant);
                }
                else
                {
                    var gfl = layer as IMapFeatureLayer;
                    if (gfl != null)
                    {
                        if (gfl.DataSet.FeatureType == FeatureType.Polygon)
                        {
                            _frmFeatureIdentifier.Add(gfl, strict);
                        }
                        else
                        {
                            _frmFeatureIdentifier.Add(gfl, tolerant);
                        }
                    }

                    var rl = layer as IMapRasterLayer;
                    if (rl != null)
                    {
                        _frmFeatureIdentifier.Add(rl, strict);
                    }
                }
            }
        }
Ejemplo n.º 3
0
        private void Identify(IEnumerable <ILayer> layers, Extent strict, Extent tolerant)
        {
            if (layers is IGroup)
            {
                layers = layers.Reverse();
            }
            foreach (var lr in layers)
            {
                if (lr is IGroup grp)
                {
                    Identify(grp, strict, tolerant);
                }
                else
                {
                    if (lr is IMapFeatureLayer gfl && gfl.IsVisible)
                    {
                        _frmFeatureIdentifier.Add(gfl, gfl.DataSet.FeatureType == FeatureType.Polygon ? strict : tolerant);
                        continue;
                    }

                    if (lr is IMapRasterLayer rl)
                    {
                        _frmFeatureIdentifier.Add(rl, strict);
                    }
                }
            }
        }
Ejemplo n.º 4
0
        private void Identify(IEnumerable <ILayer> layers, Extent strict, Extent tolerant)
        {
            List <ILayer> layers2 = layers.ToList();

            if (layers is IGroup)
            {
                layers2.Reverse();
            }

            foreach (IMapLayer layer in layers2)
            {
                IGroup grp = layer as IGroup;
                if (grp != null)
                {
                    Identify(grp, strict, tolerant);
                }
                else
                {
                    var gfl = layer as IMapFeatureLayer;
                    if (gfl != null && gfl.IsVisible)
                    {
                        if (gfl.DataSet.FeatureType == FeatureType.Polygon)
                        {
                            if (true == _frmFeatureIdentifier.Add(gfl, strict))
                            {
                                return;
                            }
                        }
                        else
                        {
                            if (true == _frmFeatureIdentifier.Add(gfl, tolerant))
                            {
                                return;
                            }
                        }
                    }

                    var rl = layer as IMapRasterLayer;
                    if (rl != null)
                    {
                        _frmFeatureIdentifier.Add(rl, strict);
                    }
                }
            }
        }