private void ComputeIntersection(LineTopology lineTopo)
        {
            SegmentIntersectionDetector intDetector = new SegmentIntersectionDetector(li);

            intDetector.FindAllIntersectionTypes = true;
            //		prepPoly.getIntersectionFinder().intersects(lineSegStr, intDetector);
        }
        ///<summary>
        /// Computes the intersection of this geometry with the given geometry.
        ///</summary>
        /// <param name="geom">The test geometry</param>
        /// <returns>A geometry corresponding to the intersection point set</returns>
        public IGeometry Intersection(IGeometry geom)
        {
            // only handle A/L case for now
            if (!(geom is ILineString))
                return _prepPoly.Geometry.Intersection(geom);

            // TODO: handle multilinestrings
            ICoordinate[] pts = geom.Coordinates;
            LineTopology lineTopo = new LineTopology(pts, geom.Factory);
            ComputeIntersection(lineTopo);
            return lineTopo.Result;
        }
        ///<summary>
        /// Computes the intersection of this geometry with the given geometry.
        ///</summary>
        /// <param name="geom">The test geometry</param>
        /// <returns>A geometry corresponding to the intersection point set</returns>
        public IGeometry Intersection(IGeometry geom)
        {
            // only handle A/L case for now
            if (!(geom is ILineString))
            {
                return(_prepPoly.Geometry.Intersection(geom));
            }

            // TODO: handle multilinestrings
            ICoordinate[] pts      = geom.Coordinates;
            LineTopology  lineTopo = new LineTopology(pts, geom.Factory);

            ComputeIntersection(lineTopo);
            return(lineTopo.Result);
        }
 private void ComputeIntersection(LineTopology lineTopo)
 {
     SegmentIntersectionDetector intDetector = new SegmentIntersectionDetector(li);
     intDetector.FindAllIntersectionTypes = true;
     //		prepPoly.getIntersectionFinder().intersects(lineSegStr, intDetector);
 }