• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# SharpMap类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中SharpMap的典型用法代码示例。如果您正苦于以下问题:C# SharpMap类的具体用法?C# SharpMap怎么用?C# SharpMap使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



SharpMap类属于命名空间,在下文中一共展示了SharpMap类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: GetObjectIDsInView

      public System.Collections.Generic.List<uint> GetObjectIDsInView(SharpMap.Geometries.BoundingBox bbox)
      {
            Collection<uint> objectlist = new Collection<uint>();
            using (SQLiteConnection conn = new SQLiteConnection(_ConnectionString))
            {
                string strSQL = "SELECT " + this.ObjectIdColumn + " ";
                strSQL += "FROM " + this.Table + " WHERE ";

                strSQL += GetBoxClause(bbox);

                if (!String.IsNullOrEmpty(_defintionQuery))
                    strSQL += " AND " + this.DefinitionQuery + " AND ";

                using (SQLiteCommand command = new SQLiteCommand(strSQL, conn))
                {
                    conn.Open();
                    using (SQLiteDataReader dr = command.ExecuteReader())
                    {
                        while (dr.Read())
                        {
                            if (dr[0] != DBNull.Value)
                            {
                                uint ID = (uint)(int)dr[0];
                                objectlist.Add(ID);
                            }
                        }
                    }
                    conn.Close();
                }
            }
            return objectlist;
        }
开发者ID:diegowald,项目名称:intellitrack,代码行数:32,代码来源:SqlLite.cs


示例2: GetGeometriesInView

        public System.Collections.Generic.List<SharpMap.Geometries.Geometry> GetGeometriesInView(SharpMap.Geometries.BoundingBox bbox)
        {
            Collection<SharpMap.Geometries.Geometry> features = new Collection<IGeometry>();
            using (SQLiteConnection conn = new SQLiteConnection(_ConnectionString))
            {
                string BoxIntersect = GetBoxClause(bbox);

                string strSQL = "SELECT " + this.GeometryColumn + " AS Geom ";
                strSQL += "FROM " + this.Table + " WHERE ";
                strSQL += BoxIntersect;
                if (!String.IsNullOrEmpty(_defintionQuery))
                    strSQL += " AND " + this.DefinitionQuery;

                using (SQLiteCommand command = new SQLiteCommand(strSQL, conn))
                {
                    conn.Open();
                    using (SQLiteDataReader dr = command.ExecuteReader())
                    {
                        while (dr.Read())
                        {
                            if (dr[0] != DBNull.Value)
                            {
                                IGeometry geom = SharpMap.Converters.WellKnownText.GeometryFromWKT.Parse((string)dr[0]);
                                if (geom != null)
                                    features.Add(geom);
                            }
                        }
                    }
                    conn.Close();
                }
            }
            return features;
        }
开发者ID:diegowald,项目名称:intellitrack,代码行数:33,代码来源:SqlLite.cs


示例3: CreateLabel

    protected override SharpMap.Rendering.Label CreateLabel(SharpMap.Geometries.Geometry feature, string text, float rotation, SharpMap.Styles.LabelStyle style, Map map, System.Drawing.Graphics g)
    {
      //System.Drawing.SizeF size = g.MeasureString(text, style.Font);

      System.Drawing.PointF position = map.WorldToImage(feature.GetBoundingBox().GetCentroid());
      //position.X = position.X - size.Width * (short)style.HorizontalAlignment * 0.5f;
      //position.Y = position.Y - size.Height * (short)style.VerticalAlignment * 0.5f;
      if (position.X /*- size.Width*/ > map.Size.Width || position.X /*+ size.Width */< 0 ||
        position.Y /*- size.Height*/ > map.Size.Height || position.Y /*+ size.Height*/ < 0)
        return null;
      else
      {
        SharpMap.Rendering.Label lbl;

        if (!style.CollisionDetection)
          lbl = new SharpMap.Rendering.Label(text, position, rotation, this.Priority, null, style);
        else
        {
          //Collision detection is enabled so we need to measure the size of the string
          lbl = new SharpMap.Rendering.Label(text, position, rotation, this.Priority,
            new SharpMap.Rendering.LabelBox(position.X /*- size.Width * 0.5f*/ - style.CollisionBuffer.Width, position.Y + /*size.Height * 0.5f*/ + style.CollisionBuffer.Height,
            /*size.Width +*/ 2f * style.CollisionBuffer.Width, /*size.Height +*/ style.CollisionBuffer.Height * 2f), style);
        }
        if (feature.GetType() == typeof(SharpMap.Geometries.LineString))
        {
          SharpMap.Geometries.LineString line = feature as SharpMap.Geometries.LineString;
          if (line.Length / map.PixelSize > 40/*size.Width*/) //Only label feature if it is long enough
            CalculateLabelOnLinestring(line, ref lbl, map);
          else
            return null;
        }

        return lbl;
      }
    }
