[GRASS-user] Intersections on World Map

Hamish hamish_nospam at yahoo.com
Tue Nov 13 00:40:17 EST 2007


Martin Bley wrote:
> My task is the following: I would like to figure out for every single 
> latitude, how much of it is covered by ocean surface and how much is
> covered by a continent. So, I want a table like this
>
> Lat|Ocean length (meters)|total length (meters)
> [...]
> 10N|???|39470.171
> [...]

^^ I think you mean km

> Total length I calculated using a perl script. To get the "Ocean
> Length", I export the vector maps with the intersections (using points),
> afterwards I use another perl script, to calc length of the segments and
> finally the sum of all segments. 


Attached is a shell script that calculates this from the ETOPO2 raster map.
Besides showing off that dataset it demonstrates the r.reclass, r.profile, and
d.graph modules.

See the GRASS Newsletter Vol 1, July 2004 for details on the ETOPO2 dataset.

It isn't nearly as efficient or accurate as doing it with vectors+perl, but
it's done by the time you get a coffee.

I thought it interesting to look at slicing by longitude, so it does that too.


enjoy,
Hamish



      ____________________________________________________________________________________
Be a better pen pal. 
Text or chat with friends inside Yahoo! Mail. See how.  http://overview.mail.yahoo.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ocean_perc_by_lat.sh
Type: application/x-shellscript
Size: 2838 bytes
Desc: 323566183-ocean_perc_by_lat.sh
Url : http://lists.osgeo.org/pipermail/grass-user/attachments/20071112/57cb09d2/ocean_perc_by_lat.bin


More information about the grass-user mailing list