Exemplo n.º 1
0
        public FeatureCoverageLayer()
        {
            this.featureCollection = new FeatureCollection();

            // Use the VectorLayer with the custom featureRenderer to render this feature coverage (using values form the data store)
            featureCoverageRenderer = new FeatureCoverageRenderer();
        }
Exemplo n.º 2
0
        public FeatureCoverageLayer(FeatureCoverageRenderer renderer)
        {
            featureCollection = new FeatureCollection();

            // Use the VectorLayer with the custom featureRenderer to render this feature coverage (using values form the data store)
            Renderer = renderer;
            CustomRenderers.Add(renderer);

            AutoUpdateThemeOnDataSourceChanged = true;
        }
        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);
        }