ISpatialReference sRef; ifMerged = fcMerged.GetFeature(1); IPoint pt = new PointClass(); pt = (IPoint)ifMerged.ShapeCopy; sRef = pt.SpatialReference; IPoint fromPoint = new PointClass(); IPoint toPoint = new PointClass(); fromPoint = pcTempPair.get_Point(0); toPoint = pcTempPair.get_Point(1); IPolyline5 ipPairLine = new PolylineClass(); ipPairLine.ToPoint = toPoint; ipPairLine.FromPoint = fromPoint; ipPairLine.Project(sRef); IGeometry igPairLine = (IGeometry)ipPairLine; IRelationalOperator relOperatore = (IRelationalOperator)gbBaseMap; Boolean contain = relOperatore.Contains(igPairLine);
Solved! Go to Solution.
IGeometry igPairLine = (IGeometry)ipPairLine; ITopologicalOperator pTopOp = igPairLine as ITopologicalOperator; pTopOp.Simplify(); IRelationalOperator relOperatore = (IRelationalOperator)gbBaseMap;
IGeometry igPairLine = (IGeometry)ipPairLine; ITopologicalOperator2 pTopOp = igPairLine as ITopologicalOperator2; pTopOp.IsKnownSimple_2 = false; pTopOp.Simplify(); IRelationalOperator relOperatore = (IRelationalOperator)gbBaseMap;
IGeometry igPairLine = (IGeometry)ipPairLine; ITopologicalOperator pTopOp = igPairLine as ITopologicalOperator; pTopOp.Simplify(); IRelationalOperator relOperatore = (IRelationalOperator)gbBaseMap;
IGeometry igPairLine = (IGeometry)ipPairLine; ITopologicalOperator2 pTopOp = igPairLine as ITopologicalOperator2; pTopOp.IsKnownSimple_2 = false; pTopOp.Simplify(); IRelationalOperator relOperatore = (IRelationalOperator)gbBaseMap;
ISpatialReference sRef; ifMerged = fcMerged.GetFeature(1); IPoint pt = new PointClass(); pt = (IPoint)ifMerged.ShapeCopy; sRef = pt.SpatialReference; IPoint fromPoint = new PointClass(); IPoint toPoint = new PointClass(); fromPoint = pcTempPair.get_Point(0); toPoint = pcTempPair.get_Point(1); IPolyline5 ipPairLine = new PolylineClass(); ipPairLine.ToPoint = toPoint; ipPairLine.FromPoint = fromPoint; ipPairLine.Project(sRef); IGeometry igPairLine = (IGeometry)ipPairLine; IRelationalOperator relOperatore = (IRelationalOperator)gbBaseMap; Boolean contain = relOperatore.Contains(igPairLine);