示例#1
0
        /// <summary>
        /// Initializes a new layer
        /// </summary>
        /// <param name="layername">Name of layer</param>
        public VectorLayer(string layername)
        {
            SimplifyGeometryDuringRendering = true;
            SkipRenderingOfVerySmallFeatures = true;

            name = layername;
            // smoothingMode = SmoothingMode.AntiAlias;
            smoothingMode = SmoothingMode.HighSpeed;
            FeatureEditor = new FeatureEditor();
        }
示例#2
0
        /// <summary>
        /// initialize a Gdal based raster layer
        /// </summary>
        /// <param name="name">Name of layer</param>
        /// <param name="path">location of image</param>
        public GdalRasterLayer(string name, string path)
        {
            base.Name = name;

            CustomRenderers.Clear();
            CustomRenderers.Add(new GdalRenderer(this)); // add optimized custom gdal renderer

            if (path == null)
            {
                return;
            }

            var rasterFeatureProvider = new GdalFeatureProvider();

            rasterFeatureProvider.Open(path);

            DataSource = rasterFeatureProvider;

            FeatureEditor = new FeatureEditor();
        }
示例#3
0
 /// <summary>
 /// Creates a clone of the vectorlayer given as parameter to the constructor
 /// </summary>
 /// <param name="layer"></param>
 public VectorLayer(VectorLayer layer)
 {
     if (layer != null)
     {
         if (layer.Style != null)
         {
             style = (VectorStyle) layer.Style.Clone();
             isStyleDirty = true;
         }
         
         name = layer.Name;
     }
     
     smoothingMode = SmoothingMode.HighSpeed;
     FeatureEditor = new FeatureEditor();
     SimplifyGeometryDuringRendering = layer.SimplifyGeometryDuringRendering;
     SkipRenderingOfVerySmallFeatures = layer.SkipRenderingOfVerySmallFeatures;
     CoordinateSystem = layer.CoordinateSystem;
     CoordinateTransformation = layer.CoordinateTransformation;
 }
 public RegularGridCoverageLayer()
 {
     FeatureEditor = new FeatureEditor();
 }