I’m working on a quite simple web implementation for route planning, or actually more an implementation that illustrates the value of it. What i want to do is to be to plot the water depth along my path. I’m using JavaScript and some php in the background. My map is a google map.
To find the data is simple (http://www.gebco.net/data_and_products/gridded_bathymetry_data/) but I need some help to implement in on a website. I have tried to export some data to an asci-file, read it with PHP and extract a coordinate close to my position. This works for small areas but the amount of data is big, for a small area between Denmark-Sweden-Norway I have 100 000 coordinates. I want a better part of the globe. The up side is that I don’t care too much about the actual depth, only some intervals. 0-5, 5-10, 10-20, and >20 meter. It is also not really important to know if I hit land, it would be neat but if i get the first part working it should be easy.
The data I got have a resolution of 1 meter, it is reasonable easy to draw a map with whatever interval I want but my question is if you have any Idea of how I can check the depth of a coordinate without storing so much data.
One alternative is to generate images and check the colour of a certain pixel, that I calculate from a lat-long coordinate that I get from the map. Is there a neater way to store the data without having to store every coordinate individually?
I have linked to an image that I hope illustrate what I want to do. Plot a route and get the general depth for every waypoint. http://s15.postimg.org/gmf8wxu1n/depthmap.gif