public void CanGetOrientationsForLinearTopologicalLines()
        {
            var polyline = (IPolyline)CurveConstruction.StartLine(10, 0)
                           .LineTo(15, 5)
                           .Curve;

            polyline.SpatialReference = CreateSpatialReference();
            TopologicalLine topologicalLine = CreateTopologicalLine(polyline);

            Assert.AreEqual(2, topologicalLine.Orientation);

            polyline = (IPolyline)CurveConstruction.StartLine(15, 5)
                       .LineTo(10, 0)
                       .Curve;
            polyline.SpatialReference = CreateSpatialReference();
            topologicalLine           = CreateTopologicalLine(polyline);
            Assert.AreEqual(-2, topologicalLine.Orientation);

            polyline = (IPolyline)CurveConstruction.StartLine(10, 0)
                       .LineTo(15, 5)
                       .LineTo(10, 10)
                       .Curve;
            polyline.SpatialReference = CreateSpatialReference();
            topologicalLine           = CreateTopologicalLine(polyline);
            Assert.AreEqual(-1, topologicalLine.Orientation);

            polyline = (IPolyline)CurveConstruction.StartLine(10, 10)
                       .LineTo(15, 5)
                       .LineTo(10, 0)
                       .Curve;
            polyline.SpatialReference = CreateSpatialReference();
            topologicalLine           = CreateTopologicalLine(polyline);
            Assert.AreEqual(1, topologicalLine.Orientation);
        }
        public void CanGetSingleSegmentOrientationToLR()
        {
            var polyline = (IPolyline)CurveConstruction.StartLine(10, 10)
                           .LineTo(20, 0)
                           .Curve;

            polyline.SpatialReference = CreateSpatialReference();

            TopologicalLine topologicalLine = CreateTopologicalLine(polyline);

            Assert.AreEqual(2, topologicalLine.Orientation);
        }
        public void CanGetCounterClockwiseOrientation()
        {
            var polyline = (IPolyline)CurveConstruction.StartLine(10, 0)
                           .LineTo(15, 5)
                           .LineTo(10, 10)
                           .Curve;

            polyline.SpatialReference = CreateSpatialReference();

            TopologicalLine topologicalLine = CreateTopologicalLine(polyline);

            Assert.AreEqual(-1, topologicalLine.Orientation);
        }
        public void CanGetSingleSegmentClockwiseCircularArcOrientation()
        {
            var polyline = (IPolyline)CurveConstruction.StartLine(9, 10)
                           .LineTo(10, 10)
                           .CircleTo(10, 0)
                           .Curve;

            polyline.SpatialReference = CreateSpatialReference();

            TopologicalLine topologicalLine = CreateTopologicalLine(polyline);

            Assert.AreEqual(1, topologicalLine.Orientation);
        }