Glynn,
this is excellent! Thanks so much. I have tested it but no success yet:
On Wed, Aug 20, 2008 at 1:46 PM, Glynn Clements
<glynn@gclements.plus.com> wrote:
Glynn Clements wrote:
> > > BTW, a r.external would be a great addition.It's not that much work.
...
Tomorrow, I'll look into creating an r.external module, adding null
support, etc.Okay, done (well, enough to try it out without having to manually hack
the files; null support is absent).
[for my convenience I have copied it over to GRASS 6.4.svn locally]
GRASS 6.4.svn (pat):~ > gdalinfo
/geodata2_originals_raid5/pat_OFD_RGB_IT2006_GB/060100.tif
Driver: GTiff/GeoTIFF
Files: /geodata2_originals_raid5/pat_OFD_RGB_IT2006_GB/060100.tif
Size is 13440, 11760
Coordinate System is:
PROJCS["Monte Mario / Italy zone 1",
GEOGCS["Monte Mario",
DATUM["Monte_Mario",
SPHEROID["International 1924",6378388,297.0000000000014,
AUTHORITY["EPSG","7022"]],
AUTHORITY["EPSG","6265"]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433],
AUTHORITY["EPSG","4265"]],
PROJECTION["Transverse_Mercator"],
PARAMETER["latitude_of_origin",0],
PARAMETER["central_meridian",9],
PARAMETER["scale_factor",0.9996],
PARAMETER["false_easting",1500000],
PARAMETER["false_northing",0],
UNIT["metre",1,
AUTHORITY["EPSG","9001"]],
AUTHORITY["EPSG","3003"]]
Origin = (1660920.000000000000000,5107440.000000000000000)
Pixel Size = (0.500000000000000,-0.500000000000000)
Metadata:
AREA_OR_POINT=Area
TIFFTAG_SOFTWARE=Adobe Photoshop CS2 Macintosh
TIFFTAG_DATETIME=2007:03:01 06:12:15
TIFFTAG_XRESOLUTION=72
TIFFTAG_YRESOLUTION=72
TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
Image Structure Metadata:
INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left ( 1660920.000, 5107440.000) ( 11d 4'54.85"E, 46d 6'2.53"N)
Lower Left ( 1660920.000, 5101560.000) ( 11d 4'47.69"E, 46d 2'52.14"N)
Upper Right ( 1667640.000, 5107440.000) ( 11d10'7.61"E, 46d 5'56.71"N)
Lower Right ( 1667640.000, 5101560.000) ( 11d10'0.15"E, 46d 2'46.33"N)
Center ( 1664280.000, 5104500.000) ( 11d 7'27.57"E, 46d 4'24.46"N)
Band 1 Block=13440x1 Type=Byte, ColorInterp=Red
Overviews: 6720x5880, 3360x2940, 1680x1470, 840x735, 420x368, 210x184
Band 2 Block=13440x1 Type=Byte, ColorInterp=Green
Overviews: 6720x5880, 3360x2940, 1680x1470, 840x735, 420x368, 210x184
Band 3 Block=13440x1 Type=Byte, ColorInterp=Blue
Overviews: 6720x5880, 3360x2940, 1680x1470, 840x735, 420x368, 210x184
GRASS 6.4.svn (pat):~ > r.external
/geodata2_originals_raid5/pat_OFD_RGB_IT2006_GB/060100.tif
out=ortho_trento
Projection of input dataset and current location appear to match
<ortho_trento> created
r.external complete.
GRASS 6.4.svn (pat):~ > g.region rast=ortho_trento -p
projection: 99 (Transverse Mercator)
zone: 0
datum: rome40
ellipsoid: international
north: 5107440
south: 5101560
west: 1660920
east: 1667640
nsres: 0.5
ewres: 0.5
rows: 11760
cols: 13440
cells: 158054400
GRASS 6.4.svn (pat):~ > d.rast ortho_trento
WARNING: Error reading map <ortho_trento@PERMANENT>, row 0
100%
r.info -r ortho_trento
WARNING: category support for [ortho_trento] in mapset [PERMANENT] missing
min=NULL
max=NULL
GRASS 6.4.svn (pat):~ > r.support ortho_trento
Edit header for [ortho_trento]? (y/n) [n]
Update the statistics (histogram, range) for [ortho_trento]? (y/n) [n] y
Updating statistics for [ortho_trento]
WARNING: Error reading map <ortho_trento@PERMANENT>, row 0
WARNING: Histogram for [ortho_trento in PERMANENT] missing (run r.support)
Edit the category file for [ortho_trento]? (y/n) [n]
Create/Update the color table for [ortho_trento]? (y/n) [n]
Edit the history file for [ortho_trento]? (y/n) [n]
The null file for [ortho_trento] may indicate that some cells contain
no data. If the null file for [ortho_trento] doesn't exist, zero cells in
it are treated by GRASS application programs as no data.
Do you want to create/reset the null file for [ortho_trento] so that
null cell values are considered valid data? (y/n) [n]
Do you want to delete the null file for [ortho_trento]
(all zero cells will then be considered no data)? (y/n) [n]
GRASS 6.4.svn (pat):~ > ls -la grassdata/pat/PERMANENT/cell_misc/ortho_trento/
total 86
drwxrwxr-x 2 neteler neteler 1024 2008-08-20 13:49 .
drwx---r-x 8 neteler neteler 84992 2008-08-20 13:49 ..
-rw-rw-r-- 1 neteler neteler 92 2008-08-20 13:49 gdal
-rw-rw-r-- 1 neteler neteler 0 2008-08-20 13:49 range
GRASS 6.4.svn (pat):~ > cat grassdata/pat/PERMANENT/cell_misc/ortho_trento/gdal
file: /geodata2_originals_raid5/pat_OFD_RGB_IT2006_GB/060100.tif
band: 1
null: none
type: 1
GRASS 6.4.svn (pat):~ > cat grassdata/pat/PERMANENT/cellhd/ortho_trento
proj: 99
zone: 0
north: 5107440
south: 5101560
east: 1667640
west: 1660920
cols: 13440
rows: 11760
e-w resol: 0.5
n-s resol: 0.5
format: 0
compressed: 0
The same happens with a GeoTIFF without overviews..
And the same happens in GRASS 7.
Markus