m.dem.extract

Charles E Meier cemeier at magnus.acs.ohio-state.edu
Fri Jul 22 09:57:35 EDT 1994


I had two 1 degree DEMs that I imported into GRASS a couple of weeks ago.
My problem was that the DEMs contained header info at the start of every
column.  So, here is what I did:

1) dd if=infile of=outfile ... (do what the USGS readme says to do)
2) split the file into columns using the UNIX split command.
3) strip the header info at the start of each column, and print the column
using the UNIX awk command.
4) you now should have an ascii file of numbers alone separated by blanks
w/ no cr/lf or other garbage.
5) Now run the GRASS m.rot.90 command - remember to count the blank at the
end of each number as part of the number of bytes per cell.
6) And finally, run r.in.ascii on the rotated dem.

You can write a shell script to do this for you so it isn't too painful.
Someone can likely suggest a far simpler solution, but this one does work.

I could not get m.dmaUSGSread to work as advertised.

Charles Meier

_______________________________________________

In article <9407212143.AA05905 at keywest.atmos.coloState.edu> you write:
>
>: Dear Sree,
>: I am trying to use your suggestion to use m.dmaUSGSread, m.rot90, and r.in.ll
>: for the DEM data I got from the ftp site, but I do not know what information to
>: supply for some of the parameters these commands ask for.  Specific questions:
>
>: 1.  When I go to the ftp site to get the DEMs, there is a message that comes up
>: that says to use the UNIX command: dd if=(inputfilename) of=(outputfilename)
>: ibs=4096 cbs=1024 conv=unblock.  So do I use this command at the UNIX prompt 
>: after I get the file from the ftp site, or do I use this command within the
>: m.dmaUSGSread GRASS command?  And if I do use it in the m.dmaUSGSread command,
>: do I use the whole command, or just the information that the manual asks for?
>: (In the manual it does not ask for cbs=xxxx or conv=unblock.)
>
>: 2.  In the m.rot90 command, it asks for bpc value (bytes per cell).  Where do I
>: find this information?  And for number of rows and columns, can I just use the
>: maximum number (1201), or do I have to know the exact number of rows and 
>: columns?  If I need the exact number, where do I find this information?
>
>: 3.  In the r.in.ll command, it asks for bpc value again, corner latitude and
>: longitude, and resolution of the input (in arc seconds).  Where do I find this
>: information?
>
>: Sorry for all the questions, but I have been trying to get these DEMS into
>: GRASS for three days now, and I am desperate.  Appreciate any help you can
>: give me.
>
>: Ms Jeri Krueger
>
>Jeri,
>
>Hi, I'm trying to do the exact same thing and I'm not having any luck
>either.  If you do discover the secret to this would you mind passing
>on the information my way?  I'd appreciate it and I'll do the same for
>you.  
>
>Good luck
>mhs
>
>--
>-  Matt  -                                     __
>matt at KeyWest.Atmos.Colostate.Edu W(303)4918565 \/ 
>-------------------------------------------------------------------------
>      We're only immortal for a limited time.      --Neil Peart.
>-------------------------------------------------------------------------





More information about the grass-user mailing list