Dotspatial 创建面状图层
using DotSpatial.Controls;
using DotSpatial.Data;
using DotSpatial.Data.Forms;
using DotSpatial.Plugins.Measure;
using DotSpatial.Symbology;
using DotSpatial.Topology;
using DotSpatial.Topology.Algorithm;
using Point = DotSpatial.Topology.Point;
using PointShape = DotSpatial.Symbology.PointShape;
Shapefile s = new Shapefile();
//面状要素
FeatureSet fs = new FeatureSet(FeatureType.Polygon);
//增加字段
fs.DataTable.Columns.Add(new DataColumn("ID", typeof (int)));
fs.DataTable.Columns.Add(new DataColumn("Text", typeof (string)));
//坐标列表
List<Coordinate> vertices = new List<Coordinate>();
vertices.Add(new Coordinate(0, 0));
vertices.Add(new Coordinate(0, 100));
vertices.Add(new Coordinate(100, 100));
vertices.Add(new Coordinate(100, 0));
//创建多边形要素
Polygon geom = new Polygon(vertices);
IFeature feature = fs.AddFeature(geom);
feature.DataRow.BeginEdit();
feature.DataRow["ID"] = 1;
feature.DataRow["Text"] = "Hello world";
feature.DataRow.EndEdit();
//存储
fs.SaveAs("d:\\test.shp", true);
Dotspatial 创建面状图层的更多相关文章
- DotSpatial 创建面状要素——含空洞
private void toolStripButton23_Click(object sender, EventArgs e) { //选择图层 FeatureSet fs = null; fs = ...
- 用IFeatureWorkspaceAnno.CreateAnnotationClass 创建注记图层时报“The application is not licensed to modify or create schema”的错误的解决方案。
用IFeatureWorkspaceAnno.CreateAnnotationClass 的方法创建注记图层的时候报"The application is not licensed to m ...
- ArcEngine 创建线要素图层
在创建要素图层的时候,默认的几何类型是Polygon: Dim objectClassDescription As IObjectClassDescription = New FeatureClass ...
- Yii 2.0: yii2-highcharts-widget创建饼状图
安装 The preferred way to install this extension is through composer. 项目根目录下执行: php composer.phar requ ...
- 创建注记图层C# IFeatureWorkspaceAnno
http://blog.csdn.net/mydriverc/article/details/1675613 //IFeatureWorkspaceAnno Example //The ...
- IOS 创建渐变图层
代码如下 typedef enum { GradientLayerKindLeftRight = , GradientLayerKindUpDown, GradientLayerKindLBRT,// ...
- C# ArcEngine创建内存图层(转载)
C#+Arcengine---创建内存图层 分类:技术文档 2009-12-11 14:43阅读(1498)评论(0) #region 在内存中创建图层 /// <summary& ...
- GDAL不支持创建PCIDSK的面状矢量格式
最近在使用GDAL创建PCIDSK格式的矢量数据,发现创建点和线的矢量数据都没问题,创建面状的只有属性表没有图形.在GDAL官网说明也写的是支持的,地址为:http://www.gdal.org/fr ...
- Java创建柱状图及饼状图
Java创建图表其实还是很方便的,但是要引入相关的jar包.如下 jfreechart.jar jcommon,jar gnujaxp.jar 其中最主要的是jfreechart.jar. 下面就让我 ...
随机推荐
- 写日志 log 到文件夹
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threa ...
- 三代PacBio reads纠错 - 专题
三代纠错的重要性不言而喻,三代的核心优势就是长,唯一的缺点就是错误率高,但好就好在错误是随机分布的,可以通过算法解决,这也就是为什么现在有这么多针对三代开发的纠错工具. 纠错和组装是分不开的,纠错就是 ...
- linux rpm -ivh MySQL-server-5.5.31-2.el6.i686.rpm
linux rpm 安装mysql异常: [root@localhost upload]# rpm -ivh MySQL-server-5.5.31-2.el6.i686.rpmerror: Fail ...
- liunx 系统 git clone ssh代码时需要sshkey
1. 在root用户目录下 执行命令 cd .ssh cat id_rsa.pub 粘贴 ssh key
- 常见的JavaScript函数
JavaScript函数一共可分为5类:常规函数.数组函数.日期函数.数学函数和字符串函数. (1)常规函数(9个) alert函数:显示一个警告对话框,包括一个“确定”按钮. confirm函数:显 ...
- 联合体union和大小端(big-endian、little-endian)
1.联合体union的基本特性——和struct的同与不同 union,中文名“联合体.共用体”,在某种程度上类似结构体struct的一种数据结构,共用体(union)和结构体(struct)同样可以 ...
- asp.net "true"的小坑
在cs文件中 写了一个 属性 protected bool IsTrue { get{ return true; } } 在页面 .aspx文件中 在js中 var flag="<%= ...
- Right Here Waiting
俺不会和小时候一样,因为别人听,自己就不听了^^
- 许愿墙的搭建(基于Apache+php+mysql)
一.准备部分:CentOS 7 , Linux 文本 各自配置好环境 二. CentOS 7准备如下: yum install httpd -y #安装httpd yum install php ...
- org.apache.catalina.webresources.Cache.getResource Unable to add the resource
org.apache.catalina.webresources.Cache.getResource Unable to add the resource at xxx to the cache be ...