This question already has an answer here:
I have to create a Polygon from a lineString and a width. Ex: Given a street as a lineString (Or a list of points) and a width, create the polygon (the road). I am using Geotools, but I couldn't find anything helpful in the API.
The math for doing this manually is requiring to much work. Is there a simpler solution for this kind of problem?