Getting started with C# and GDAL
Getting started with C# and GDAL
http://vipassanaandenvironmentalinformatics.blogspot.jp/2013/03/getting-started-with-c-and-gdal.html
转自。
http://www.gisremotesensing.com/2017/01/code-snippet-create-new-field-in-shape.html
http://www.gisremotesensing.com/2015/10/read-esri-file-gdodatabase-filegdb.html
http://www.gisremotesensing.com/2015/09/read-raster-block-by-block-using-gdal.html
http://www.gisremotesensing.com/2015/09/read-raster-file-into-array-using-c-and.html
http://www.gisremotesensing.com/2016/12/esri-featureclass-vs-feature-layer.html
http://www.gisremotesensing.com/2015/10/enable-esri-arcgis-extension-licence.html
http://www.gisremotesensing.com/2015/09/feature-to-raster-conversion-using-c.html
http://www.gisremotesensing.com/2015/09/vector-to-raster-conversion-using-gdal-c.html
http://www.gisremotesensing.com/2015/07/building-arcmaps-add-in-using-command.html
http://www.gisremotesensing.com/2015/09/vector-to-raster-conversion-using-gdal-c.html
- Download the latest version of the precompiled GDAL binaries from here. Choose the ones that suit your system (32bit or 64bit). Extract the contents from the zip file to a location on your hard disk e.g. C:\Program Files\GDAL (I ran into a number of AccessViolationExceptions when I used the binaries from FWTools 2.4.7).
- Include both the path to C:\Program Files\GDAL\bin\gdal\csharp as well as C:\Program Files\GDAL\bin in your PATH system variable.
Setting of the PATH variable |
- On http://svn.osgeo.org/gdal/trunk/gdal/swig/csharp/apps/ you will find sample C#-classes that use the GDAL-bindings. In the following I will use GDALInfo.cs as an example. Create a C# Console Application project that uses the file GDALInfo.cs.
Creating a Console Application (VS 2010) |
- Add four of.the dll-files that can can be found at C:\Program Files\GDAL\bin\gdal\csharp (or wherever your installation path of the current binaries is) to your project references: gdal_csharp.dll, gdalconst_csharp.dll,ogr_csharp.dll and osr_csharp.
Adding necessary references (VS 2010) |
- Build the solution. If you are on a 64bit system and you are using the 64bit GDAL binaries you have to make sure you actually build for 64bit (you will get errors otherwise when you try to run the program).
Setting of the platform target for 64bit (VS 2012) |
- Now you can run the program with some data. Include a reference to one of the raster files in the Command line arguments field of your Debug options (in the properties of your GDALInfo project; don't forget to put the path inside double quotes of it includes blanks).
- Run the program (Ctrl-F5). It should show you something similar to the following:
Output of GDALInfo |
That's it. Now you can use the other example C#-programs to open, copy, manipulate raster data in variety of file formats. For some of the other example files it is necessary to add some additional references (e.g. System.Drawing).
Getting started with C# and GDAL的更多相关文章
- GDAL生成Erdas Imagine
GDAL原生支持超过100种栅格数据类型,涵盖所有主流GIS与RS数据格式,包括• ArcInfo grids, ArcSDE raster, Imagine, Idrisi, ENVI, GRAS ...
- QGis、Gdal本地中文路径问题
编译qgis完整项目后,由于Gdal库的原因,中文路径下通过添加矢量数据中数据库中是没有OGR的Oracle数据库功能的: 最开始打算通过重新编译gadl库从内部支持中文的(有成功的麻烦也请告诉我), ...
- VS2015下编译64位GDAL总结
使用VS2015编译最新的64位GDAL(最新gdal2.11),确实有一些问题,看来双方还是太新了,有点不兼容,特总结如下. 以前经常用的通过VisualStudio IDE进行编译的方式现在似乎不 ...
- VS2010和opencv-2.4.10、GDAL
系统环境:win10 64位 本文只限于学习交流,商业用途请支持正版! 转载请注明:转载请注明http://www.cnblogs.com/mxbs/p/6206060.html 2016 ...
- VS2012配置OpenCV、GDAL开发环境
VS2012和opencv-2.4.10 第一步:配置之前的准备工作. 完成VS2012的安装,以及opencv-2.4.10的下载和文件提取, 双击此文件,设置文件路径,即可得到提取文件,提取后的文 ...
- 编译带有PROJ4和GEOS模块的GDAL
1.下载三个软件的源代码(去各自官网下载即可) 2.将PROJ4和GEOS的源码放到GDAL目录下的supportlibs文件夹中. 3.修改GDAL的nmake.opt文件,部分内容如下: # Un ...
- Java 使用GDAL 读写 shapefile
读取shp文件,并把它转化为json import org.gdal.ogr.*; import org.gdal.ogr.Driver; import org.gdal.gdal.*; public ...
- GDAL C# 开发出现的异常
在使用开发C#下的GDAL时,编译时正确. 在执行 Gdal.AllRegister(); 出现异常:OSGeo.GDAL.GdalPINVOKE”的类型初始值设定项引发异常. 解决方案: 编译正常, ...
- GDAL关于读写图像的简明总结
读写影像可以说是图像处理最基础的一步.关于使用GDAL读写影像,平时也在网上查了很多资料,就想结合自己的使用心得,做做简单的总结. 在这里写一个例子:裁剪lena图像的某部分内容,将其放入到新创建的. ...
- Java maven安装GDAL
1. 使用编译好的安装jdal http://www.gisinternals.com/release.phpgdal-111-1800-x64-core.msi下载地址:http://downloa ...
随机推荐
- .net core 连接sql server 时提示Connection Timeout Expired
.net core开发环境是ubuntu LINUX, 在ubuntu 上 telnet 数据库IP 端口是通的. SQL SERVER 是2008 ,未打SP补丁. 打完 SQL SERVER 2 ...
- linux的系统组成和计算机组成原理,linux常用操作
Linux入门 linux简介 学习目的:linux服务器操作系统稳定长期运行,python,pycharm装于linux上 linux系统组成 应用软件:调用系统软件接口 linux操作系统分两 ...
- sqlserver 查询表中的主键、外键列及外键表,外表中的主键列
1.获取主键信息 EXEC sp_pkeys @table_name='{0}' 2.获取外键 方法二 SELECT Field=(SELECT name FROM syscolumns WHERE ...
- ALGO-43_蓝桥杯_算法训练_A+B Problem
问题描述 输入A,B. 输出A+B. 输入格式 输入包含两个整数A,B,用一个空格分隔. 输出格式 输出一个整数,表示A+B的值. 样例输入 样例输出 数据规模和约定 -,,,<=A,B< ...
- C++进阶--多继承
//########################################################################### /* * 多继承 * * -- 一个类直接派 ...
- IKAnalyzer 源码走读
首先摘抄一段关于IK的特性介绍: 采用了特有的“正向迭代最细粒度切分算法”,具有60万字/秒的高速处理能力. 采用了多子处理器分析模式,支持:英文字母(IP地址.Email.URL).数字(日期,常用 ...
- kafka产生的数据通过Flume存到HDFS中
试验目标: 把kafka的生产者发出的数据流经由Flume放到HDFS来存储. 试验环境: java:1.8 kafka:2.11 flume:1.6 hadoop:2.8.5 试验流程: 1.进入z ...
- ocr 文字区域检测及识别
ocr 文字区域检测及识别 # coding=utf- from PIL import Image, ImageFilter, ImageEnhance from skimage.filters im ...
- idea关闭标签快捷键修改----兼 常用实用快捷键
还有一个快捷键: 自动补全返回值 : ctrl + alt + v alt + enter: 自动添加未定义的方法 idea 原本的关闭快捷键是: ctrl + F4,但是不好用,谁的手指伸这么长 修 ...
- [UE4]隐藏对象Set Visibility
Propagate to Children:是否遍历子对象(用来设置子对象可见性)