[GRASS-dev] r.in.gdal problems

Markus GRASS markus.metz.giswork at googlemail.com
Wed Jun 10 16:10:03 EDT 2009


Laura Toma wrote:
> Hi,
>
> I imported a large SRTM grid with r.in.gdal;  when starting grass64
> with this location there is an error.
> Some part of Grass seems to work despite this error, except d.rast
> shows a blank screen.  The east and west (see below)  have the same
> value, except E/W. Could this cause troubles?
Both values are smaller than 180, so they should not give problems in a
ll projection. What could give problems is the ew resolution of
0:00:00.000007 which is an amazing resolution for a DEM covering the
whole world, especially SRTM (native resolution is 0:00:03 for the world
coverage dataset). Should that not be the same like the ns resolution,
0:00:03? Maybe something went wrong with r.in.gdal? Does gdalinfo report
the same ew resolution? The resolution of 0:00:00.000007 can cause the
"divide by zero" error when trying to set the current region and/or
display parameters. A workaround may be to start grass in text mode and
set the region resolution to 0:00:03, both ns and ew, then start the
gui. Or manually edit the WIND and DEFAULT_WIND files before launching
grass.

Markus M
>
>
>
>
>
>
> GRASS 6.4.0RC4
> (northamericaSRTM3):~/gis/DATA/SRTM/SRTM-V2-frome0srp01u.ecs.nasa.gov/SRTM3/north_america
> > Error in startup script: divide by zero
>     while executing
> "expr round($parts(w)/$parts(ewres))*$parts(ewres)"
>     (procedure "MapCanvas::zoom_gregion" line 17)
>     invoked from within
> "MapCanvas::zoom_gregion $mon"
>     (procedure "MapCanvas::create" line 40)
>     invoked from within
> "MapCanvas::create"
>     (procedure "Gm::startmon" line 11)
>     invoked from within
> "Gm::startmon"
>     (procedure "Gm::create" line 79)
>     invoked from within
> "Gm::create"
>     (procedure "main" line 30)
>     invoked from within
> "main $argc $argv"
>     (file "/usr/local/grass/grass-6.4.0RC4/etc/gm/gm.tcl" line 566)
>
>
> GRASS 6.4.0RC4
> (northamericaSRTM3):~/gis/DATA/SRTM/SRTM-V2-frome0srp01u.ecs.nasa.gov/SRTM3/north_america
> > g.region -p
> projection: 3 (Latitude-Longitude)
> zone:       0
> datum:      wgs84
> ellipsoid:  wgs84
> north:      61:00:01.5N
> south:      9:59:58.5N
> west:       179:59:58.5E
> east:       179:59:58.5W
> nsres:      0:00:03
> ewres:      0:00:00.000007
> rows:       61201
> cols:       432001
> cells:      26438893201
>
>
> GRASS 6.4.0RC4
> (northamericaSRTM3):~/gis/DATA/SRTM/SRTM-V2-frome0srp01u.ecs.nasa.gov/SRTM3/north_america
> > r.info na_mosaic
>  +----------------------------------------------------------------------------+
>
>  | Layer:    na_mosaic                      Date: Tue Jun  9 21:54:39
> 2009    |
>  | Mapset:   PERMANENT                      Login of Creator:
> ltoma           |
>  | Location:
> northamericaSRTM3                                                |
>  | DataBase:
> /mnt/research/gis/DATA/grassdb/                                  |
>  | Title:     ( na_mosaic
> )                                                   |
>  | Timestamp:
> none                                                            |
>  |----------------------------------------------------------------------------|
>
>  |                                                                           
> |
>  |   Type of Map:  raster               Number of Categories:
> 5573            |
>  |   Data Type:   
> CELL                                                       |
>  |   Rows:        
> 61201                                                      |
>  |   Columns:     
> 432001                                                     |
>  |   Total Cells: 
> 26438893201                                                |
>  |        Projection:
> Latitude-Longitude                                      |
>  |            N: 61:00:01.5N    S: 9:59:58.5N   Res:
> 0:00:03                  |
>  |            E: 179:59:58.5W    W: 179:59:58.5E   Res:
> 0:00:00.000007        |
>  |   Range of data:    min = -291  max =
> 5573                                 |
>  |                                                                           
> |
>  |   Data
> Description:                                                        |
>  |    generated by
> r.in.gdal                                                  |
>  |                                                                           
> |
>  |  
> Comments:                                                               
> |
>  |    r.in.gdal input="na_mosaic.vrt"
> output="na_mosaic"                      |
>  |                                                                           
> |
>  +----------------------------------------------------------------------------+
>
>
>
> -Laura_______________________________________________
> grass-dev mailing list
> grass-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-dev



More information about the grass-dev mailing list