[GRASSLIST:4128] Re: [Gdal-dev] Re: BSQ import question

Markus Neteler neteler at itc.it
Sun Aug 8 12:53:18 EDT 2004


On Sat, Aug 07, 2004 at 11:57:39PM +0400, Andrey Kiselev wrote:
> On Wed, Aug 04, 2004 at 06:11:35PM +0200, Markus Neteler wrote:
> > The global land cover file is at:
> >  ftp://ftp.glcf.umiacs.umd.edu/glcf/Global_Land_Cover/Global/gl-latlong-1km-landcover/
> > 
> >  Information
> >  Image Size: 				43200 Pixels 21600 Lines 
> >  Quantization:			    8-bit unsigned integer
> >  Output Georeferenced Units: LONG/LAT E019
> >  Projection:    				Geographic (geodetic)
> >  Earth Ellipsoid:			Sphere, rad 6370997 m 
> >  Upper Left Corner:			180d00'00.00" W Lon90d00'00.00" N Lat
> >  Lower Right Corner:			180d00'00.00" E Lon 90d00'00.00" S Lat
> >  Pixel Size (in Degrees):	0.00833 Lon 0.00833 Lat
> >  (Equivalent Deg,Min,Sec):	0d00'30.00"0d00'30.00" 
> >  UpLeftX:					-180 
> >  UpLeftY:      				90
> >  LoRightX:        			180
> >  LoRightY:      				-90
> > 
> > 
> > -> note the Sphere!
> > This is relevant for the definition of the location.
> > See 'gl-latlong-1km-landcover.grasslocation.txt' attachment for details.
> > 
> > > Some of you are probably familiar with this.  Assuming this, I
> > > have a few questions from GRASS 5.3.
> > [...]
> > > Any ideas?  Has anyone worked with this data set?  I'm running this on
> > > a linux box, if it matters.
> > 
> > Use r.in.gdal instead. It's way easier. You just have to generate
> > a BSQ ENVI header file, then import the map (find attached the file).
> > I hope I got that file right, following
> >  http://glcf.umiacs.umd.edu/data/guide/fileformat/bsq.shtml
> >  => RSI ENVI 3.6
> >     However, I didn't set bands = 14 but bands = 1
> > 
> > Now check with 'gdalinfo':
> > gdalinfo -mm gl-latlong-1km-landcover.bsq
> > Driver: ENVI/ENVI .hdr Labelled
> > Size is 43200, 21600
> > Coordinate System is:
> > LOCAL_CS["Geographic Lat/Lon",
> >     UNIT["Meter",1]]
> > Origin = (-180.000000,90.000000)
> > Pixel Size = (0.00833333,-0.00833333)
> > Corner Coordinates:
> > Upper Left  (-180.0000000,  90.0000000)
> > Lower Left  (-180.0000000, -90.0000000)
> > Upper Right ( 180.0000000,  90.0000000)
> > Lower Right ( 180.0000000, -90.0000000)
> > Center      (  -0.0000000,   0.0000000)
> > Band 1 Block=43200x1 Type=Byte, ColorInterp=Undefined
> >     Computed Min/Max=0.000,13.000
> > 
> > IMHO the projection is not detected completely by GDAL,
> > or should it be LOCAL_CS?
> 
> Markus,
> 
> I can't reproduce your result. I have the following with your .hdr file:
> 
> $ gdalinfo gl-latlong-1km-landcover.bsq 
> Driver: ENVI/ENVI .hdr Labelled
> Size is 43200, 21600
> 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"]],
>     AXIS["Lat",NORTH],
>     AXIS["Long",EAST],
>     AUTHORITY["EPSG","4326"]]
> Origin = (-180.000000,90.000000)
> Pixel Size = (0.00833333,-0.00833333)
> Corner Coordinates:
> Upper Left  (-180.0000000,  90.0000000) (180d 0'0.00"W, 90d 0'0.00"N)
> Lower Left  (-180.0000000, -90.0000000) (180d 0'0.00"W, 90d 0'0.00"S)
> Upper Right ( 180.0000000,  90.0000000) (180d 0'0.00"E, 90d 0'0.00"N)
> Lower Right ( 180.0000000, -90.0000000) (180d 0'0.00"E, 90d 0'0.00"S)
> Center      (  -0.0000000,   0.0000000) (  0d 0'0.00"W,  0d 0'0.00"N)
> Band 1 Block=43200x1 Type=Byte, ColorInterp=Undefined
>   Description = Band 1
> 
> 
> Are you using the latest CVS snapshot?

Andrey,

yes: latest and greatest GDAL and PROJ4 CVS (as always).
I'll double-check and recompile from scratch, maybe
you could send me your ENVI hdr file off-list? Perhaps
an issue of caps letters?

Markus
 
> 
> -- 
> Andrey V. Kiselev
> Home phone:  +7 812 5274898  ICQ# 26871517

-- 
Markus Neteler     <neteler itc it>       http://mpa.itc.it
ITC-irst -  Centro per la Ricerca Scientifica e Tecnologica
MPBA - Predictive Models for Biol. & Environ. Data Analysis
Via Sommarive, 18        -       38050 Povo (Trento), Italy



More information about the Gdal-dev mailing list