[GRASS-user] I need some help to import a GIS file to GRASS64

Micha Silver micha at arava.co.il
Thu Sep 30 06:07:20 EDT 2010


On 09/30/2010 11:13 AM, Ivan Henriquez Rivera wrote:
> Hello!
>
> My name is Ivan.
> I have been trying to import a GIS raster flie to GRASS64.
> I do the next proucedure in Ubuntu 10.04:
>
> -I run grass64
> -I define a new location using the EPSG code: 32161 (based in the 
> information at the end of this email)
> -When Grass asks me: Select datum transformation parameters,
>  I choose the second one: (Used in whole nad83 region. towgs84 = 
> 0.000, 0.000, 0.000)
> -Then I enter in the PERMANENT folder.
>
> And then I do this:
>
> r.in.gdal input=/home/ivan/grassdata/prgap_landcover.img output=puertoRico
> Projection of input dataset and current location appear to match
> r.in.gdal complete. Raster map <puertoRico> created.
> d.rast map=puertoRico at PERMANENT -o
> PNG: GRASS_TRUECOLOR status: TRUE
> PNG: collecting to file: 
> /home/ivan/grassdata/pr/PERMANENT/.tmp/ivan-laptop/6771.0.ppm,
>      GRASS_WIDTH=642, GRASS_HEIGHT=482
> g.pnmcomp in=6771.2.ppm mask=6771.2.pgm opacity=1.0 
> background=255:255:255 width=642 height=482 output=6771.1.ppm
> d.rast map=puertoRico at PERMANENT -o
> PNG: GRASS_TRUECOLOR status: TRUE
> PNG: collecting to file: 
> /home/ivan/grassdata/pr/PERMANENT/.tmp/ivan-laptop/6771.0.ppm,
>      GRASS_WIDTH=482, GRASS_HEIGHT=482
> g.pnmcomp in=6771.2.ppm mask=6771.2.pgm opacity=1.0 
> background=255:255:255 width=482 height=482 output=6771.1.ppm
> g.region n=18.529654 s=17.874067 e=-65.218506 w=-67.957335 rows=4793 
> cols=19279 nsres=15 ewres=15 tbres=1
> d.rast map=puertoRico at PERMANENT -o
> PNG: GRASS_TRUECOLOR status: TRUE
> PNG: collecting to file: 
> /home/ivan/grassdata/pr/PERMANENT/.tmp/ivan-laptop/6771.0.ppm,
>      GRASS_WIDTH=482, GRASS_HEIGHT=482
> g.pnmcomp in=6771.2.ppm mask=6771.2.pgm opacity=1.0 
> background=255:255:255 width=482 height=482 output=6771.1.ppm
> g.pnmcomp in=6771.2.ppm mask=6771.2.pgm opacity=1.0 
> background=255:255:255 width=482 height=482 output=6771.1.ppm
> d.rast map=puertoRico at PERMANENT -o
> PNG: GRASS_TRUECOLOR status: TRUE
> PNG: collecting to file: 
> /home/ivan/grassdata/pr/PERMANENT/.tmp/ivan-laptop/6771.0.ppm,
>      GRASS_WIDTH=482, GRASS_HEIGHT=482
> g.pnmcomp in=6771.2.ppm mask=6771.2.pgm opacity=1.0 
> background=255:255:255 width=482 height=482 output=6771.1.ppm
> d.rast map=puertoRico at PERMANENT -o
> PNG: GRASS_TRUECOLOR status: TRUE
> PNG: collecting to file: 
> /home/ivan/grassdata/pr/PERMANENT/.tmp/ivan-laptop/6771.3.ppm,
>      GRASS_WIDTH=642, GRASS_HEIGHT=154
> g.pnmcomp in=6771.5.ppm mask=6771.5.pgm opacity=1.0 
> background=255:255:255 width=642 height=154 output=6771.4.ppm
>
> The problem is that the Map Display is in blank.
Hi Ivan:
First, as Benjamin said, double check that your current region matches 
the imported raster.
Now, you'll need to start a monitor:
d.mon start=x0
and then run d.rast

When working on the command line, all the d.* commands are sent to 
whatever is the currently active monitor window. If no window was 
opened, then the d.* commands are sent to a *png file*. ( With the above 
commands, and no monitor window open, your landcover should be in the 
png image file: "6771.1.ppm")
So first start a monitor with d.mon, then you should see the raster in 
that window.

Alternatively, you can switch over to work straight in the GRASS GUI. 
Use the GUI "Layer Manager" to add your raster, and it will appear in 
the GUI "Map Display". Often I find it easiest to use the command line 
for running analyses, and in parallel, the GUI for displaying the results.
-- 
Micha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20100930/39448222/attachment.html


More information about the grass-user mailing list