[GRASSLIST:5509] Re: Text files, invalid points

Hamish hamish_nospam at yahoo.com
Tue Jan 25 02:05:53 EST 2005


> thanks for you help with my PONET query- didn't manage to find source 
> online, but found they convert (v.to.rst) with no problems.
> 
> I now need to produce a surface from a text file (sites). This is 
> bathymetric data, so any positive value is erroneous. What is the best
> (easiest) way to find and remove such values, given that the file i
> too  big to display in one go in spreadsheets such as excel?


Arrays which are too big for excel usually load into matlab/octave
without a problem. Easy to fix flipped numbers too:

for i = 1:length(depth)
  if( depth(i) > 0 )
     depth(i)=depth(i)*-1;
  end
end

...



GRASS 5.4:
probably running an awk script on the sites or input text file?

maybe
grep -v '%-' sites_map



GRASS 5.7:
v.extract where="z < 1"


If the positive values are really land, they are probably worth leaving
in to help get the slope of the shore correct..? (you can always use
r.mapcalc to cut out positive elevations later)



Hamish




More information about the grass-user mailing list