It would be nice to take a line string and actually look at a shape that represents a space around the line. Also useful for other shapes as well.
Spatial4J has the ability to compute a buffered shape:
https://locationtech.github.io/spatial4j/apidocs/org/locationtech/spatial4j/shape/Shape.html#getBuffered-double-org.locationtech.spatial4j.context.SpatialContext-
Note that buffered strings do not work with geodesic model.