public static Geometry toLineString ( Coordinate c1 , Coordinate c2 ) { Geometry lineString = new Geometry ( Geometry . LINE_STRING , 0 , - 1 ) ; lineString . setCoordinates ( new Coordinate [ ] { ( Coordinate ) c1 . clone ( ) , ( Coordinate ) c2 . clone ( ) } ) ; return lineString ; }
Create a new linestring based on the specified coordinates .