[Gdal-dev] GDAL 1.2.0 Beta Release - Error

Lorenzo Moretti lorenzo.moretti at bologna.enea.it
Thu Mar 4 05:36:17 EST 2004


>Lorenzo,
>
>As a convenience someone changed r.in.gdal to use band names derived
>from the apparent photometric interpretation.  I believe the photometric
>interpretation improved between GDAL 1.1.8 and 1.1.9 which is why
>changing gets the altered names.
>
>>and I must change the name of 2 files.
>>I read the QuickBird specification and the bands are blue, green, red.
>
>But what does it say in the TIFF file?  It doesn't really matter what it
>says in the quickbird specficiation if they produce confusing TIFF files.
>What is the "tiffinfo" report for the files in question?
>
>Best regards,

Frank

 From tiffinfo (from libtiff)

[lor:/] lor% /usr/local/grasslib/bin/tiffinfo 
/Volumes/ESTERNO/cartografia/file_esterni/QB/PALE/PAN+MS/scena_destra/03MAY19095313-M2AS_R1C1-000000040462_01_P002.TIF
TIFFReadDirectory: Warning, 
/Volumes/ESTERNO/cartografia/file_esterni/QB/PALE/PAN+MS/scena_destra/03MAY19095313-M2AS_R1C1-000000040462_01_P002.TIF: 
unknown field with tag 33550 (0x830e) encountered.
TIFFReadDirectory: Warning, 
/Volumes/ESTERNO/cartografia/file_esterni/QB/PALE/PAN+MS/scena_destra/03MAY19095313-M2AS_R1C1-000000040462_01_P002.TIF: 
unknown field with tag 33922 (0x8482) encountered.
TIFFReadDirectory: Warning, 
/Volumes/ESTERNO/cartografia/file_esterni/QB/PALE/PAN+MS/scena_destra/03MAY19095313-M2AS_R1C1-000000040462_01_P002.TIF: 
unknown field with tag 34735 (0x87af) encountered.
TIFFReadDirectory: Warning, 
/Volumes/ESTERNO/cartografia/file_esterni/QB/PALE/PAN+MS/scena_destra/03MAY19095313-M2AS_R1C1-000000040462_01_P002.TIF: 
unknown field with tag 34736 (0x87b0) encountered.
TIFFReadDirectory: Warning, 
/Volumes/ESTERNO/cartografia/file_esterni/QB/PALE/PAN+MS/scena_destra/03MAY19095313-M2AS_R1C1-000000040462_01_P002.TIF: 
unknown field with tag 34737 (0x87b1) encountered.
TIFF Directory at offset 0x2000018
   Image Width: 2048 Image Length: 2048
   Bits/Sample: 16
   Sample Format: unsigned integer
   Compression Scheme: None
   Photometric Interpretation: RGB color
   Extra Samples: 1<unspecified>
   Date & Time: "2003:05:29 03:22:32"
   Copyright: "(C) COPYRIGHT 2002 EarthWatch Incorporated, Longmont CO 
USA 80501-6700"
   Image Description: "{\n  bandList = \n  [\n    1;\n    2;\n    
3;\n    4;\n  ]\n}"
   Orientation: row 0 top, col 0 lhs
   Samples/Pixel: 4
   Rows/Strip: 256
   Min Sample Value: 0
   Max Sample Value: 2006
   Planar Configuration: separate image planes
[lor:/] lor%

 From .IMD file (image meta data file) of my .TIF file of QUICBIRD I have:

version = "N";
generationTime = 2003-05-29T03:23:37.000000Z;
productOrderId = "000000040462_01_P002";
imageDescriptor = "Standard2A";
bandId = "Multi";
panSharpenAlgorithm = "None";
numRows = 5955;
numColumns = 5943;
productLevel = "LV2A";
radiometricLevel = "Corrected";
bitsPerPixel = 16;
compressionType = "None";
BEGIN_GROUP = BAND_B
	ULLon =   12.74969287;
	ULLat =   43.05077675;
	ULHAE =     0.00;
	URLon =   12.95384508;
	URLat =   43.05461067;
	URHAE =     0.00;
	LRLon =   12.95881598;
	LRLat =   42.90458014;
	LRHAE =     0.00;
	LLLon =   12.75515876;
	LLLat =   42.90076616;
	LLHAE =     0.00;
	absCalFactor = 1.431000e-02;
END_GROUP = BAND_B;
BEGIN_GROUP = BAND_G
	ULLon =   12.74969287;
	ULLat =   43.05077675;
	ULHAE =     0.00;
	URLon =   12.95384508;
	URLat =   43.05461067;
	URHAE =     0.00;
	LRLon =   12.95881598;
	LRLat =   42.90458014;
	LRHAE =     0.00;
	LLLon =   12.75515876;
	LLLat =   42.90076616;
	LLHAE =     0.00;
	absCalFactor = 1.045000e-02;
