Importing raster data

Thomas Adams adams at ohrfc.noaa.gov
Tue Jan 20 11:16:01 EST 1998


Stephan,

Thanks so much for your help! I'll certainly give your suggestion a try.

Cheers!

Tom



Stephan Eickschen wrote:
> 
> Hi Thomas-
> 
> >
> > I'm trying to import a raster file in ascii/text format with lat/long
> > coordinates into GRASS. The file has the following format:
> >
> > north: 47.937500000000
> > south: 24.062500000000
> > east: -66.479166666667
> > west: -90.520833333333
> > rows: 573
> > cols: 577
> > 785 790 786 783 779 771 768 766 ...
> 
> I do not know, if it is possible to do the conversion with awk, but what
> you might do, is to write a small program, that writes your data to
> your sites directory and then do the import with an interpolation... ;-)
> Have a look at the following part of my script, which runs at the GRASS-
> prompt, doing this "task":
> 
> cd $HOME/grass_data/$LOCATION/$MAPSET/site_lists/
> YOURPROGRAM YOURFILE >! $NAME
> s.surf.idw input=$NAME output=$NAME
> g.remove sites=$NAME
> 
> where YOURPROGRAM should do a conversation from YOURFILE to a file that
> has the format
> 
> lon|lat|val
> 
> Do not forget the "|"!!!
> (In my example YOURPROGRAM writes to stdout)
> 
> Regards,
> 
>         Stephan
> 
> P.S.: It might be not very nice, but it works  ...
> 
> --
> ------------------------------------------------------------------------
> 
> Stephan Eickschen                     Tel. : +49 (0)251 83-34704
> Westfaelische Wilhelms-Universitaet   Fax. : +49 (0)251 83-36100
> Institute for Geophysics
> Research Unit of Physical Glaciology  email: eicksch at uni-muenster.de
> Corrensstrasse 24
> 48149 Muenster
> Germany
> 
> ------------------------------------------------------------------------

-- 
Tom Adams                              adams at ohrfc.noaa.gov
                                       http://www.nws.noaa.gov/er/iln
Development & Operations Hydrologist   NWS-Ohio River Forecast Center
1901 S. State Route 134                Wilmington, OH 45177
(937) 383-0527 (VOICE)                 (937) 383-0033 (FAX)



More information about the grass-user mailing list