Ejemplo n.º 1
0
        private IGrid ReadGridFromFile(int gridNo)
        {
            Envelope evp = _gridStateIndicator.GetEnvelope(gridNo);

            Feature[] fets = _reader.GetFeatures(evp);
            if (fets != null && fets.Length > 0)
            {
                fets = TrySplit(fets);
                if (fets == null)
                {
                    return(null);
                }
                evp = fets[0].Geometry.Envelope.Clone() as Envelope;
                foreach (Feature fet in fets)
                {
                    fet.SetFeatureClass(_featureClass);
                    evp.UnionWith(fet.Geometry.Envelope);
                }
                return(new Grid(gridNo, evp, fets));
            }
            return(new Grid(gridNo, evp, null));
        }