Removing Sites

Susan Huse sue at ced.berkeley.edu
Fri Jan 21 13:24:09 EST 1994


> From grass-lists-owner at max.cecer.army.mil Fri Jan 21 08:16:37 1994
> From: a16dhoover at attmail.com (David  Hoover )
> Date: 21 Jan 94 16:00:51 GMT
> Sender: grass-lists-owner at max.cecer.army.mil
> Reply-To: grassu-list at max.cecer.army.mil
> To: grassu-list at max.cecer.army.mil, gis at attmail.com
> Cc: a16pbiggam at attmail.com (Peter F Biggam)
> Phone: +1 208 334 1525
> Subject: Removing Sites
> Content-Type> : > text> 
> Content-Length: 774
> 
> 
> Greetings from Idaho!
> 
> I have a coverage with about 7,000 polygons and about 21,000 sites.  I would
> like to be able in GRASS 4.0 to delete all of the sites while still keeping
> all the polygons and their associated labels.  I don't recall any GRASS 4.0
> commands like v.rm.sites or something similar that would do it all for me.
> 
> Any suggestions?
> 
> (I thought about converting it to an ASCII file and then deleting all lines
> with "P 2" in it, but don't know enough about ed or vi to delete that line
> and then the next two lines that contain the coordinates for the degenerate
> line.)
> 
> P.S.  Yes, fellow SCS readers, this is NRI data I'm dealing with!
> 
> Thanks in advance
> 
> David Hoover
> Cartography and GIS Section
> USDA-SCS, Idaho State Office
> a16dhoover at attmail.com
> 208-334-1525
> 

You are on the right track.  In the dig_ascii files, a "P" means a "live"
point, ("A" means area, "L" for line).  If you change a "P" to "p" it is the
same as erasing it.  Lines removed during v.digit show up in the dig_ascii
file with an "l".  

Assuming you know NO vi here are the instructions:

	vi filename

	type	:g/^P/s//p/g
(this should appear at the bottom of your screen.  It substitutes for all 
P that are at the beginning of a line with a p.)
		ZZ (to quit)
		:q! (to quit with out changing if you blew it)

Then reimport it to GRASS dig format.

Sue Huse
CEDR - REGIS
University of California, Berkeley




More information about the grass-user mailing list