Exemple #1
0
        public void TestConstructor()
        {
            var css = new CoordinateSystemServices(new CoordinateSystemFactory(Encoding.UTF8),
                                                   new CoordinateTransformationFactory());

            Assert.IsNotNull(css.GetCoordinateSystem(4326));
            Assert.IsNotNull(css.GetCoordinateSystem(3857));
        }
 private static void FromEnumeration(CoordinateSystemServices css,
                                     IEnumerable <KeyValuePair <int, ICoordinateSystem> > enumeration)
 {
     foreach (var sridCs in enumeration)
     {
         css.AddCoordinateSystem(sridCs.Key, sridCs.Value);
     }
 }
Exemple #3
0
        public void TestConstructorLoadXml(string xmlPath)
        {
            if (!File.Exists(xmlPath))
            {
                throw new IgnoreException("Specified file not found");
            }

            var css = new CoordinateSystemServices(new CoordinateSystemFactory(Encoding.UTF8),
                                                   new CoordinateTransformationFactory(), LoadXml(xmlPath));

            Assert.IsNotNull(css.GetCoordinateSystem(4326));
            Assert.IsNotNull(css.GetCoordinateSystem("EPSG", 4326));
            Assert.IsTrue(ReferenceEquals(css.GetCoordinateSystem("EPSG", 4326), css.GetCoordinateSystem(4326)));
        }
 private static void FromEnumeration(CoordinateSystemServices css,
                                     IEnumerable <KeyValuePair <int, string> > enumeration)
 {
     FromEnumeration(css, CreateCoordinateSystems(css._coordinateSystemFactory, enumeration));
 }