1 Convert the lat / lon center to the Cartesian (x, y) in units of measure.
Then you do all the geometry, as you learned at school:
2 Create one corner point of the square using the polar coordinate formula
phi = 45 * TO_RADIANS; corner.x = tcenter.x + r * sin(phi); corner.y = tcenter.y + r * cos(phi);
where r is the length in meter of the half-diagram of the square of the rectangular frame
do the same for other points using phi = (90 * i + 45), i = 0..3
3 convert angles (x / y) back to lat / lon using inverse transform
source share