[GRASS-user] Re: GRASS and GMT

Patrick Dolan pdolan39 at gmail.com
Fri Apr 15 16:57:23 EDT 2011


Hello all,

I'm hoping that someone will be able to explain to me why a r.out.bin 
export of a SRTM 90 dem of the Central African Republic is being 
rejected by GMT's xyz2grd facility, because (for reasons that are 
unclear to me) there are exactly half of the expected number of records 
(see below).

I've appended a print out of g.region and r.info, as well as the error.

I have some experience with GRASS but little with GMT. If there are 
either necessary or unnecessary flags in the xyz2grd call, please let me 
know.

GRASS 6.4.1RC1 (CAR):~ > g.region -p
projection: 1 (UTM)
zone:       33
datum:      nad83
ellipsoid:  grs80
north:      554794
south:      221056
west:       388771
east:       1056770
nsres:      92.67925576
ewres:      92.67466704
rows:       3601
cols:       7208
cells:      25956008
GRASS 6.4.1RC1 (CAR):~ > r.info dem3
  +----------------------------------------------------------------------------+
  | Layer:    dem3                           Date: Tue Apr  5 21:42:55 
2011    |
  | Mapset:   PERMANENT                      Login of Creator: 
patrickdolan    |
  | Location: 
CAR                                                              |
  | DataBase: 
/Users/patrickdolan/Work/GRASSdata                               |
  | Title:     ( dem 
)                                                         |
  | Timestamp: 
none                                                            |
  |----------------------------------------------------------------------------|
  |                                                                            |
  |   Type of Map:  raster               Number of Categories: 
5034            |
  |   Data Type:    
CELL                                                       |
  |   Rows:         
3601                                                       |
  |   Columns:      
7208                                                       |
  |   Total Cells:  
25956008                                                   |
  |        Projection: UTM (zone 
33)                                           |
  |            N:     554794    S:     221056   Res: 
92.67925576               |
  |            E:    1056770    W:     388771   Res: 
92.67466704               |
  |   Range of data:    min = 290  max = 
926                                   |
  |                                                                            |
  |   Data 
Description:                                                        |
  |    generated by 
r.in.gdal                                                  |
  |                                                                            |
  |   
Comments:                                                                |
  |    r.in.gdal input="/Users/patrickdolan/oututm.tif" 
output="dem"           |
  |                                                                            |
  +----------------------------------------------------------------------------+

GRASS 6.4.1RC1 (CAR):~ > r.out.bin in=dem3 out=- | xyz2grd -Gcar.grd 
-R388771/1056770/221056/554794 -I92.67474256/92.67474256 -ZTLf -F -N-9999
Exporting raster as integer values (bytes=2)
Using the current region settings...
north=554794.000000
south=221056.000000
east=1056770.000000
west=388771.000000
r=3601
c=7208
  100%
xyz2grd: Found 12978004 records, but 25956008 was expected (aborting)!

Many thanks,

Patrick Dolan



More information about the grass-user mailing list