#2757: r.import: ERROR: Input raster map is outside current region
-------------------------+-------------------------
Reporter: neteler | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.0.2
Component: Python | Version: svn-trunk
Keywords: r.import | CPU: Unspecified
Platform: Unspecified |
-------------------------+-------------------------
Both in trunk and relbranch70 (r66401 for a needed backport) I face a
problem with r.import:
{{{
# get Bioclim data
wget
http://biogeo.ucdavis.edu/data/climate/worldclim/1_4/grid/cur/bio_2-5m_bil.zip
# unpack bioclim1
unzip bio_2-5m_bil.zip bio1.bil bio1.hdr
# check
gdalinfo bio1.bil
Driver: EHdr/ESRI .hdr Labelled
Files: bio1.bil
bio1.hdr
Size is 8640, 3600
Coordinate System is:
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"]],
AUTHORITY["EPSG","4326"]]
Origin = (-180.000000000003354,90.000000000000028)
Pixel Size = (0.041666666666667,-0.041666666666667)
Corner Coordinates:
Upper Left (-180.0000000, 90.0000000) (180d 0' 0.00"W, 90d 0' 0.00"N)
Lower Left (-180.0000000, -60.0000000) (180d 0' 0.00"W, 60d 0' 0.00"S)
Upper Right ( 180.0000000, 90.0000000) (180d 0' 0.00"E, 90d 0' 0.00"N)
Lower Right ( 180.0000000, -60.0000000) (180d 0' 0.00"E, 60d 0' 0.00"S)
Center ( -0.0000000, 15.0000000) ( 0d 0' 0.00"W, 15d 0' 0.00"N)
Band 1 Block=8640x1 Type=Int16, ColorInterp=Undefined
Min=-278.000 Max=319.000
NoData Value=-9999
# The goal is to reproject and import just
# the NC portion of the Bioclim1 map:
GRASS 7.1.svn (nc_spm_08_grass7): > g.region -dp
projection: 99 (Lambert Conformal Conic)
zone: 0
datum: nad83
ellipsoid: a=6378137 es=0.006694380022900787
north: 320000
south: 10000
west: 120000
east: 935000
nsres: 500
ewres: 500
rows: 620
cols: 1630
cells: 1010600
GRASS 7.1.svn (nc_spm_08_grass7): > r.import input=bio1.bil
output=bioclim1 resample=bilinear extent=region resolution=region
Proceeding with import of 1 raster bands...
WARNING: Fixing subtle input data rounding error of north boundary
(2.84217e-14>2.77778e-07)
Importing raster map <bioclim1>...
100%
Estimated target resolution for input band <bioclim1>: 4021.79
Reprojecting <bioclim1>...
ERROR: Input raster map is outside current region
ERROR: Unable to to reproject raster <bioclim1>
# while I don't really know what -n means:
GRASS 7.1.svn (nc_spm_08_grass7): > r.import input=bio1.bil
output=bioclim1 resample=bilinear extent=region resolution=region -n
Proceeding with import of 1 raster bands...
WARNING: Fixing subtle input data rounding error of north boundary
(2.84217e-14>2.77778e-07)
Importing raster map <bioclim1>...
100%
Estimated target resolution for input band <bioclim1>: 4021.79
Reprojecting <bioclim1>...
GRASS 7.1.svn (nc_spm_08_grass7): > r.info -r bioclim1
min=-nan
max=-nan
}}}
The import of the requested map subset is not working.
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2757>
GRASS GIS <https://grass.osgeo.org>