Example #1
0
        private void Initialize(string layerName, IFeatureDataSource dataSource, VisualParameters parameters, LayerType type, RenderingApproach rendering,
                                RasterizationApproach toRasterTechnique, ScaleInterval visibleRange,
                                SimplePointSymbol pointSymbol, LabelParameters labeling)
        {
            this.Id = Guid.NewGuid();

            this.DataSource = dataSource;

            this.Rendering = rendering;

            this.ToRasterTechnique = toRasterTechnique;

            var geometries = dataSource.GetGeometries();

            if (geometries.Count > 0)
            {
                this.Type = type | GetGeometryType(geometries.FirstOrDefault());
            }
            else
            {
                this.Type = type;
            }

            this.Extent = geometries.GetBoundingBox();

            this.LayerName = layerName;

            this.VisualParameters = parameters;

            this.PointSymbol = pointSymbol ?? new SimplePointSymbol()
            {
                SymbolWidth = 4, SymbolHeight = 4
            };

            //this.PositionFunc = positionFunc;

            this.Labels = labeling;

            //Check for missing visibleRange
            if (this.Labels != null)
            {
                if (this.Labels.VisibleRange == null)
                {
                    this.Labels.VisibleRange = visibleRange;
                }
            }

            this.VisibleRange = (visibleRange == null) ? ScaleInterval.All : visibleRange;
        }
Example #2
0
 public VectorLayer(string layerName, IFeatureDataSource dataSource, VisualParameters parameters, LayerType type, RenderingApproach rendering,
                    RasterizationApproach toRasterTechnique, ScaleInterval visibleRange, SimplePointSymbol pointSymbol = null, LabelParameters labeling = null)
 {
     Initialize(layerName, dataSource, parameters, type, rendering, toRasterTechnique, visibleRange, pointSymbol, labeling);
 }
 /// <summary>
 /// Creates a new PrincipalComponentAnalysis
 /// for a given feature data source
 /// </summary>
 /// <param name="sampleFeatureSet">The set of features</param>
 public PrincipalComponentAnalysis(IFeatureDataSource sampleFeatureSet)
 {
     _sampleFeatureSet = sampleFeatureSet;
 }