[GRASSLIST:3358] landsat5_bsq

Hello grass users!

Please help!

I've downloaded Landsat 5 data from the
ftp://ftp.glcf.umiacs.umd.edu/glcf/Landsat/WRS2/p191/r025/LT5191025008419310
.TM-USGS/

They are provided as 7 separate bands in raw files (gzipped).

I managed to load them into a Grass 5.0.3 location with r.in.bin, but the
resolution I get is different from the one specified in a *.HD file shipped
with my Landsat 5 data set. In the *.HD file it's 28.5 both the NS and WE
but in Grass I get something around 30, and the NS and WE res differ. I'm
also not sure if I use the proper corner coordinates.

Should I use some other Grass program? If not - what should the r.in.bin's
options be exactly in my case?

the LT4191025009219110.HD file is listed and a thumbnail image shipped by
the data provider is attached

NDF_REVISION=0.00;
PRODUCT_NUMBER=01198123002090004;
DATA_FILE_INTERLEAVING=BSQ;
TAPE_SPANNING_FLAG=1/1;
START_LINE_NUMBER=1;
START_DATA_FILE=1;
BLOCKING_FACTOR=1;
MAP_PROJECTION_NAME=UTM;
USGS_PROJECTION_NUMBER=1;
USGS_MAP_ZONE=33;
USGS_PROJECTION_PARAMETERS=6378137.000000000000000,6356752.314140000400000,0
.000000000000000,0.000000000000000,0.000000000000000,0.000000000000000,0.000
000000000000,0.000000000000000,0.000000000000000,0.000000000000000,0.0000000
00000000,0.000000000000000,0.000000000000000,0.000000000000000,0.00000000000
0000;
HORIZONTAL_DATUM=WGS84;
EARTH_ELLIPSOID_SEMI-MAJOR_AXIS=6378137.000;
EARTH_ELLIPSOID_SEMI-MINOR_AXIS=6356752.314;
EARTH_ELLIPSOID_ORIGIN_OFFSET=0.000,0.000,0.000;
EARTH_ELLIPSOID_ROTATION_OFFSET=0.000000,0.000000,0.000000;
PRODUCT_SIZE=FULL_SCENE;
RESAMPLING=CC;
PROCESSING_DATE/TIME=123098/22494500;
PROCESSING_SOFTWARE=NLAPS_3_5_4E;
DATA_SET_TYPE=EDC_TM;
PIXEL_FORMAT=BYTE;
PIXEL_ORDER=NOT_INVERTED;
BITS_PER_PIXEL=8;
PIXELS_PER_LINE=6824;
LINES_PER_DATA_FILE=6388;
DATA_ORIENTATION=UPPER_LEFT/RIGHT;
NUMBER_OF_DATA_FILES=7;
LINES_PER_VOLUME=44716;
RECORD_SIZE=6824;
UPPER_LEFT_CORNER=0141500.0042E,0511547.6328N,447671.547,5679365.027;
UPPER_RIGHT_CORNER=0165706.5136E,0505151.0288N,637351.781,5636535.711;
LOWER_RIGHT_CORNER=0162013.7030E,0491632.8889N,597259.322,5458976.331;
LOWER_LEFT_CORNER=0134309.6950E,0493942.1275N,407579.088,5501805.647;
REFERENCE_POINT=SCENE_CENTER;
REFERENCE_POSITION=0151854.9601E,0501627.2788N,522465.435,5569170.679,3412.5
0,3194.50;
REFERENCE_OFFSET=-166.97,1.98;
ORIENTATION=12.723866;
WRS=191/025.0;
ACQUISITION_DATE/TIME=071184/09193534;
SATELLITE=LANDSAT_5;
SATELLITE_INSTRUMENT=TM;
PIXEL_SPACING=28.5000,28.5000;
PIXEL_SPACING_UNITS=METERS;
PROCESSING_LEVEL=08;
SUN_ELEVATION=55.84;
SUN_AZIMUTH=135.51;
NUMBER_OF_BANDS_IN_VOLUME=7;
BAND1_NAME=TM_BAND_1;
BAND1_WAVELENGTHS=0.45,0.52;
BAND1_RADIOMETRIC_GAINS/BIAS=0.6024314,-1.5200000;
BAND2_NAME=TM_BAND_2;
BAND2_WAVELENGTHS=0.52,0.60;
BAND2_RADIOMETRIC_GAINS/BIAS=1.1750981,-2.8399999;
BAND3_NAME=TM_BAND_3;
BAND3_WAVELENGTHS=0.63,0.69;
BAND3_RADIOMETRIC_GAINS/BIAS=0.8057647,-1.1700000;
BAND4_NAME=TM_BAND_4;
BAND4_WAVELENGTHS=0.76,0.90;
BAND4_RADIOMETRIC_GAINS/BIAS=0.8145490,-1.5100000;
BAND5_NAME=TM_BAND_5;
BAND5_WAVELENGTHS=1.55,1.75;
BAND5_RADIOMETRIC_GAINS/BIAS=0.1080784,-0.3700000;
BAND6_NAME=TM_BAND_6;
BAND6_WAVELENGTHS=10.40,12.50;
BAND6_RADIOMETRIC_GAINS/BIAS=0.0551582,1.2377996;
BAND7_NAME=TM_BAND_7;
BAND7_WAVELENGTHS=2.08,2.35;
BAND7_RADIOMETRIC_GAINS/BIAS=0.0569804,-0.1500000;
END_OF_HDR;

