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?


marked as duplicate by Ian Turton May 15 at 14:22

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.