oceaneos / MapBox

Apache License 2.0
0 stars 0 forks source link

Blue seas #12

Open mriedijk opened 8 years ago

mriedijk commented 8 years ago

You made the land masses transparent, but ocean areas without data are black. Is it possible to change the black areas in the ocean to a default blue so the image looks more natural/without gaps?

roblabs commented 8 years ago

This is likely a problem with the Mapbox satellite being black in the ocean areas. The transparencies appear to be set properly.

Here are raw images of "red-blue" with transparency.

Zoom = 1

The land masses are certainly transparent, as well as a few spots in the ocean.
1

Side by side comparison of Oceaneos "red-blue" overlay with Mapbox satellite

roblabs commented 8 years ago

I overlayed the full "Oceaneos pipeline" on top of a Google Map, with solid blue ocean.

And it showed that the transparency over the ocean is working. And it backs up the theory that Mapbox Satellites are largely black data in the middle of the ocean.

oceaneos-pipeline-over-google-maps
mriedijk commented 8 years ago

So what should we do next? Create a background map (underlay) with ocean color = blue?

roblabs commented 8 years ago

When the web page with slider is solid, then we can experiment with different backgrounds.

I am confident we can come up a resolution fairly quickly.

mriedijk commented 8 years ago

You probably first need to create an alpha channel mask for the landmasses.

The remaining transparent areas, should be filed using nearest neighbor interpolation: http://www.imagemagick.org/Usage/misc/#nearest-neighbor

More background information: http://cilab.knu.ac.kr/English/research/Color/Interpolation.htm http://gisgeography.com/raster-resampling/

An alternative is to calculate the average color in an area and use that to fill the gap: http://stackoverflow.com/questions/10825952/calculate-the-average-colour-of-an-area-in-an-image

mriedijk commented 8 years ago

Make sure not to overwrite the original (Kindlmannn) image. I would like to keep both the original and the nearest neighbor optimized version.