合集-RGeos
摘要:1.向量Vector3d 1 using System; 2 3 namespace RGeos.Geometry 4 { 5 /// 6 /// 3D向量类 7 /// 8 public class Vector3d 9 { 10 public double[] vector; 11 private const double E = 0.0000001f; 12 /// 13 /// 14 /// 15 /// 16 ...
阅读全文
摘要:-1.判断两个线段是否平行 1 inline bool parallel_seg_seg(Segment_2 S1, Segment_2 S2) 2 { 3 Vector_2 u(S1); 4 Vector_2 v(S2); 5 Vector_2 w = S1.source() - S2.sourc
阅读全文
摘要:SharpMap真的很强大,这里通过改造GdalRasterLayer类实现了在RGeos项目中支持栅格图像的读取和显示,同时支持影像的无级缩放。GdalRasterLayer通过读取FWTools环境变量找到下面对应的GDAL类库。这里直接采用GDAL1.9的.net 32封送类库实现。不过好像不...
阅读全文
摘要:绘制OGIS定义的Polygon 1 public void DrawPolygon(Polygon pol, Brush brush, Pen pen, bool clip) 2 { 3 gc = Graphics.FromHwnd(Handle); 4 if (pol.ExteriorRing == null) 5 return; 6 if (pol.ExteriorRing.Vertices.Count > 2) 7 { 8 ...
阅读全文
摘要:1.屏幕坐标以像素为单位,地图坐标通常以米为单位,CAD制图默认以毫米为单位。DPI是“dot per inch”的缩写。顾名思义,就是指在每英寸长度内的点数。通常,我们都使用dpi来作为扫描器和打印机的解析度单位,数值越高表示解析度越高。DPI表示分辨率,指每英寸长度上的点数。一般的PC分辨率为96dpi。1英寸=0.0253999999614米获取分辨率: float dx, dy;Graphics g =this.CreateGraphics();try{ dx = g.DpiX; dy = g.DpiY;}finally{ g.Dispose();}
阅读全文
浙公网安备 33010602011771号