[GRASS-dev] [GRASS GIS] #2757: r.import: ERROR: Input raster map is outside current region

GRASS GIS trac at osgeo.org
Fri Mar 3 00:48:25 PST 2017


#2757: r.import: ERROR: Input raster map is outside current region
-------------------------+-------------------------------------------------
  Reporter:  neteler     |      Owner:  grass-dev@…
      Type:  defect      |     Status:  reopened
  Priority:  normal      |  Milestone:  7.0.6
 Component:  Python      |    Version:  svn-trunk
Resolution:              |   Keywords:  r.import, r.in.gdal, r.external,
       CPU:              |  r.region
  Unspecified            |   Platform:  All
-------------------------+-------------------------------------------------

Comment (by mmetz):

 Replying to [comment:19 neteler]:
 > I have tested r70664 with the GMTED2010 elevation model:
 >
 original resolution and extents:
 > {{{
 > gdalinfo
 /vsizip/vsicurl/http://edcintl.cr.usgs.gov/downloads/sciweb1/shared/topo/downloads/GMTED/Grid_ZipFiles/mn30_grd.zip/mn30_grd
 -nofl -norat
 > [...]
 > Pixel Size = (0.008333333300000,-0.008333333300000)
 > Corner Coordinates:
 > Upper Left  (-180.0001389,  83.9998604) (180d 0' 0.50"W, 83d59'59.50"N)
 > Lower Left  (-180.0001389, -90.0001389) (180d 0' 0.50"W, 90d 0' 0.50"S)
 > Upper Right ( 179.9998597,  83.9998604) (179d59'59.49"E, 83d59'59.50"N)
 > Lower Right ( 179.9998597, -90.0001389) (179d59'59.49"E, 90d 0' 0.50"S)
 > Center      (  -0.0001396,  -3.0001392) (  0d 0' 0.50"W,  3d 0' 0.50"S)
 >
 > }}}

 resolution and extents of the imported map:
 > {{{
 > GRASS 7.3.svn (latlong_wgs84):~ > g.region raster=gmted2010_mn30_grd -g
 > 90 degree south is exceeded by 0.0166667 cells
 > 90 degree south is exceeded by 0.0166667 cells
 > 90 degree south is exceeded by 0.0166667 cells
 > projection=3
 > zone=0
 > n=83.9998611111111
 > s=-90.0001388888889
 > w=-180.000138888889
 > e=179.999861111111
 > nsres=0.00833333333333333
 > ewres=0.00833333333333333
 > rows=20880
 > cols=43200
 > cells=902016000
 > }}}

 Why g.region -g? Here, g.region -p is more informative because it uses DMS
 format.
 >
 >
 > Observation: Still the E-W center is not 0 and n=83.9998611111111 (I
 expected > 84N but maybe an issue with the original data?):

 Why do you expect N > 84N? gdal reports 83d59'59.50"N.

 > Another question:
 >
 > What would be the best way now to "silence" the excess messages?

 These messages are important because they indicate region settings that
 are not compatible with G7.2 or earlier.

 > Adjust the computational region and make a map copy with r.mapcalc to
 fit into -180..+180, -90..+90?

 Why do you want to fit the map into -180 / 180, -90 / 90? The original map
 extents with east corrected for limited fp precision are

 {{{
 w=180:00:00.50W
 e=179:59:59.50E
 n=83:59:59.50N
 s=90:00:00.50S
 }}}

 In trunk, this is a perfectly valid region, even though South is south of
 90S by half a second.

 Also, r.region is much easier than r.mapcalc in this case, if there is
 still need to correct the extents and resolution of the imported map.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2757#comment:20>
GRASS GIS <https://grass.osgeo.org>



More information about the grass-dev mailing list