I have a bunch of data all in EPSG:4326 for which I need to calculate some buffers around particular points in this data. I am using the Esri geometry engine in java to accomplish this (https://github.com/Esri/geometry-api-java). There is a nice API call available to produce these buffers. My users are used to providing the radius of a buffer in miles. The problem is the Esri geometry library uses the units of your projection as the distance, and in the case of EPSG:4326 the units are degrees. So if I tell the library I want a buffer with a distance of 5 it will give me back a buffer with a radius of 5 degrees around my point.
So I'm wondering what the best approach is here. I had initially thought of projecting this data to EPSG:3857 because the units in that projection are meters. I could then convert the miles that a user wants into meters easily and then project back to EPSG:4326 to give the user back their answer.
If this isn't a good approach I'm very open to suggestions. I had initially tried to figure out how I could convert miles to degrees in EPSG:4326 but that looks to be tricky and could depend on how far away you are from the equator. I'm afraid of screwing that up.
Anyone have any suggestions?
Thanks