[GRASSLIST:3447] r.in.gdal

I'm trying to import .dem files (I have the grass5.0.3 version), but a
segmentation fault occurs:

        GRASS:~ > r.in.gdal
                                                                                        
        OPTION: Bin raster file to be imported
             key: input
        required: YES
        enter option > /usr/local/marta/sud.dem
         
        You have chosen:
          input=/usr/local/marta/sud.dem
        Is this correct? (y/n) [y]
         
        OPTION: Band to select (default is all bands)
             key: band
        required: NO
        enter option >
         
        OPTION: Name for resultant raster map
             key: output
        required: YES
         
        Enter raster file name
        Enter 'list' for a list of existing raster files
        Hit RETURN to cancel request
        > sud_dem.rast
        <sud_dem.rast>
         
        OPTION: Name of location to read projection from for GCPs
        transformation
             key: target
        required: NO
        enter option >
         
        OPTION: Title for resultant raster map
             key: title
          format: "phrase"
        required: NO
        enter option >
         
        OPTION: Name for new location to create
             key: location
        required: NO
        enter option >
         
        FLAG: Set the following flag?
            Override projection (use locations projection)?(y/n) [n]
         
        FLAG: Set the following flag?
            Extend location extents based on new dataset.?(y/n) [n]
        Segmentation fault

So I tried processing this DEM with the commandline GDAL utilities
instead of the GRASS r.in.gdal command, and in this way it seems working
fine (I have GDAL 1.2.0):
        
        [root@geomorf2 root]# gdalinfo -mm /usr/local/marta/sud.dem
        Driver: USGSDEM/USGS Optional ASCII DEM
        Size is 935, 1250
        Coordinate System is:
        PROJCS["UTM Zone 33, Northern Hemisphere",
            GEOGCS["WGS 84",
                DATUM["WGS_1984",
                    SPHEROID["WGS 84",6378137,298.257223563,
                        AUTHORITY["EPSG","7030"]],
                    TOWGS84[0,0,0,0,0,0,0],
                    AUTHORITY["EPSG","6326"]],
                PRIMEM["Greenwich",0,
                    AUTHORITY["EPSG","8901"]],
                UNIT["degree",0.0174532925199433,
                    AUTHORITY["EPSG","9108"]],
                AXIS["Lat",NORTH],
                AXIS["Long",EAST],
                AUTHORITY["EPSG","4326"]],
            PROJECTION["Transverse_Mercator"],
            PARAMETER["latitude_of_origin",0],
            PARAMETER["central_meridian",15],
            PARAMETER["scale_factor",0.9996],
            PARAMETER["false_easting",500000],
            PARAMETER["false_northing",0]]
        Origin = (334305.000000,4762665.000000)
        Pixel Size = (90.00000000,-90.00000000)
        Corner Coordinates:
        Upper Left ( 334305.000, 4762665.000)
        Lower Left ( 334305.000, 4650165.000)
        Upper Right ( 418455.000, 4762665.000)
        Lower Right ( 418455.000, 4650165.000)
        Center ( 376380.000, 4706415.000)
        Band 1 Block=935x1250 Type=Float32, ColorInterp=Undefined
            Computed Min/Max=-27.000,2847.900
          NoData Value=-32767
          Unit Type: m
        
Could someone help me?!?!?

marta
        

Hello Marta

AFIK, probably your region settings don't are equal to your dem projection.
You can check what region you have with the command g.region.

Maybe you can use:

r.in.gdal -oe input=/usr/local/marta/sud.dem output=sud_dem.rast

the flags -eo means yes to the questions :
Override projection (use locations projection)?
and
Extend location extents based on new dataset.?

Have a nice day,

Guillermo

El Jue 20 May 2004 14:26, Marta Della Seta escribió:

I'm trying to import .dem files (I have the grass5.0.3 version), but a
segmentation fault occurs:

        GRASS:~ > r.in.gdal

        OPTION: Bin raster file to be imported
             key: input
        required: YES
        enter option > /usr/local/marta/sud.dem

        You have chosen:
          input=/usr/local/marta/sud.dem
        Is this correct? (y/n) [y]

        OPTION: Band to select (default is all bands)
             key: band
        required: NO
        enter option >

        OPTION: Name for resultant raster map
             key: output
        required: YES

        Enter raster file name
        Enter 'list' for a list of existing raster files
        Hit RETURN to cancel request

        > sud_dem.rast

        <sud_dem.rast>

        OPTION: Name of location to read projection from for GCPs
        transformation
             key: target
        required: NO
        enter option >

        OPTION: Title for resultant raster map
             key: title
          format: "phrase"
        required: NO
        enter option >

        OPTION: Name for new location to create
             key: location
        required: NO
        enter option >

        FLAG: Set the following flag?
            Override projection (use locations projection)?(y/n) [n]

        FLAG: Set the following flag?
            Extend location extents based on new dataset.?(y/n) [n]
        Segmentation fault

So I tried processing this DEM with the commandline GDAL utilities
instead of the GRASS r.in.gdal command, and in this way it seems working
fine (I have GDAL 1.2.0):

        [root@geomorf2 root]# gdalinfo -mm /usr/local/marta/sud.dem
        Driver: USGSDEM/USGS Optional ASCII DEM
        Size is 935, 1250
        Coordinate System is:
        PROJCS["UTM Zone 33, Northern Hemisphere",
            GEOGCS["WGS 84",
                DATUM["WGS_1984",
                    SPHEROID["WGS 84",6378137,298.257223563,
                        AUTHORITY["EPSG","7030"]],
                    TOWGS84[0,0,0,0,0,0,0],
                    AUTHORITY["EPSG","6326"]],
                PRIMEM["Greenwich",0,
                    AUTHORITY["EPSG","8901"]],
                UNIT["degree",0.0174532925199433,
                    AUTHORITY["EPSG","9108"]],
                AXIS["Lat",NORTH],
                AXIS["Long",EAST],
                AUTHORITY["EPSG","4326"]],
            PROJECTION["Transverse_Mercator"],
            PARAMETER["latitude_of_origin",0],
            PARAMETER["central_meridian",15],
            PARAMETER["scale_factor",0.9996],
            PARAMETER["false_easting",500000],
            PARAMETER["false_northing",0]]
        Origin = (334305.000000,4762665.000000)
        Pixel Size = (90.00000000,-90.00000000)
        Corner Coordinates:
        Upper Left ( 334305.000, 4762665.000)
        Lower Left ( 334305.000, 4650165.000)
        Upper Right ( 418455.000, 4762665.000)
        Lower Right ( 418455.000, 4650165.000)
        Center ( 376380.000, 4706415.000)
        Band 1 Block=935x1250 Type=Float32, ColorInterp=Undefined
            Computed Min/Max=-27.000,2847.900
          NoData Value=-32767
          Unit Type: m

Could someone help me?!?!?

marta