[GRASS-user] Converting txt file into raster layer

Carbonari, Katie (IS) Katie.Carbonari at ngc.com
Fri Dec 4 13:51:18 EST 2009


Thanks for the help Daniel. I did break up my very large file into lots of smaller files (each of the 5 variables are in 142 different files, one per time step, so now each file has just one time step and one variable in it). The grid is irregular and I have a shapefile that I have read into GRASS with no problem. Each cell in the shapefile corresponds to a line in my new txt files.  (Ex, Elevation_00.txt has 228,000 lines, with each line having the elevation corresponding the cell number (line 3 is for cell number 3), where the cell numbers are defined by a shapefile).

What I'm confused about is how to "marry" the 2 together? How do I let GRASS know that I want my text file data put on the same grid as my shapefile data? Has anyone attempted to do this? Any help would be great.

Thanks for all your help so far!
Katie



-----Original Message-----
From: Daniel Victoria [mailto:daniel.victoria at gmail.com]
Sent: Wed 12/2/2009 6:26 PM
To: Carbonari, Katie (IS)
Cc: grass-user at lists.osgeo.org
Subject: Re: [GRASS-user] Converting txt file into raster layer
 
I'd go with v.in.ascii or r.in.xyz but, for both, you will need to
know the coordinates of each grid cell.

Another thing to look for is, if you have more than one observation
per time, you might have to separate the file and create one map (or
layer) for each time step. That's something easily done with NetCDF
and programs like GrADS....

Cheers
Daniel

On Wed, Dec 2, 2009 at 5:29 PM, Carbonari, Katie (IS)
<Katie.Carbonari at ngc.com> wrote:
>
> Good afternoon. A client of mine has given me a large text file (1.6Gig)
> that he wants visualized in GRASS. In the file, there are 7 columns (Time,
> Grid Cell Number, Elevation, Thickness, Topography height, U of water
> velocity, V of water velocity). I've never taken something in text form and
> put it into GRASS. Any suggestions on how to start? My first thought was to
> convert to netcdf import from there (since I have some experience working
> with netcdf in GRASS). Is there a more straight-forward way to do this? I
> have the projection information in a separate shapefile in order to
> geolocate.
>
> Any help would be greatly appreciated.
>
> Thanks!
> Katie
>
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20091204/d4970daa/attachment.html


More information about the grass-user mailing list