Due to the non-sphericity of the Earth, there is no exact way of rotating a polygon, but the following is a good approximation.
Suppose we want to rotate the UK polygon so that London is moved to Lansing.
sourcePosition = GeoPosition[Entity["City", {"London", "GreaterLondon", "UnitedKingdom"}]];
destinationPosition = GeoPosition[Entity["City", {"Lansing", "Michigan", "UnitedStates"}]];
That means we need to implement these changes in latitude and longitude:
dlat = Latitude[destinationPosition] - Latitude[sourcePosition]
(* Quantity[-8.79021, "AngularDegrees"] *)
dlon = Longitude[destinationPosition] - Longitude[sourcePosition]
(* Quantity[-84.4396, "AngularDegrees"] *)
We will do it in two steps, first changing latitudes along the London meridian and then changing longitudes along the Lansing parallel. This will preserve the north-south orientation of the UK.
axis = FromSphericalCoordinates[{1, Pi/2, -Pi/2 + Normal@Longitude[sourcePosition]}]
(* {-0.00203622, -0.999998, 0} *)
rot = Transpose[RotationMatrix[dlon, {0, 0, 1}].RotationMatrix[dlat, axis]];
Get the points of our polygon of the UK:
sourcePolygon = First@EntityValue[Entity["Country", "UnitedKingdom"], "Polygon"];
Finally perform the rotation (note that we transform with the rot
matrix on the right, which explains the use of Transpose
above):
destinationPolygon = GeoPosition@GeoPositionXYZ[Dot[#, rot] & /@ First@GeoPositionXYZ[sourcePolygon]];
Now we can plot.
GeoGraphics[{GeoMarker[destinationPosition], Polygon[destinationPolygon]}]
