Esempio n. 1
0
        public void RenderFeatureCoverageWithNoTimes()
        {
            var featureCoverage = new FeatureCoverage {
                IsTimeDependent = true
            };

            //define a

            featureCoverage.Arguments.Add(new Variable <SimpleFeature>("feature")); // 1st dimension is feature
            featureCoverage.Components.Add(new Variable <double>());

            featureCoverage[new DateTime(2000, 1, 1), new SimpleFeature(2, new Point(1, 1))] = 10.0;

            var featureCoverageRenderer = new FeatureCoverageRenderer();
            var image = new Bitmap(100, 100, PixelFormat.Format32bppPArgb);

            var graphics             = Graphics.FromImage(image);
            var featureCoverageLayer = new FeatureCoverageLayer {
                Coverage = featureCoverage, Map = new Map(new Size(100, 100))
            };

            featureCoverage.Time.Values.Clear();//remove all time values
            //render
            featureCoverageRenderer.Render(featureCoverage, graphics, featureCoverageLayer);
        }
Esempio n. 2
0
 /// <summary>
 /// Renders the layer's coverage features to a graphics object
 /// </summary>
 /// <param name="g">Graphics object reference</param>
 /// <param name="map">Map which is rendered</param>
 public override void OnRender(Graphics g, IMap map)
 {
     // Use the FeatureCoverageRenderer to render the actual applicable features
     Renderer.Render(featureCoverage, g, this);
 }