开发者ID:diegowald,项目名称:intellitrack,代码行数:35,代码来源:HtmlLabel.cs


示例4: FindGeoNearPoint

        public static SharpMap.Data.FeatureDataRow FindGeoNearPoint(
            GeoAPI.Geometries.IPoint point, SharpMap.Layers.VectorLayer layer, double amountGrow)
        {
            var box = new GeoAPI.Geometries.Envelope(point.Coordinate);
            box.ExpandBy(amountGrow);

            var fds = new SharpMap.Data.FeatureDataSet();
            layer.DataSource.ExecuteIntersectionQuery(box, fds);

            SharpMap.Data.FeatureDataRow result = null;
            var minDistance = double.MaxValue;

            foreach (SharpMap.Data.FeatureDataTable fdt in fds.Tables)
            {
            foreach (SharpMap.Data.FeatureDataRow fdr in fdt.Rows)
            {
            if (fdr.Geometry != null)
            {
                var distance = point.Distance(fdr.Geometry);
                if (distance < minDistance)
                {
                    result = fdr;
                    minDistance = distance;
                }
            }
            }
            }
            return result;
        }
开发者ID:geobabbler,项目名称:SharpMap,代码行数:29,代码来源:GeometryFeatureProviderTest.cs


示例5: GetPieChart

    /// <summary>
    /// Method for creating pie chart symbols
    /// </summary>
    /// <remarks>
    /// <para>In this example we just create some random pie charts, 
    /// but it probably should be based on attributes read from the row.</para>
    ///	<para>Credits goes to gonzalo_ar for posting this in the forum</para></remarks>
    /// <param name="row"></param>
    /// <returns></returns>
    private static Bitmap GetPieChart(SharpMap.Data.FeatureDataRow row)
    {

        // Replace polygon with a center point (this is where we place the symbol
        row.Geometry = row.Geometry.GetBoundingBox().GetCentroid();

        // Just for the example I use random values 
        int size = rand.Next(20, 35);
        int angle1 = rand.Next(60, 180);
        int angle2 = rand.Next(angle1 + 60, 300);
        Rectangle rect = new Rectangle(0, 0, size, size);
        System.Drawing.Bitmap b = new Bitmap(size, size);
        Graphics g = Graphics.FromImage(b);

        // Draw Pie 
        g.FillPie(Brushes.LightGreen, rect, 0, angle1);
        g.FillPie(Brushes.Pink, rect, angle1, angle2 - angle1);
        g.FillPie(Brushes.PeachPuff, rect, angle2, 360 - angle2);

        // Draw Borders 
        g.DrawPie(Pens.Green, rect, 0, angle1);
        g.DrawPie(Pens.Red, rect, angle1, angle2 - angle1);
        g.DrawPie(Pens.Orange, rect, angle2, 360 - angle2);
        g.Dispose();
        return b;
    }
开发者ID:lishxi,项目名称:_SharpMap,代码行数:35,代码来源:PieCharts.aspx.cs


示例6: getGeom

 public IEnumerable<SharpMap.Geometries.Geometry> getGeom(SharpMap.Geometries.GeometryCollection g)
 {
     foreach (SharpMap.Geometries.Geometry geo in g.Collection)
     {
         yield return geo;
     }
 }
开发者ID:goranpavlovic,项目名称:Gis,代码行数:7,代码来源:SpatialQuery.cs