(attachments)

LT4191025009219110.preview.jpg

Maciek Sieczka wrote:

I've downloaded Landsat 5 data from the
ftp://ftp.glcf.umiacs.umd.edu/glcf/Landsat/WRS2/p191/r025/LT5191025008419310
.TM-USGS/

They are provided as 7 separate bands in raw files (gzipped).

I managed to load them into a Grass 5.0.3 location with r.in.bin, but the
resolution I get is different from the one specified in a *.HD file shipped
with my Landsat 5 data set. In the *.HD file it's 28.5 both the NS and WE
but in Grass I get something around 30, and the NS and WE res differ. I'm
also not sure if I use the proper corner coordinates.

Should I use some other Grass program? If not - what should the r.in.bin's
options be exactly in my case?

the LT4191025009219110.HD file is listed and a thumbnail image shipped by
the data provider is attached

UPPER_LEFT_CORNER=0141500.0042E,0511547.6328N,447671.547,5679365.027;
UPPER_RIGHT_CORNER=0165706.5136E,0505151.0288N,637351.781,5636535.711;
LOWER_RIGHT_CORNER=0162013.7030E,0491632.8889N,597259.322,5458976.331;
LOWER_LEFT_CORNER=0134309.6950E,0493942.1275N,407579.088,5501805.647;

This data isn't aligned to any known coordinate system, so you can't
just import it directly. You would need to use e.g. i.rectify to
transform it to the desired coordinate system.

--
Glynn Clements <glynn.clements@virgin.net>

I think that you can get those files as geotiffs if you want by going through
their web interface. It might be easier to import into GRASS, I haven't ever
had trouble that way at least.

http://glcfapp.umiacs.umd.edu:8080/esdi/index.jsp

-ian

Maciek Sieczka wrote:

> I've downloaded Landsat 5 data from the
>
ftp://ftp.glcf.umiacs.umd.edu/glcf/Landsat/WRS2/p191/r025/LT5191025008419310
> .TM-USGS/
>
> They are provided as 7 separate bands in raw files (gzipped).
>
> I managed to load them into a Grass 5.0.3 location with r.in.bin, but the
> resolution I get is different from the one specified in a *.HD file
shipped
> with my Landsat 5 data set. In the *.HD file it's 28.5 both the NS and WE
> but in Grass I get something around 30, and the NS and WE res differ. I'm
> also not sure if I use the proper corner coordinates.
>
> Should I use some other Grass program? If not - what should the r.in.bin's
> options be exactly in my case?
>
> the LT4191025009219110.HD file is listed and a thumbnail image shipped by
> the data provider is attached

> UPPER_LEFT_CORNER=0141500.0042E,0511547.6328N,447671.547,5679365.027;
> UPPER_RIGHT_CORNER=0165706.5136E,0505151.0288N,637351.781,5636535.711;
> LOWER_RIGHT_CORNER=0162013.7030E,0491632.8889N,597259.322,5458976.331;
> LOWER_LEFT_CORNER=0134309.6950E,0493942.1275N,407579.088,5501805.647;

