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 .

yours points file should be in XYZ csv format i believe.
There is another way that you can load an entire table then convert the table to a points feature within SAGA that way you retain your attribute data.

This should create another dataset that contains only those points that fall within your country dataset.

To further remove those that would be within rivers / lakes you would require a more detailed land mass dataset.

thanks , but when you say points (xyz) - does that mean i can use the (xy) for Lat,Lon ? and if so , what is the resolution of the floats ?
–
Obmerk KronenMar 12 '12 at 0:19

modified my answer can't find any documentation on the module but seems to be to 6 decimals and yes you can interchange XY for Lat lon just leave Z as 0 or don't even populate it.
–
JamoMar 12 '12 at 0:47

Once you have this information, i.e. shapefiles with landclasses, then you can check for your point being in a polygon (say a polygon with class 'water'). A python code to check for this is like 25-30 lines. Several algos exist, which you can check or I can provide this detail too if you want. You can optimize the algorithm for larger dataset and for real time check.

Thanks a lot for the link - but actually I have already seen that website - unfortunately as I understand it - it is only the US. It is very hard for me to believe that there is no cartography resource that can supply such a simple information as large bodies of water on the planet ..
–
Obmerk KronenMar 13 '12 at 4:58

As far i remember, friend of mine did a project on Mekong river basin, and the data she used was from USGS. They have a full network of watershed. I will check for the link with her. But may be you can try yourself on USGS (US Geological Survey) website. Though the data might not be as high res as you might need. For example small lakes in counties like Netherlands might cause trouble in terms of accessibility. I am curious myself if you can find some data like this. Will post further once I find something.
–
NareshMar 13 '12 at 11:04

Thanks for the answer but as was already discussed in other comments , this method will not work for land- locked bodies of water (like lakes) nor will it return correct results for under-sea level dry land. basically it will only work for the oceans . (and other connected seas like mediterrenian or red sea)
–
Obmerk KronenApr 13 '12 at 16:33

You could try to extract something from a web mapping service (preferably OpenStreetMap). There are pre-existing polygons for water available here.

Alternately, you could try connecting a raster land-cover dataset. There is the GLCF 250m MODIS water mask, free with acknowledgement, and the GLOBCover 300m dataset free for noncommercial purposes.

EDIT: And a NASA-produced 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.