示例7: OnRenderInternal

    /// <summary>
    /// Method to place the street direction symbols
    /// </summary>
    /// <param name="map"></param>
    /// <param name="lineString"></param>
    /// <param name="graphics"></param>
    private void OnRenderInternal(SharpMap.Map map, GeoAPI.Geometries.ILineString lineString,
        System.Drawing.Graphics graphics)
    {

        var length = lineString.Length;
        var lil = new NetTopologySuite.LinearReferencing.LengthIndexedLine(lineString);
        if (length < RepeatInterval + ArrowLength)
        {
            var start = System.Math.Max(0, (length - ArrowLength)/2);
            var end = System.Math.Min(length, (length + ArrowLength)/2);
            var arrow = (GeoAPI.Geometries.ILineString) lil.ExtractLine(start, end);

            RenderArrow(map, graphics, arrow);

            return;
        }

        var numArrows = (int) ((lineString.Length - ArrowLength)/RepeatInterval);
        var offset = (lineString.Length - numArrows*RepeatInterval - ArrowLength)*0.5;

        while (offset + ArrowLength < lineString.Length)
        {
            var arrow = (GeoAPI.Geometries.ILineString) lil.ExtractLine(offset, offset + ArrowLength);
            RenderArrow(map, graphics, arrow);
            offset += RepeatInterval;
        }

    }
开发者ID:lishxi,项目名称:_SharpMap,代码行数:34,代码来源:LineSymbolizerTest.cs


示例8: RenderArrow

 /// <summary>
 /// Method to render the arrow
 /// </summary>
 /// <param name="map">The map</param>
 /// <param name="graphics">The graphics object</param>
 /// <param name="arrow">The arrow</param>
 private void RenderArrow(SharpMap.Map map, System.Drawing.Graphics graphics, GeoAPI.Geometries.ILineString arrow)
 {
     var pts = new System.Drawing.PointF[arrow.Coordinates.Length];
     for (var i = 0; i < pts.Length; i++)
         pts[i] = map.WorldToImage(arrow.GetCoordinateN(i));
     graphics.DrawLines(ArrowPen, pts);
 }
开发者ID:lishxi,项目名称:_SharpMap,代码行数:13,代码来源:LineSymbolizerTest.cs


示例9: ChangeTool

        private void ChangeTool(SharpMap.Forms.MapImage.Tools tool)
        {
            _mapImage.ActiveTool = tool;

            _view.SelectChecked = false;
            _view.ZoomInChecked = false;
            _view.ZoomOutChecked = false;
            _view.PanChecked = false;

            switch (tool)
            {
                case SharpMap.Forms.MapImage.Tools.Pan:
                    _view.PanChecked = true;
                    break;
                case SharpMap.Forms.MapImage.Tools.ZoomIn:
                    _view.ZoomInChecked = true;
                    break;
                case SharpMap.Forms.MapImage.Tools.ZoomOut:
                    _view.ZoomOutChecked = true;
                    break;
                case SharpMap.Forms.MapImage.Tools.Query:
                    _view.SelectChecked = true;
                    break;
            }
        }
开发者ID:stophun,项目名称:fdotoolbox,代码行数:25,代码来源:FdoMapPreviewPresenter.cs


示例10: SplitLineString

public SharpMap.Geometries.MultiLineString SplitLineString(
    SharpMap.Geometries.LineString lineString, 
    System.Double length)
{
    if (lineString == null || lineString.IsEmpty())
        throw new System.ArgumentException("Linestring is null or Empty", "lineString");

    var gf = new NetTopologySuite.Geometries.GeometryFactory();
    var ntsLine = (NetTopologySuite.Geometries.LineString)
                    SharpMap.Converters.NTS.GeometryConverter.ToNTSGeometry(lineString, gf);

    var ret = new SharpMap.Geometries.MultiLineString();
    var lil = new NetTopologySuite.LinearReferencing.LengthIndexedLine(ntsLine);

    double currentLength = 0d;
    while (currentLength  < ntsLine.Length)
    {
        var tmpLine = (NetTopologySuite.Geometries.LineString)
            lil.ExtractLine(currentLength, currentLength + length);
        ret.LineStrings.Add((SharpMap.Geometries.LineString)
            SharpMap.Converters.NTS.GeometryConverter.ToSharpMapGeometry(tmpLine));
        currentLength += length;
    }
    return ret;
}
开发者ID:lishxi,项目名称:_SharpMap,代码行数:25,代码来源:LengthIndexedLineSample.cs