This data isn't aligned to any known coordinate system, so you can't
just import it directly. You would need to use e.g. i.rectify to
transform it to the desired coordinate system.

--
Glynn Clements <glynn.clements@virgin.net>

-----------------------------------------------------
Ian MacMillan
Geological Sciences-UCSB

From: "Glynn Clements" <glynn.clements@virgin.net>

> UPPER_LEFT_CORNER=0141500.0042E,0511547.6328N,447671.547,5679365.027;
> UPPER_RIGHT_CORNER=0165706.5136E,0505151.0288N,637351.781,5636535.711;
> LOWER_RIGHT_CORNER=0162013.7030E,0491632.8889N,597259.322,5458976.331;
> LOWER_LEFT_CORNER=0134309.6950E,0493942.1275N,407579.088,5501805.647;

This data isn't aligned to any known coordinate system, so you can't
just import it directly. You would need to use e.g. i.rectify to
transform it to the desired coordinate system.

I'm not sure what you mean. They are somewhat "projected".
I mean I know the corners coordinates.

UPPER_LEFT_CORNER is 14d15'00.0042"E 51d15'47.6328"N which is 447671.547E
5679365.027N meters in the UTM, zone 33, WGS84

And so forth.

As you said I rectified the raster myself (using coords as above).

I get results close to reality but there is a shift of about 1 km beetwen
the rectified raster and an other TM of the same area - a geotiff which I
believe to be pretty well projected (verified with a topo map).
Also the resolution of the rectified raster is different than the "28.5
meters" stated in the *.HD file.

Do you have a clue what may be the reason?

What "order of transformation" should I use for the i.rectify?

How do you think: which points in the raster the coords listed above refer
to? - the black border corners or the "beginnings of the picture" itself?
(the thumbnail attached)

Maciek Sieczka

(attachments)

LT5191025008419310.preview.jpg

Maciek Sieczka wrote:

From: "Glynn Clements" <glynn.clements@virgin.net>

> > UPPER_LEFT_CORNER=0141500.0042E,0511547.6328N,447671.547,5679365.027;
> > UPPER_RIGHT_CORNER=0165706.5136E,0505151.0288N,637351.781,5636535.711;
> > LOWER_RIGHT_CORNER=0162013.7030E,0491632.8889N,597259.322,5458976.331;
> > LOWER_LEFT_CORNER=0134309.6950E,0493942.1275N,407579.088,5501805.647;
>
> This data isn't aligned to any known coordinate system, so you can't
> just import it directly. You would need to use e.g. i.rectify to
> transform it to the desired coordinate system.

I'm not sure what you mean. They are somewhat "projected".
I mean I know the corners coordinates.

What I mean is that region defined above doesn't form a rectangle in
any likely coordinate system, i.e. the top/bottom edges aren't
horizontal and the left/right edges aren't vertical. At a minimum, the
data is rotated, and may include skew or even a non-affine
transformation.

In GRASS, the X coordinate (easting) of a raster cell is determined
entirely by its column, while the Y coordinate (northing) is
determined entirely by its row.

UPPER_LEFT_CORNER is 14d15'00.0042"E 51d15'47.6328"N which is 447671.547E
5679365.027N meters in the UTM, zone 33, WGS84

And so forth.

As you said I rectified the raster myself (using coords as above).

I get results close to reality but there is a shift of about 1 km beetwen
the rectified raster and an other TM of the same area - a geotiff which I
believe to be pretty well projected (verified with a topo map).
Also the resolution of the rectified raster is different than the "28.5
meters" stated in the *.HD file.

Do you have a clue what may be the reason?

What "order of transformation" should I use for the i.rectify?

I don't have an answer for either of these.

How do you think: which points in the raster the coords listed above refer
to? - the black border corners or the "beginnings of the picture" itself?
(the thumbnail attached)

I don't have an answer for this either; however:

1. GRASS needs the coordinates of the coorners of the raster.

2. You need to know whether the coordinates refer to the corners of
the raster or to those of the "picture" in order to position the data
correctly.

--
Glynn Clements <glynn.clements@virgin.net>