public void TestCoordinateSystemForProvider(int srid)
        {
            var map = new GeometryFeatureProvider(new FeatureDataTable()) { SRID = srid };
            ICoordinateSystem cs = null;
            Assert.DoesNotThrow(() => cs = map.GetCoordinateSystem());
            Assert.NotNull(cs);
            Assert.AreEqual("EPSG", cs.Authority);
#if DotSpatialProjections
            Assert.AreEqual((long)srid, cs.Authority);
#else
            Assert.AreEqual((long)srid, cs.AuthorityCode);
#endif
        }
Beispiel #2
0
        public void MultiLineCenterAlignedTest()
        {
            using (var m = new SharpMap.Map(new Size(600, 400)))
            {
                m.BackColor = Color.SeaShell;
                //_featureDataTable.Clear();
                var gfp = new GeometryFeatureProvider(_featureDataTable);
                var vl = new VectorLayer("VL", gfp);
                var ll = new LabelLayer("MultiLineCenterAligned") {DataSource = gfp};
                ll.Theme = CreateTheme();
                ll.LabelColumn = "LABEL";
                m.Layers.Add(vl);
                m.Layers.Add(ll);

                m.ZoomToExtents();
                using (var mapImage = m.GetMap())
                    mapImage.Save("MultiLineCenterAligned.png", ImageFormat.Png);
            }
        }