DotSpatialMap
在DotSpatial开源类库的基础上开发具有较高实用性、扩展性和技术先进性的GIS软件技术框架,初步实现了地图基本操作、数据读取加载、地图投影及坐标转换等,采用.Net平台,
DotSpatial快速入门。
代码片段和文件信息
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 5120 2014-07-25 02:47 DotSpatialMapincsDotSpatial.Projections.Forms.resources.dll
文件 8704 2014-07-25 02:47 DotSpatialMapincsDotSpatial.Symbology.Forms.resources.dll
文件 17920 2014-07-25 02:47 DotSpatialMapindeDotSpatial.Projections.Forms.resources.dll
文件 9216 2014-07-25 02:47 DotSpatialMapinde-DEDotSpatial.Controls.resources.dll
文件 47616 2014-07-25 02:47 DotSpatialMapinde-DEDotSpatial.Projections.Forms.resources.dll
文件 415232 2014-07-25 02:47 DotSpatialMapinde-DEDotSpatial.Symbology.Forms.resources.dll
文件 805888 2014-07-25 02:47 DotSpatialMapinDotSpatial.Controls.dll
文件 1025536 2014-07-25 02:47 DotSpatialMapinDotSpatial.Controls.pdb
文件 521172 2014-07-25 02:47 DotSpatialMapinDotSpatial.Controls.xml
文件 402432 2014-07-25 02:47 DotSpatialMapinDotSpatial.Data.dll
文件 70656 2014-07-25 02:47 DotSpatialMapinDotSpatial.Data.Forms.dll
文件 138752 2014-07-25 02:47 DotSpatialMapinDotSpatial.Data.Forms.pdb
文件 101010 2014-07-25 02:47 DotSpatialMapinDotSpatial.Data.Forms.xml
文件 1199616 2014-07-25 02:47 DotSpatialMapinDotSpatial.Data.pdb
文件 1024669 2014-07-25 02:47 DotSpatialMapinDotSpatial.Data.xml
文件 10240 2014-07-25 02:47 DotSpatialMapinDotSpatial.Extensions.dll
文件 19968 2014-07-25 02:47 DotSpatialMapinDotSpatial.Extensions.pdb
文件 9868 2014-07-25 02:47 DotSpatialMapinDotSpatial.Extensions.xml
文件 96256 2014-07-25 02:47 DotSpatialMapinDotSpatial.Modeling.Forms.dll
文件 243200 2014-07-25 02:47 DotSpatialMapinDotSpatial.Modeling.Forms.pdb
文件 106615 2014-07-25 02:47 DotSpatialMapinDotSpatial.Modeling.Forms.xml
文件 4608 2014-07-25 02:47 DotSpatialMapinDotSpatial.Mono.dll
文件 11776 2014-07-25 02:47 DotSpatialMapinDotSpatial.Mono.pdb
文件 140 2014-07-25 02:47 DotSpatialMapinDotSpatial.Mono.xml
文件 19782656 2014-07-25 02:47 DotSpatialMapinDotSpatial.Projections.dll
文件 101376 2014-07-25 02:47 DotSpatialMapinDotSpatial.Projections.Forms.dll
文件 62976 2014-07-25 02:47 DotSpatialMapinDotSpatial.Projections.Forms.pdb
文件 15553 2014-07-25 02:47 DotSpatialMapinDotSpatial.Projections.Forms.xml
文件 744960 2014-07-25 02:47 DotSpatialMapinDotSpatial.Projections.pdb
文件 273370 2014-07-25 02:47 DotSpatialMapinDotSpatial.Projections.xml
............此处省略116个文件信息
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using DotSpatial.Controls;
using DotSpatial.Data;
using DotSpatial.Topology;
using DotSpatial.Symbology;
namespace WindowsFormsApplication3
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
map1.MouseUp += map1_MouseUp;
map1.FunctionMode = FunctionMode.Pan;
map1.Legend = legend1;
// map1.dr
}
// Handle the mouse up event
void map1_MouseUp(object sender MouseEventArgs e)
{
// only select polygons with the right button
if (e.Button != MouseButtons.Right) return;
// Get the geographic location of the mouse click
Coordinate c = map1.PixelToProj(e.Location);
// Return if no data layers exist
if (map1.layers.Count < 1) return;
// Also mpl can be used to change the selection color.
IMapPolygonlayer mpl = map1.layers[0] as IMapPolygonlayer;
// If the first layer is not a polygon layer exit.
if (mpl == null) return;
// Get the featureset that contains the actual polygon data for the layer
IFeatureSet fs = map1.layers[0].DataSet as IFeatureSet;
// If this is null or not a featureset exit
if (fs == null) return;
// Set up an index
int iShape = 0;
// Cycle through the shapes
foreach (ShapeRange shape in fs.ShapeIndices)
{
// Test if the coordinate is in the polygon
if (shape.Intersects(c)) //!
{
//!取消全部选择
mpl.UnSelectAll();
// Select the polygon if the the coordinate intersects.
mpl.Select(iShape);
IFeature feature = fs.Features[iShape];
MessageBox.Show( feature.DataRow[“Class1“].ToString()+feature.DataRow[“Area“].ToString());
}
iShape++;
}
// MessageBox.Show(iShape.ToString());
}
private void buttonloadMap_Click(object sender EventArgs e)
{
map1.Addlayer();
}
private void buttonZoomOut_Click(object sender EventArgs e)
{
map1.ZoomOut();
}
private void buttonZoomEx_Click(object sender EventArgs e)
{
map1.ZoomToMaxExtent();
map1.Refresh();
}
private void buttonClearMap_Click(object sender EventArgs e)
{
map1.Clearlayers();
}
private void buttonZoomIn_Click(object sender
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 5120 2014-07-25 02:47 DotSpatialMapincsDotSpatial.Projections.Forms.resources.dll
文件 8704 2014-07-25 02:47 DotSpatialMapincsDotSpatial.Symbology.Forms.resources.dll
文件 17920 2014-07-25 02:47 DotSpatialMapindeDotSpatial.Projections.Forms.resources.dll
文件 9216 2014-07-25 02:47 DotSpatialMapinde-DEDotSpatial.Controls.resources.dll
文件 47616 2014-07-25 02:47 DotSpatialMapinde-DEDotSpatial.Projections.Forms.resources.dll
文件 415232 2014-07-25 02:47 DotSpatialMapinde-DEDotSpatial.Symbology.Forms.resources.dll
文件 805888 2014-07-25 02:47 DotSpatialMapinDotSpatial.Controls.dll
文件 1025536 2014-07-25 02:47 DotSpatialMapinDotSpatial.Controls.pdb
文件 521172 2014-07-25 02:47 DotSpatialMapinDotSpatial.Controls.xm
文件 402432 2014-07-25 02:47 DotSpatialMapinDotSpatial.Data.dll
文件 70656 2014-07-25 02:47 DotSpatialMapinDotSpatial.Data.Forms.dll
文件 138752 2014-07-25 02:47 DotSpatialMapinDotSpatial.Data.Forms.pdb
文件 101010 2014-07-25 02:47 DotSpatialMapinDotSpatial.Data.Forms.xm
文件 1199616 2014-07-25 02:47 DotSpatialMapinDotSpatial.Data.pdb
文件 1024669 2014-07-25 02:47 DotSpatialMapinDotSpatial.Data.xm
文件 10240 2014-07-25 02:47 DotSpatialMapinDotSpatial.Extensions.dll
文件 19968 2014-07-25 02:47 DotSpatialMapinDotSpatial.Extensions.pdb
文件 9868 2014-07-25 02:47 DotSpatialMapinDotSpatial.Extensions.xm
文件 96256 2014-07-25 02:47 DotSpatialMapinDotSpatial.Modeling.Forms.dll
文件 243200 2014-07-25 02:47 DotSpatialMapinDotSpatial.Modeling.Forms.pdb
文件 106615 2014-07-25 02:47 DotSpatialMapinDotSpatial.Modeling.Forms.xm
文件 4608 2014-07-25 02:47 DotSpatialMapinDotSpatial.Mono.dll
文件 11776 2014-07-25 02:47 DotSpatialMapinDotSpatial.Mono.pdb
文件 140 2014-07-25 02:47 DotSpatialMapinDotSpatial.Mono.xm
文件 19782656 2014-07-25 02:47 DotSpatialMapinDotSpatial.Projections.dll
文件 101376 2014-07-25 02:47 DotSpatialMapinDotSpatial.Projections.Forms.dll
文件 62976 2014-07-25 02:47 DotSpatialMapinDotSpatial.Projections.Forms.pdb
文件 15553 2014-07-25 02:47 DotSpatialMapinDotSpatial.Projections.Forms.xm
文件 744960 2014-07-25 02:47 DotSpatialMapinDotSpatial.Projections.pdb
文件 273370 2014-07-25 02:47 DotSpatialMapinDotSpatial.Projections.xm
............此处省略116个文件信息
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。
评论列表(条)