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

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 created.
d.rast map=puertoRico@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@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@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@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@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.

If you want to try it, you can donwload the file from ftp://ftp.gap.uidaho.edu/products/Puerto_Rico/GISdata/Landcover/1_Land_cover_grid/
the file is prgap_landcover.zip, and inside you will find the a .img file

Here I add more Information:

Spatial_Domain:
    Bounding_Coordinates:
      West_Bounding_Coordinate: -67.957335
      East_Bounding_Coordinate: -65.218506
      North_Bounding_Coordinate: 18.529654
      South_Bounding_Coordinate: 17.874067

```
Spatial_Data_Organization_Information:
  Direct_Spatial_Reference_Method: Raster
  Raster_Object_Information:
    Raster_Object_Type: Pixel
    Row_Count: 4793
    Column_Count: 19279
    Vertical_Count: 1
Spatial_Reference_Information:
  Horizontal_Coordinate_System_Definition:
    Planar:
      Map_Projection:
        Map_Projection_Name: Lambert Conformal Conic
        Lambert_Conformal_Conic:
          Standard_Parallel: 18.033333
          Standard_Parallel: 18.433333
          Longitude_of_Central_Meridian: -66.433333
          Latitude_of_Projection_Origin: 17.833333
          False_Easting: 200000.000000
          False_Northing: 200000.000000
      Planar_Coordinate_Information:
        Planar_Coordinate_Encoding_Method: row and column
        Coordinate_Representation:
          Abscissa_Resolution: 15
          Ordinate_Resolution: 15
        Planar_Distance_Units: meters
    Geodetic_Model:
      Horizontal_Datum_Name: North American Datum of 1983
      Ellipsoid_Name: Geodetic Reference System 80
      Semi-major_Axis: 6378137.000000
      Denominator_of_Flattening_Ratio: 298.257222
Entity_and_Attribute_Information:
  Detailed_Description:
    Entity_Type:
      Entity_Type_Label: Layer_1
    Attribute:
      Attribute_Label: ObjectID
      Attribute_Definition: Internal feature number.
      Attribute_Definition_Source: ESRI
      Attribute_Domain_Values:
        Unrepresentable_Domain: Sequential unique whole numbers that are automatically generated.
    Attribute:
      Attribute_Label: Value
      Attribute_Definition: A number assigned to each specific land cover class or type.
    Attribute:
      Attribute_Label: Red
    Attribute:
      Attribute_Label: Green
    Attribute:
      Attribute_Label: Blue
    Attribute:
      Attribute_Label: Class_names
      Attribute_Definition: Land cover types
    Attribute:
      Attribute_Label: Opacity
    Attribute:
      Attribute_Label: Count
      Attribute_Definition: Number of pixels of each land cover type.
```

Standard_Order_Process:
    Digital_Form:
      Digital_Transfer_Information:
        Format_Name: ERDAS
        Format_Version_Date: November 03, 2006.
        Format_Specification: This landcover was developed using ERDAS IMAGINE 8.7.
        Format_Information_Content: This raster dataset represent the landcover for Puerto Rico and it's adyacent islands.
        File_Decompression_Technique: no compression applied
        Transfer_Size: 0.000


Thanks for your help!
-- 

Iván Henríquez

Are you sure you have the right extents?
Try

g.region rast=puertoRico

then display again. Also, you could try:

r.info puertoRico

to get the raster statistics and extent and check
if it makes sense.

Are you on Windows?
The output below shows that the map is being written
to a PNG output file. Did you check that file?

Cheers,

Ben

----- Original Message -----

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@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@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@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@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@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.

If you want to try it, you can donwload the file from
ftp://ftp.gap.uidaho.edu/products/Puerto_Rico/GISdata/Landcover/1_Land_cover_grid/
the file is prgap_landcover.zip , and inside you will find the a .img
file

Here I add more Information:
Spatial_Domain:
Bounding_Coordinates:
West_Bounding_Coordinate: -67.957335
East_Bounding_Coordinate: -65.218506
North_Bounding_Coordinate: 18.529654
South_Bounding_Coordinate: 17.874067
Spatial_Data_Organization_Information:
Direct_Spatial_Reference_Method: Raster
Raster_Object_Information:
Raster_Object_Type: Pixel
Row_Count: 4793
Column_Count: 19279
Vertical_Count: 1
Spatial_Reference_Information:
Horizontal_Coordinate_System_Definition:
Planar:
Map_Projection:
Map_Projection_Name: Lambert Conformal Conic
Lambert_Conformal_Conic:
Standard_Parallel: 18.033333
Standard_Parallel: 18.433333
Longitude_of_Central_Meridian: -66.433333
Latitude_of_Projection_Origin: 17.833333
False_Easting: 200000.000000
False_Northing: 200000.000000
Planar_Coordinate_Information:
Planar_Coordinate_Encoding_Method: row and column
Coordinate_Representation:
Abscissa_Resolution: 15
Ordinate_Resolution: 15
Planar_Distance_Units: meters
Geodetic_Model:
Horizontal_Datum_Name: North American Datum of 1983
Ellipsoid_Name: Geodetic Reference System 80
Semi-major_Axis: 6378137.000000
Denominator_of_Flattening_Ratio: 298.257222
Entity_and_Attribute_Information:
Detailed_Description:
Entity_Type:
Entity_Type_Label: Layer_1
Attribute:
Attribute_Label: ObjectID
Attribute_Definition: Internal feature number.
Attribute_Definition_Source: ESRI
Attribute_Domain_Values:
Unrepresentable_Domain: Sequential unique whole numbers that are
automatically generated.
Attribute:
Attribute_Label: Value
Attribute_Definition: A number assigned to each specific land cover
class or type.
Attribute:
Attribute_Label: Red
Attribute:
Attribute_Label: Green
Attribute:
Attribute_Label: Blue
Attribute:
Attribute_Label: Class_names
Attribute_Definition: Land cover types
Attribute:
Attribute_Label: Opacity
Attribute:
Attribute_Label: Count
Attribute_Definition: Number of pixels of each land cover type.
Standard_Order_Process:
Digital_Form:
Digital_Transfer_Information:
Format_Name: ERDAS
Format_Version_Date: November 03, 2006.
Format_Specification: This landcover was developed using ERDAS IMAGINE
8.7.
Format_Information_Content: This raster dataset represent the
landcover for Puerto Rico and it's adyacent islands.
File_Decompression_Technique: no compression applied
Transfer_Size: 0.000
Thanks for your help! --
Iván Henríquez

_______________________________________________ grass-user mailing
list grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

------
Files attached to this email may be in ISO 26300 format (OASIS Open Document Format). If you have difficulty opening them, please visit http://iso26300.info for more information.

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 created.
d.rast map=puertoRico@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@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@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@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@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