Question: Let me start by saying that I am not a GIS expert nor a cartographer , and my knowledge of GIS is limited to the quasi-null professional training I had as an architect.

My question here was triggered by [another question I have asked on stackoverflow regarding the use of Google maps API.](https://stackoverflow.com/questions/9644452/verify-if-a-point-is-land-or-water-in-google-maps)

My problem is this : I am making a web-app or a website, where I need to generate quasi random points on the surface of the earth.

Those points however , should be , like pointed on the SURFACE of the earth as intended in SOLID surface . (e.g. not in the middle of the ocean or deep inside a lake)
In shorts - I need to be able to "separate" the bodies of water from the solid surface .

I am a fairly okay programmer for web-technologies, especially PHP - so generating points (nodes) was a 1-minute job , but verifying that they are "accessible" points to humans without a floating vehicle was another issue.

I will be able to exclude coordinates from the generated array - but where can I get this info ? 

Is such information (like worldwide bodies-of-water including seas oceans lakes) available as coordinates ? as boundaries ? 

Does anyone here knows how to use the data from Google-maps for this purpose ? like I said in the original question - they obviously have this data (the bodies of water are blue) - but can users separate those layers ?

I have from previous works a fairly okay resolution (for my purpose) of vector world map - But I have no Idea how to use it to generate even approximation coordinates ..

Please remember that I am not a GIS expert , so If you use any technical terms , Please try to explain them like you would explain to your 2-years-old neighbor´s kid .

Any help as to how to approach this will be more than appreciated.

Answer: 
You could try to extract something from a web mapping service (preferably OpenStreetMap). There are pre-existing polygons for water available [here](http://openstreetmapdata.com/data/water-polygons).

Alternately, you could try connecting a raster land-cover dataset. There is the GLCF 250m [MODIS water mask](http://glcf.umiacs.umd.edu/data/watermask/), free with acknowledgement, and the [GLOBCover 300m dataset](http://bioval.jrc.ec.europa.eu/products/glc2000/products.php) free for noncommercial purposes.

EDIT: And a [NASA-produced](https://lpdaac.usgs.gov/products/modis_products_table/land_water_mask_derived/land_water_mask_derived/mod44w) MODIS water mask that should be in the public domain.

PS, a hidden pitfall: Ensure that your quasi-random points are projection-based rather than based on random latitude and longitude. The areas near the poles beyond 80 degrees in latitude constitute about 1.5% of the Earth's surface, but a random latitude-longitude pairing will place 11.1% of the points in those areas.
You may test the [google elevation API](https://developers.google.com/maps/documentation/elevation/): A request for a location [on the sea](http://maps.google.com/maps?q=43.2961,5.3333&hl=fr&ll=43.295699,5.332232&spn=0.017148,0.038581&sll=43.296324,5.332532&sspn=0.017148,0.038581&t=h&z=15) will return [a negative elevation value](http://maps.googleapis.com/maps/api/elevation/json?locations=43.2961,5.3333&sensor=false), while [another on the plain old ground](http://maps.google.com/maps?q=43.2840,5.3708&hl=fr&ll=43.284001,5.370791&spn=0.008576,0.01929&sll=43.283735,5.371714&sspn=0.008576,0.01929&t=h&z=16) will return [a positive elevation value](http://maps.googleapis.com/maps/api/elevation/json?locations=43.2840,5.3708&sensor=false).

If the number of points you need to test remains small enough, you should not exceed [the quota](https://developers.google.com/maps/documentation/elevation/#Limits). The use of [paths](https://developers.google.com/maps/documentation/elevation/#Paths) may help solving this limitation.