END_GROUP = BAND_G;
BEGIN_GROUP = BAND_R
	ULLon =   12.74969287;
	ULLat =   43.05077675;
	ULHAE =     0.00;
	URLon =   12.95384508;
	URLat =   43.05461067;
	URHAE =     0.00;
	LRLon =   12.95881598;
	LRLat =   42.90458014;
	LRHAE =     0.00;
	LLLon =   12.75515876;
	LLLat =   42.90076616;
	LLHAE =     0.00;
	absCalFactor = 9.680000e-03;
END_GROUP = BAND_R;
BEGIN_GROUP = BAND_N
	ULLon =   12.74969287;
	ULLat =   43.05077675;
	ULHAE =     0.00;
	URLon =   12.95384508;
	URLat =   43.05461067;
	URHAE =     0.00;
	LRLon =   12.95881598;
	LRLat =   42.90458014;
	LRHAE =     0.00;
	LLLon =   12.75515876;
	LLLat =   42.90076616;
	LLHAE =     0.00;
	absCalFactor = 1.568000e-02;
END_GROUP = BAND_N;
outputFormat = "GeoTIFF";
BEGIN_GROUP = IMAGE_1
	satId = "QB02";
	CatId = "1010010001E96F02";
	SceneID = "2";
	collectedRowGSD =   2.545;
	collectedColGSD =   2.517;
	meanCollectedGSD =   2.531;
	rowUncertainty =  623.81;
	colUncertainty =  113.51;
	sunAz = 141.197;
	sunEl = 62.4302;
	satAz = 170.133;
	satEl = 77.3454;
	inTrackViewAngle = -10.9489;
	crossTrackViewAngle = 3.93044;
	offNadirViewAngle = 11.5137;
	autoCloudCover = 0.04;
	manualCloudCover = 0.1125;
	PNIIRS = 2.8;
	imageQuality = "Excellent";
	TDILevel = 13;
	positionKnowledgeSrc = "R";
	attitudeKnowledgeSrc = "R";
	revNumber = 8888;
END_GROUP = IMAGE_1;
BEGIN_GROUP = MAP_PROJECTED_PRODUCT
	earliestAcqTime = 2003-05-19T09:53:13.207882Z;
	latestAcqTime = 2003-05-19T09:53:13.207882Z;
	datumName = "WE";
	semiMajorAxis = 6378137.0000;
	inverseFlattening = 298.257223563;
	datumOffset = (
	     0.000,
	     0.000,
	     0.000 );
	mapProjName = "UTM";
	mapProjCode = 1;
	mapZone = 33;
	mapHemi = "N";
	mapProjParam = (
	  0.000000000,
	  0.000000000,
	  0.000000000,
	  0.000000000,
	  0.000000000,
	  0.000000000,
	  0.000000000,
	  0.000000000,
	  0.000000000,
	  0.000000000,
	  0.000000000,
	  0.000000000,
	  0.000000000,
	  0.000000000,
	  0.000000000 );
	productUnits = "M";
	originX =     316728.99995154;
	originY =    4768910.99999898;
	orientationAngle =    0.0;
	resamplingKernel = "NN";
	productGSD =  2.80;
	colSpacing =  2.80;
	rowSpacing =  2.80;
	ULX =  316728.99995154;
	ULY = 4768910.99999898;
	ULH =       0.00;
	URX =  333366.59997505;
	URY = 4768910.99999922;
	URH =       0.00;
	LRX =  333366.59997550;
	LRY = 4752239.79999924;
	LRH =       0.00;
	LLX =  316728.99995242;
	LLY = 4752239.79999899;
	LLH =       0.00;
	DEMCorrection = "none";
	numGCP = 0;
END_GROUP = MAP_PROJECTED_PRODUCT
END;

YOU see the bands:
1st band is BAND_B (BLUE)
2nd band is BAND_G (GREEN)
3th band is BAND_R (RED)
4th band is BAND_N (NEAR IR)

Quick Bird has this format but gdal and grass read only .TIF files 
without reading .IMD file.
The BAND_B for gdal is BAND_RED and BAND_R is BAND_BLUE. This is wrong



-- 
________________________________________________________________________
||      Lorenzo Moretti        e-mail: lorenzo.moretti at bologna.enea.it     
||/|/|  ENEA prot              Web: http://wwwamb.bologna.enea.it/    
||   |  via Don Fiammelli, 2   FTP: ftp://ftpamb.bologna.enea.it/ (ris.)
~~~~~~  40128 BOLOGNA - ITALY  Ph: +39-0516098086  Fax: +39-0516098131
________________________________________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20040304/95a5d24c/attachment.html


More information about the Gdal-dev mailing list