Closed matteason closed 7 months ago
Possible solution: take the first valid pixel on the left and last valid pixel on the right of each row, then create a smooth gradient between them, towards the edges, by interpolating them.
I've now implemented a fix for this. The gap is filled in by creating a gradient in the gap between the values of the pixels either side of the gap.
Before
After
This isn't perfect, and can create a 'smearing' effect in some areas:
...but I think it's a big improvement particularly at lower zoom levels. If anyone has any ideas on improving this I'd be really grateful.
There's a visible seam at the antimeridian where the source data doesn't quite reach the edges of the image. This is quite prominent when the image is wrapped round a sphere.
Over the poles we take a mirror image of the area below combined with a fade to solid white to compensate for missing data. Doing something similar here would probably only make the seam more obvious, so I'll need to do something smarter to infill the missing data. Need to ensure that the left edge is contiguous with the right edge so that it loops seamlessly.