Not expecting a quick solve for this one, but I hope it's of interest to some.

You may be familiar with map distortion techniques- make a double square image and it wraps nicely around a globe but you need to "fix the poles" where the distortion looks really bad.

In Photoshop you just use Filter > Distort > Polar Co-ordinates.

Here's a flat grid undistorted:
grid undistorted.jpg
You can tell which side will become which pole and where the least distorted "sweet spot" will be from the colours.
Now see the polar distorted version:
grid distorted.jpg

My question is this- how can I pre-distort the flat grid before running the Polar Co-ordinates filter so the squares of the grid are closer to being true squares in the final image?

Is it even possible?

I've tried some trickery with Filter > Distort > Spherize (Horizontal Only) but it seems like either it doesn't work or I'm not doing it right.

Any ideas?