示例11: CreateTab

 private void CreateTab(SharpMap.Data.FeatureDataTable featureDataTable)
 {
   this.tabControl1.TabPages.Add(featureDataTable.TableName, featureDataTable.TableName);
   System.Windows.Forms.DataGridView dv = new DataGridView();
   dv.AllowUserToAddRows = false;
   dv.AllowUserToDeleteRows = false;
   dv.AllowUserToOrderColumns = true;
   dv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
   dv.Font = this.Font;
   dv.DataBindingComplete += new DataGridViewBindingCompleteEventHandler(dv_DataBindingComplete);
   dv.Dock = System.Windows.Forms.DockStyle.Fill;
   dv.Location = new System.Drawing.Point(3, 3);
   dv.Name = "dvSelection";
   dv.ReadOnly = true;
   dv.Size = new System.Drawing.Size(278, 234);
   dv.TabIndex = 1;
   dv.VirtualMode = true;
   dv.CellValueNeeded += new DataGridViewCellValueEventHandler(dv_CellValueNeeded);
   dv.CellDoubleClick += new DataGridViewCellEventHandler(dv_CellDoubleClick);
   dv.CellClick += new DataGridViewCellEventHandler(dv_CellClick);
   dv.AllowUserToAddRows = false;
   dv.AllowUserToDeleteRows = false;
   dv.AllowUserToOrderColumns = true;
   dv.AllowUserToResizeColumns = true;
   dv.AllowUserToResizeRows = true;
   dv.MultiSelect = false;
   this.tabControl1.TabPages[featureDataTable.TableName].Controls.Add(dv);
   //dv.DataSource = featureDataTable;
   DataSources[featureDataTable.TableName] = featureDataTable;
   SetupRowsAndColumns(dv, featureDataTable);
   dv.Refresh();
 }
开发者ID:diegowald,项目名称:intellitrack,代码行数:32,代码来源:ElementInformation.cs


示例12: DrawPolygon

        /// <summary>
        /// Renders a polygon to the map.
        /// </summary>
        /// <param name="g">Graphics reference</param>
        /// <param name="pol">Polygon to render</param>
        /// <param name="brush">Brush used for filling (null or transparent for no filling)</param>
        /// <param name="pen">Outline pen style (null if no outline)</param>
        /// <param name="clip">Specifies whether polygon clipping should be applied</param>
        /// <param name="map">Map reference</param>
        public static void DrawPolygon(System.Drawing.Graphics g, SharpMap.Geometries.Polygon pol, System.Drawing.Brush brush, System.Drawing.Pen pen, bool clip, SharpMap.Map map)
        {
            if (pol.ExteriorRing == null)
                return;
            if (pol.ExteriorRing.Vertices.Count > 2)
            {
                //Use a graphics path instead of DrawPolygon. DrawPolygon has a problem with several interior holes
                System.Drawing.Drawing2D.GraphicsPath gp = new System.Drawing.Drawing2D.GraphicsPath();

                //Add the exterior polygon
                if (!clip)
                    gp.AddPolygon(pol.ExteriorRing.TransformToImage(map));
                else
                    gp.AddPolygon(clipPolygon(pol.ExteriorRing.TransformToImage(map), map.Size.Width, map.Size.Height));

                //Add the interior polygons (holes)
                for (int i = 0; i < pol.InteriorRings.Count; i++)
                    if (!clip)
                        gp.AddPolygon(pol.InteriorRings[i].TransformToImage(map));
                    else
                        gp.AddPolygon(clipPolygon(pol.InteriorRings[i].TransformToImage(map), map.Size.Width, map.Size.Height));

                // Only render inside of polygon if the brush isn't null or isn't transparent
                if (brush != null && brush != System.Drawing.Brushes.Transparent)
                    g.FillPath(brush, gp);
                // Create an outline if a pen style is available
                if (pen != null)
                    g.DrawPath(pen, gp);
            }
        }
开发者ID:diegowald,项目名称:intellitrack,代码行数:39,代码来源:VectorRenderer.cs


示例13: OnRenderInternal

 protected override void OnRenderInternal(SharpMap.Map map, GeoAPI.Geometries.IPolygon polygon, System.Drawing.Graphics g)
 {
     var pt = polygon.Centroid;
     g.RenderingOrigin =
         System.Drawing.Point.Truncate(SharpMap.Utilities.Transform.WorldtoMap(pt.Coordinate, map));
     base.OnRenderInternal(map, polygon, g);
 }
开发者ID:PedroMaitan,项目名称:sharpmap,代码行数:7,代码来源:PolygonSymbolizerTest.cs


