I have an use-case where I have to calculate the polygon of cell tower and store the polygon information in wkt format. I have got the following information regarding a cell tower.
- latitude
- longitude
- cell radius
- antenna direction (azimuth)
- radius extension (width in degree)
I am looking for an algorithm which uses the above attributes and derives the polygon, which I can save it in WKT format. The polygon would be of petal/teardrop shape (refer the diagram below). The cell radius forms the length of the petal and radius extension forms the width of the petal in degrees.
It would be helpful, if I can get a pointer to any library in Java or Python which I can use for the same.
Best Answer
This is a fairly simple operation in Java using GeoTools. All you need to do is start at the tower and travel out a distance (radius) in the direction (azimuth) - probably minus some width parameter, then round the arc (again the width parameter) and back to the tower.
Writing the result out as WKT (or any other format) is easy:
I've put the complete code here.