[GRASSLIST:1035] Re: srtm

Hamish hamish_nospam at yahoo.com
Wed Aug 27 00:37:08 EDT 2003


> Problem I found was---if I got this right---that GMT's shorelines
> don't get imported as closed polygons 

v.support -s threshold=xxxxx
v.line2area
?


> and also that I couldn't get rid of the inland water bodies.

I've written a matlab[*] script to do this. Generally it just tests to
see if a point is inside or outside a polygon. Export to ASCII vector
format, load the mainland in as the test-against polygon, and test the
first point of each area & only write areas which fall outside. I was
getting rid of inland islands, but inland lakes should be a similar
problem. Let me know if you want to try it.

[*] should work with the free GPL clone, Octave, too.

or if you just want the coastline as one continous line you can pick out,
use join_cst from the Mapping Tools/Map Stuff section on the sea-mat page:
http://sea-mat.whoi.edu/

Many other useful little utilities on that page too:

join_cst	JOIN_CST Makes continuous coastline from fragmented segments. 
fixcoast	FIXCOAST Makes sure coastlines meet Signell's conventions. 
fillseg 	FILLSEG Fills polygon line segments separated by [nan nan] (eg. Coastline data) 
degmins 	DEGMINS Creates a degrees and minutes label for use in MAPAX routine.
mapax 		MAPAX Puts degrees and minutes on map axes instead of decimal degrees 
demo_map 	DEMO_MAP Demonstrates map stuff: JOIN_CST, FILLSEG and MAPAX. 
Readme 		Mapping related stuff 
geo_simplify 	GEO_SIMPLIFY -- Simplify (reduce the points of) a lat/lon polyline 
xy_simplify 	XY_SIMPLIFY -- Simplify (reduce the number of points) of a polyline 
grdcut		GRDCUT: reads subregion of GMT grid file into Matlab arrays x,y,z 
read_gmt 	READ_GMT reads GMT grid file into Matlab arrays x,y,z 


Hamish




More information about the grass-user mailing list