示例14: ToNTSGeometry

        /// <summary>
        /// Converts any <see cref=GisSharpBlog.NetTopologySuite.Geometries.Geometry"/> to the correspondant 
        /// <see cref="SharpMap.Geometries.Geometry"/>.
        /// </summary>
        /// <param name="geometry"></param>
        /// <returns></returns>
        public static GisSharpBlog.NetTopologySuite.Geometries.Geometry ToNTSGeometry(SharpMap.Geometries.Geometry geometry,
            GisSharpBlog.NetTopologySuite.Geometries.GeometryFactory factory)
        {
            if (geometry == null)
                throw new NullReferenceException("geometry");

            if (geometry.GetType() == typeof(SharpMap.Geometries.Point))
                return ToNTSPoint(geometry as SharpMap.Geometries.Point, factory);

            else if (geometry.GetType() == typeof(SharpMap.Geometries.LineString))
                return ToNTSLineString(geometry as SharpMap.Geometries.LineString, factory);

            else if (geometry.GetType() == typeof(SharpMap.Geometries.Polygon))
                return ToNTSPolygon(geometry as SharpMap.Geometries.Polygon, factory);

            else if (geometry.GetType() == typeof(SharpMap.Geometries.MultiPoint))
                return ToNTSMultiPoint(geometry as SharpMap.Geometries.MultiPoint, factory);

            else if (geometry.GetType() == typeof(SharpMap.Geometries.MultiLineString))
                return ToNTSMultiLineString(geometry as SharpMap.Geometries.MultiLineString, factory);

            else if (geometry.GetType() == typeof(SharpMap.Geometries.MultiPolygon))
                return ToNTSMultiPolygon(geometry as SharpMap.Geometries.MultiPolygon, factory);

            else if (geometry.GetType() == typeof(SharpMap.Geometries.GeometryCollection))
                return ToNTSGeometryCollection(geometry as SharpMap.Geometries.GeometryCollection, factory);

            else throw new NotSupportedException("Type " + geometry.GetType().FullName + " not supported");
        }
开发者ID:lishxi,项目名称:_SharpMap,代码行数:35,代码来源:NtsGeometryConverter.cs


示例15: GetCountryStyle

	/// <summary>
	/// This method is used for determining the color of country based on attributes.
	/// It is used as a delegate for the CustomTheme class.
	/// </summary>
	/// <param name="row"></param>
	/// <returns></returns>
	private SharpMap.Styles.VectorStyle GetCountryStyle(SharpMap.Data.FeatureDataRow row)
	{
		SharpMap.Styles.VectorStyle style = new SharpMap.Styles.VectorStyle();
		switch (row["NAME"].ToString().ToLower())
		{
			case "denmark": //If country name is Danmark, fill it with green
				style.Fill = Brushes.Green;
				return style;
			case "united states": //If country name is USA, fill it with Blue and add a red outline
				style.Fill = Brushes.Blue;
				style.Outline = Pens.Red;
				return style;
			case "china": //If country name is China, fill it with red
				style.Fill = Brushes.Red;
				return style;
			default:
				break;
		}
		//If country name starts with S make it yellow
		if (row["NAME"].ToString().StartsWith("S"))
		{
			style.Fill = Brushes.Yellow;
			return style;
		}
		// If geometry is a (multi)polygon and the area of the polygon is less than 30, make it cyan
		else if (row.Geometry.GetType() == typeof(IMultiPolygon) && (row.Geometry as IMultiPolygon).Area < 30 ||
			row.Geometry.GetType() == typeof(IPolygon) && (row.Geometry as IPolygon).Area < 30 )
		{
			style.Fill = Brushes.Cyan;
			return style;
		}
		else //None of the above -> Use the default style
			return null;
	}
开发者ID:lishxi,项目名称:_SharpMap,代码行数:40,代码来源:Bins.aspx.cs


示例16: GetFileName

 private string GetFileName(SharpMap.Geometries.BoundingBox boundingBox)
 {
   return String.Format("{0}/{1}_{2}_{3}_{4}.{5}", directory,
     boundingBox.Left.ToString("r", cultureInfo), boundingBox.Top.ToString("r", cultureInfo),
     boundingBox.Right.ToString("r", cultureInfo), boundingBox.Bottom.ToString("r", cultureInfo),
     "png");
 }
开发者ID:lishxi,项目名称:_SharpMap,代码行数:7,代码来源:TileCacheFileStorage.cs


