haideralifaheem

Finding the Intersection Point of two Polylines

Discussion created by haideralifaheem on Nov 20, 2013
Latest reply on Sep 30, 2014 by sauegr01
Hello
i am trying to find the intersection point from two polylines,the geometery return is polyline but i need the intersection point of the lines.
code is as follows

[LEFT]Point vertex = null;
   SegmentUtils segmentUtils = new SegmentUtils(segment, this.spatialReference);
   if(start)
   {
    vertex = segmentUtils.getStartPoint();
   }
   else
   {
    vertex = segmentUtils.getEndPoint();
   }
   
   BufferUtils bufferUtils = new BufferUtils(vertex, this.spatialReference);
   Polygon polygon = bufferUtils.bufferPolygon(radius);
   Polyline polylineBuffer = PolygonToPolylineConverter.convert(polygon);
    
   Polyline polylineSegment = new Polyline();
   polylineSegment.addSegment(segment, true);
     
   segment.getEndX(), res);
   GeometryEngine ge=new GeometryEngine();
   Point point = null ;
   Geometry geometry = GeometryEngine.intersect(polylineSegment,polylineBuffer, spatialReference);
              return (Point) geometry;[/LEFT]

Thanks
Haider

Outcomes