コード例 #1
0
        public override CoordinateSystemDefinitionBase[] EnumerateCoordinateSystems(string category)
        {
            CoordinateSystemCategory cat = null;

            foreach (CoordinateSystemCategory csc in this.Categories)
            {
                if (csc.Name == category)
                {
                    cat = csc;
                    break;
                }
            }

            if (cat == null)
            {
                return(new CoordinateSystemDefinitionBase[0]);
            }

            string      req = this.RequestBuilder.EnumerateCoordinateSystems(category);
            XmlDocument doc = new XmlDocument();

            doc.Load(m_con.OpenRead(req));
            XmlNodeList lst = doc.SelectNodes("BatchPropertyCollection/PropertyCollection");

            CoordinateSystemDefinitionBase[] data = new CoordinateSystemDefinitionBase[lst.Count];
            for (int i = 0; i < lst.Count; i++)
            {
                data[i] = new HttpCoordinateSystemDefinition(cat, lst[i]);
            }

            return(data);
        }
コード例 #2
0
        public override CoordinateSystem.CoordinateSystemDefinitionBase[] EnumerateCoordinateSystems(string category)
        {
            CoordinateSystemCategory cat = null;
            foreach (CoordinateSystemCategory csc in this.Categories)
            {
                if (csc.Name == category)
                {
                    cat = csc;
                    break;
                }
            }

            if (cat == null)
                return new CoordinateSystemDefinitionBase[0];

            string req = this.RequestBuilder.EnumerateCoordinateSystems(category);
            XmlDocument doc = new XmlDocument();
            doc.Load(m_con.OpenRead(req));
            XmlNodeList lst = doc.SelectNodes("BatchPropertyCollection/PropertyCollection");
            CoordinateSystemDefinitionBase[] data = new CoordinateSystemDefinitionBase[lst.Count];
            for (int i = 0; i < lst.Count; i++)
                data[i] = new HttpCoordinateSystemDefinition(cat, lst[i]);

            return data;
        }