ArcGIS Engine代码段笔记【二】
程序员文章站
2022-07-14 10:00:28
...
判断要素是否自相交
ESRI.ArcGIS.Geometry.IGeometry pGeo = pFeature.ShapeCopy;
ESRI.ArcGIS.Geometry.IGeometryCollection pColl = pGeo as ESRI.ArcGIS.Geometry.IGeometryCollection;
int Count1 = pColl.GeometryCount;
ESRI.ArcGIS.Geometry.ITopologicalOperator2 pTopologicalOperator2 = pGeo as ESRI.ArcGIS.Geometry.ITopologicalOperator2;
pTopologicalOperator2.IsKnownSimple_2 = false;
pTopologicalOperator2.Simplify();
pColl = pGeo as ESRI.ArcGIS.Geometry.IGeometryCollection;
int Count2 = pColl.GeometryCount;
if (Count2 > Count1)
{
//自相交
}
IPolyline接口查询距离、获取某个部分
pPolyline.QueryPointAndDistance(esriSegmentExtension.esriExtendAtFrom, pPoint, false, pOutPoint, ref DistanceAlongCurve, ref distanceFromCurveis, ref bRightSide);
ILine pLine = new LineClass();
pPolyline.QueryNormal(esriSegmentExtension.esriExtendAtFrom, 30, false, 75, pLine);
ICurve pCurve = new PolylineClass();
pPolyline.GetSubcurve(60, 110, false, out pCurve);
IProximityOperator接口查询距离
IProximityOperator p = pPolyline as IProximityOperator;
IPoint sPoint = p.ReturnNearestPoint(pPoint, esriSegmentExtension.esriNoExtension);
IProximityOperator p = pPolyline as IProximityOperator;
IPoint sPoint = p.ReturnNearestPoint(pPoint, esriSegmentExtension.esriExtendEmbedded);
上一篇: 展讯FOV配置
下一篇: 计算机图形学实验(二)多边形填充