How To: Read USGS DOQQ with May, 1997 header into ArcInfo



This article shows how to read into ArcInfo a USGS Digital Orthophoto Quarter Quad (DOQQ) with the May, 1997 ASCII header file format.

The USGS DOQQ header format makes use of keywords to define the data. Information from this header can be used to build an ASCII .hdr file which will be associated with the image when it is renamed with a .bil, .bip, or .bsq extension. The following is a sample USGS DOQQ header:

BEGIN_USGS_DOQ_HEADER                                                         *

QUADRANGLE_NAME "RIVIERA BEACH" 3.45 or 7.5-min. name*

QUADRANT SW quadrant indicator if cell size = 3.75-minutes*

WEST_LONGITUDE -80 7 30.000 signed deg min sec SDDD MM SS.SSS*

EAST_LONGITUDE -80 3 45.000 signed deg min sec SDDD MM SS.SSS*

NORTH_LATITUDE 26 48 45.000 signed deg min sec SDDD MM SS.SSS*

SOUTH_LATITUDE 26 45 0.000 signed deg min sec SDDD MM SS.SSS*

PRODUCTION_DATE 1996 5 14 yyyy mm dd*


BAND_ORGANIZATION BIP single file or BSQ, or BIL or BIP*

BAND_CONTENT RED black&white or red green blue*

BAND_CONTENT GREEN black&white or red green blue*

BAND_CONTENT BLUE black&white or red green blue*

BITS_PER_PIXEL 8 radiometric resolution*

SAMPLES_AND_LINES 6889 7608 number of columns and rows*

HORIZONTAL_DATUM NAD83 primary horizontal datum*


COORDINATE_ZONE 17 coordinate system zone number*

HORIZONTAL_UNITS METERS coordinate system units*

HORIZONTAL_RESOLUTION 1.00 pixel horiz. ground sample distance*

SECONDARY_HORIZONTAL_DATUM NAD27 secondary horizontal datum*

XY_ORIGIN 586657.000 2966350.000 coord. of upper left pixel pri. datum*

SECONDARY_XY_ORIGIN 586635.552 2966145.866 coord upper left pixel sec datum*

NATION US nation code*

STATE FL state fip code*

NW_QUAD_CORNER_XY 586958.828 2965967.697 XY coords. of pri. NW quad corner*

NE_QUAD_CORNER_XY 593170.493 2966012.018 XY coords. of pri. NE quad corner*

SE_QUAD_CORNER_XY 593221.537 2959089.228 XY coords. of pri. SE quad corner*

SW_QUAD_CORNER_XY 587006.468 2959044.978 XY coords. of pri. SW quad corner*

SECONDARY_NW_QUAD_XY 586960.432 2965801.317 XY coords. - sec. NW quad cor.*

SECONDARY_NE_QUAD_XY 593172.212 2965845.639 XY coords. - sec. NE quad cor.*

SECONDARY_SE_QUAD_XY 593223.254 2958923.135 XY coords. - sec. SE quad cor.*

SECONDARY_SW_QUAD_XY 587008.071 2958878.884 XY coords. - sec. SW quad cor.*

RMSE_XY 0.70 doq horiz. accuracy*

IMAGE_SOURCE "COLOR INFRA-RED FILM" b&w, cir, natural color, other*

SOURCE_IMAGE_ID "NAPP 6966 108" source image id*

SOURCE_IMAGE_DATE 1995 1 26 source image date as yyyy mm dd*

SOURCE_DEM_DATE 1996 5 14 source dem date yyyy mm dd*


PRODUCER "Science Applications International" producer/contractor*

PRODUCTION_SYSTEM "GIS/MAGIC" production system*

STANDARD_VERSION 1996 12 version of DOQ standard*

METADATA_DATE 1997 6 29 date created or changed, yyyy mm dd*

DATA_FILE_SIZE 157255203 data set size in bytes*

BYTE_COUNT 20667 header byte count*

The DOQQ header contains a parameter called BAND_ORGANIZATION, which is set to either single file, BSQ, BIL, or BIP. If this parameter is set to single file, you can copy the image file to an image with an extension of .bsq, .bil, or .bip, otherwise choose the extension based on the setting for this parameter.

Create a new file with an ASCII text editor. Give the file the same prefix name as the image file. Give this file the extension .hdr. This file can then be populated with the keywords found in the ArcDoc section: Cartography > Image integration > BIL, BIP, and BSQ data > Image description files > The header file (.hdr).

The SAMPLES_AND_LINES parameter has the column and row numbers that are used with the .hdr keywords ncols and nrows.

The number of BAND_CONTENT references indicate the number of bands to enter with the .hdr keyword nbands of the .hdr file. If there are 3 references for BAND_CONTENT, then nbands is 3.

The layout keyword of the .hdr should be the same as the renamed image file extension (BIL, BIP, BSQ).

The BITS_PER_PIXEL value will be used with nbits of the .hdr file.

The BYTE_COUNT value will be used with skipbytes in the .hdr file.

The values for the .hdr's ulxmap and ulymap are the x and y values of the XY_ORIGIN keyword of the DOQQ header.

The HORIZONTAL_RESOLUTION value will be used with both the xdim and ydim of the .hdr file.

Now create another new file with an ASCII text editor. Give the file the same prefix name as the image file. This file will be the world file of the image. This is the file that georeferences the image to its real-world location. The extension used for this file depend on the file format:

------ ---------
BIL .blw
BIP .bpw
BSQ .bqw

This file will contain six numbers in a column:

x pixel dimension
translation term
translation term
-y pixel dimension
x of upper left pixel center
y of upper left pixel center

The x pixel dimension is HORIZONTAL_RESOLUTION from the DOQQ header. Both translation terms should be set to 0. The -y pixel dimension is the negative of HORIZONTAL_RESOLUTION. The x of upper left pixel center is the x value XY_ORIGIN from the DOQQ header. The y of upper left pixel center is the y value XY_ORIGIN.

A world file for the example DOQQ header file above would look like:


Information about building a world file can be found in the ArcDoc section: Cartography > Image integration > Registering an image to real-world coordinates. Detailed information about what each parameter of the DOQQ header represents can be found at the site below.

Related Information