示例17: DrawLabel

        /// <summary>
        /// Renders a label to the map.
        /// </summary>
        /// <param name="g">Graphics reference</param>
        /// <param name="LabelPoint">Label placement</param>
        /// <param name="Offset">Offset of label in screen coordinates</param>
        /// <param name="font">Font used for rendering</param>
        /// <param name="forecolor">Font forecolor</param>
        /// <param name="backcolor">Background color</param>
        /// <param name="halo">Color of halo</param>
        /// <param name="rotation">Text rotation in degrees</param>
        /// <param name="text">Text to render</param>
        /// <param name="map">Map reference</param>
        public static void DrawLabel(System.Drawing.Graphics g, System.Drawing.PointF LabelPoint, System.Drawing.PointF Offset, System.Drawing.Font font, System.Drawing.Color forecolor, System.Drawing.Brush backcolor, System.Drawing.Pen halo, float rotation, string text, SharpMap.Map map)
        {
            System.Drawing.SizeF fontSize = g.MeasureString(text, font); //Calculate the size of the text
            LabelPoint.X += Offset.X; LabelPoint.Y += Offset.Y; //add label offset
            if (rotation != 0 && rotation != float.NaN)
            {
                g.TranslateTransform(LabelPoint.X, LabelPoint.Y);
                g.RotateTransform(rotation);
                g.TranslateTransform(-fontSize.Width / 2, -fontSize.Height / 2);
                if (backcolor != null && backcolor != System.Drawing.Brushes.Transparent)
                    g.FillRectangle(backcolor, 0, 0, fontSize.Width * 0.74f + 1f, fontSize.Height * 0.74f);
                System.Drawing.Drawing2D.GraphicsPath path = new System.Drawing.Drawing2D.GraphicsPath();
                path.AddString(text, font.FontFamily, (int)font.Style, font.Size, new System.Drawing.Point(0, 0), null);
                if (halo != null)
                    g.DrawPath(halo, path);
                g.FillPath(new System.Drawing.SolidBrush(forecolor), path);
                //g.DrawString(text, font, new System.Drawing.SolidBrush(forecolor), 0, 0);
                g.Transform = map.MapTransform;
            }
            else
            {
                if (backcolor != null && backcolor != System.Drawing.Brushes.Transparent)
                    g.FillRectangle(backcolor, LabelPoint.X, LabelPoint.Y, fontSize.Width * 0.74f + 1, fontSize.Height * 0.74f);

                System.Drawing.Drawing2D.GraphicsPath path = new System.Drawing.Drawing2D.GraphicsPath();

                path.AddString(text, font.FontFamily, (int)font.Style, font.Size, LabelPoint, null);
                if (halo != null)
                    g.DrawPath(halo, path);
                g.FillPath(new System.Drawing.SolidBrush(forecolor), path);
                //g.DrawString(text, font, new System.Drawing.SolidBrush(forecolor), LabelPoint.X, LabelPoint.Y);
            }
        }
开发者ID:jumpinjackie,项目名称:fdotoolbox,代码行数:46,代码来源:VectorRenderer.cs


示例18: GetFeatureDataSet

        /// <summary>
        /// Get FeatureDataSet
        /// </summary>
        /// <param name="ShapeLayer"></param>
        /// <returns></returns>
        public static SharpMap.Data.FeatureDataSet GetFeatureDataSet(SharpMap.Geometries.BoundingBox envelope, 
            SharpMap.Layers.VectorLayer shapeLayer)
        {
            shapeLayer.DataSource.Open();
              shapeLayer.DataSource.ExecuteIntersectionQuery(envelope, _featureData);

              return _featureData;
        }
开发者ID:ZoneDesignSystems,项目名称:zds,代码行数:13,代码来源:AppEngine.cs


示例19: Connector

 /// <summary>
 /// Construcor, initializes the Connector object.
 /// </summary>
 internal Connector(SharpMap.Data.Providers.IProvider provider, bool Shared)
 {
     this.Provider = provider;
     this._Shared = Shared;
     this.Pooled = true;
     Connector.InstanceCounter++;
     this.InstanceNumber = Connector.InstanceCounter;
 }
开发者ID:jumpinjackie,项目名称:fdotoolbox,代码行数:11,代码来源:Connector.cs


示例20: Locate

 public static void Locate(SharpMap.Map map, string rootPath, string bitmapPath)
 {
     string[] poiFiles = System.IO.Directory.GetFiles(rootPath, "*.poi");
     foreach (string poiFile in poiFiles)
     {
         map.Layers.Add(AMLayerFactory.CreateLayer(poiFile, bitmapPath));
     }
 }
开发者ID:oliverheilig,项目名称:SharpMap.Ptv,代码行数:8,代码来源:AMLocator.cs



注:本文中的SharpMap类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# SharpMap.Map类代码示例发布时间:2022-05-24
下一篇:
C# SharpLua类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap