[GRASS-user] import tif and display it

Hamish hamish_b at yahoo.com
Thu Jan 17 00:13:14 EST 2008


doppelM wrote:
> > > i have imported some tif files with r.in.gdal and displayed them
> > > in a monitor. but one large tif file can't be displayed.
> > > 
> > > r.info said that:
> > > 
> > > Type of Map:  raster		   Number of Categories: 255	      
> > > Data Type:    CELL						      
> > > Rows:	      9091						      
> > > Columns:      109091						      
> > > Total Cells:  991746281 					      
> > >      Projection: Latitude-Longitude (zone 0)			      
> > > 	 N: 89:59:59.197727N	S: 59:59:58.117727N   Res: 0:00:11.88 
> > > 	 E: 179:59:58.92W    W:       180W   Res: 0:00:00.00001       
> > > Range of data:    min = 1  max = 255				      
> > > 							         
> > > Data Description:						      
> > >  generated by r.in.gdal 	
> > > 
> > > the other importet tif files have 9091 rows & 9091 colums and are
> > > displayed correctly!
> > > 
> > > i set with g.region the region of the file with the information
> > > from r.info but it doesn't help - nothing is displayed
> > > can anybody explain me because this file can't be displayed? is
> > > there a border of the filesize? i have absolutly no idea

Hamish:
> > Look at the number of columns from r.info- the east/west region
> > settings are wrong, and wrapping around the whole planet. 

doppelM:
> it is correct that the tif file is wrapping around whole the planet.
> i have a global map of the moon and this file covers the northern
> polregion of it.
> 
> > what does 'gdalinfo' say about the tif file?
> 
> Size is 109091, 9091
> Coordinate System is:
> GEOGCS["GCS_Moon_2000",
>     DATUM["unknown",
>         SPHEROID["unnamed",1737400,0]],
>     PRIMEM["Greenwich",0],
>     UNIT["degree",0.0174532925199433]]
> Origin = (-179.999999999999972,89.999777146508123)
> Pixel Size = (0.003300000000000,-0.003300000000000)
> Metadata:
>   AREA_OR_POINT=Area
> Image Structure Metadata:
>   COMPRESSION=LZW
>   INTERLEAVE=BAND
> Corner Coordinates:
> Upper Left  (-180.0000000,  89.9997771) (180d 0'0.00"W,
> 89d59'59.20"N)
> Lower Left  (-180.0000000,  59.9994771) (180d 0'0.00"W,
> 59d59'58.12"N)
> Upper Right ( 180.0003000,  89.9997771) (180d 0'1.08"E,
> 89d59'59.20"N)
> Lower Right ( 180.0003000,  59.9994771) (180d 0'1.08"E,
> 59d59'58.12"N)
> Center      (   0.0001500,  74.9996271) (  0d 0'0.54"E,
> 74d59'58.66"N)
> Band 1 Block=109091x1 Type=Byte, ColorInterp=Gray
>   NoData Value=0


so d.rast is choking on a near 4GB file (uncompressed). (426k/row?)

Can you view it zoomed in to a 9000x9000 region?

Can you break the Tif into a number smaller tiles with 'gdal_translate
-srcwin' or break the grass map up into smaller tiles with g.region +
r.mapcalc?

for an example using gdal_translate see gdal_slice.sh at
  http://hamish.bowman.googlepages.com/gpsdrivefiles#tiles


Hamish



      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 




More information about the grass-user mailing list