資源簡介
通用類能轉到任何VS版本,類中括初始化,讀取圖屋,讀取屬性字段及值,讀取圖形坐標數據。
代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Linq;
using?System.Text;
using?System.Windows.Forms;
using?OSGeo.GDAL;
using?OSGeo.OGR;
using?OSGeo.OSR;
using?System.Collections;
using?System.Runtime.InteropServices;
using?shp;
namespace?shp
{
????public?partial?class?Form1?:?Form
????{
????????public?string?ywj?=?“1“;
????????public?List?FeildStringList;
????????public?Form1()
????????{
????????????InitializeComponent();
????????}
????????[DllImport(“gdal111.dll“?EntryPoint?=?“OGR_F_GetFieldAsString“?CallingConvention?=?CallingConvention.Cdecl)]
????????public?extern?static?System.IntPtr?OGR_F_GetFieldAsString(HandleRef?handle?int?i);
????????private?void?button1_Click(object?sender?EventArgs?e)
????????{
????????????OpenFileDialog?opfile?=?new?OpenFileDialog();
????????????opfile.Filter?=?“SHP文件|*.shp“;
????????????if?(opfile.ShowDialog()?==?DialogResult.OK)
????????????{
????????????????ywj?=?opfile.FileName;
????????????????textBox1.Text?=?ywj;
????????????}
????????}
????????private?void?button2_Click(object?sender?EventArgs?e)
????????{
????????????List?temp;
????????????string?sj?wj;
????????????shpout?shpf?=?new?shpout();
????????????shpf.InitinalGdal();//初始化
????????????shpf.GetShplayer(ywj);//打開文件獲得圖層
????????????shpf.GetFeilds();//獲得屬性字段
????????????//shpf.GetFeildContent(5?out?temp);//獲得指定列的所有數據
????????????//shpf.GetFeildContentxl(5?5?out?sj);//獲得指定列,行的數據
????????????shpf.GetGeometry(0?out?wj);//獲得指定行的圖形數據
????????????textBox_vv.Text?=?shpf.m_FeildList.ToString();
????????}
????}
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????1826304??2015-11-23?02:50??shp\shp\bin\Release\cairo.dll
?????文件????1001472??2015-11-23?02:06??shp\shp\bin\Release\cfitsio.dll
?????文件?????118272??2015-11-23?04:32??shp\shp\bin\Release\expat.dll
?????文件??????50688??2015-11-23?01:07??shp\shp\bin\Release\freexl.dll
?????文件?????110592??2015-11-23?02:19??shp\shp\bin\Release\fribidi.dll
?????文件????9694208??2015-11-26?05:27??shp\shp\bin\Release\gdal111.dll
?????文件??????19456??2015-11-26?05:30??shp\shp\bin\Release\gdalconst_csharp.dll
?????文件??????12288??2015-11-26?05:30??shp\shp\bin\Release\gdalconst_wrap.dll
?????文件??????80384??2015-11-26?05:30??shp\shp\bin\Release\gdal_csharp.dll
?????文件?????110592??2015-11-26?05:30??shp\shp\bin\Release\gdal_wrap.dll
?????文件????1018880??2015-11-23?01:04??shp\shp\bin\Release\geos.dll
?????文件?????228864??2015-11-23?01:04??shp\shp\bin\Release\geos_c.dll
?????文件?????898048??2015-11-23?01:07??shp\shp\bin\Release\iconv.dll
?????文件?????288256??2015-11-23?01:43??shp\shp\bin\Release\libcurl.dll
?????文件????1158144??2015-11-23?01:34??shp\shp\bin\Release\libeay32.dll
?????文件????1026560??2015-11-25?03:30??shp\shp\bin\Release\libecwj2.dll
?????文件??????38912??2015-11-23?02:10??shp\shp\bin\Release\libfcgi.dll
?????文件?????350208??2015-11-23?03:35??shp\shp\bin\Release\libkea.dll
?????文件????3871232??2015-11-23?03:53??shp\shp\bin\Release\libmysql.dll
?????文件?????119296??2015-11-23?01:54??shp\shp\bin\Release\libpq.dll
?????文件?????719872??2015-11-23?02:25??shp\shp\bin\Release\libtiff.dll
?????文件????1005056??2015-11-23?02:04??shp\shp\bin\Release\libxm
?????文件????3752960??2014-06-19?19:39??shp\shp\bin\Release\lti_dsdk_9.1.dll
?????文件?????287232??2014-06-19?19:21??shp\shp\bin\Release\lti_lidar_dsdk_1.1.dll
?????文件????2296832??2015-11-26?05:38??shp\shp\bin\Release\mapserver.dll
?????文件?????108544??2015-11-23?03:45??shp\shp\bin\Release\mfhdfdll.dll
?????文件?????421200??2011-06-11?08:58??shp\shp\bin\Release\msvcp100.dll
?????文件?????773968??2011-06-11?08:58??shp\shp\bin\Release\msvcr100.dll
?????文件????7518144??2014-03-11?01:16??shp\shp\bin\Release\NCSEcw.dll
?????文件?????803840??2015-11-23?03:34??shp\shp\bin\Release\netcdf.dll
............此處省略114個文件信息
- 上一篇:gonzitoupa.rar
- 下一篇:安卓個人記賬本
評論
共有 條評論