toGeometry method
Creates a LineString with the same coordinates as this segment
@param geomFactory the geometry factory to use @return a LineString with the same geometry as this segment
Implementation
LineString toGeometry(GeometryFactory geomFactory) {
return geomFactory.createLineString([p0, p1]);
}