User's Guide

CIB2LAS

Ingest a CIB image into a LAS format image.

Function:

Ingest a Controlled Image Base (CIB) image. The CIB image format is specified by MIL-PRF-89041. The overall structure of the CIB volume is defined by MIL-STD-2411, Raster Product Format (RPF). CIB images consist of frame files which are 1536 by 1536 pixels in size. The RPF Table of Contents file (A.TOC) provides information on how to reassemble the frame file images into a larger (composite) image. It is located in the RPF sub-directory. User specfied INDIR is the directory directly above (containing)the RPF directory. All files in the CIB Volume are formatted within the National Imagery Transmission Format (NIFT).

CIB images are distributed in boundary rectangles on a CIB volume. There is no pre-defined size for a boundary rectangle. The number of frame file rows and columns will vary. This boundary rectangle information is not used by CIB2LAS to ingest a CIB volume. CIB2LAS uses the coded frame file name to locate each frame file within its zone. It calculates the row and column (in the zone, not boundary rectangle) and uses them to assemble the CIB image of the entire volume, although it will only include frame files that are in the desired tiles. CIB images usually contain more than one tile.

Parameters:

COMMENT(--)
Comment to direct computer room user to install appropriate media (CIB CD-ROM) into drive

INDIR(--)
Directory path to CIB images (parent of RPF directory). Not necessary for remote CD ingests unless RPF directory is not in root directory of CD. Enter in host name format

OUT
Output image name

WINDOW(--)
Window specification. If UNITS is LS, the window specifies the start line, start sample, number of lines, and number of samples for the window. If only the start line and sample are entered, the number of lines and number of samples will default to the end of the image. If UNITS is not LS, the window specifies the upper left Y, upper left X, lower right Y, and lower right X coordinates. If the WINDOW is not specified, it defaults to the entire image.

UNITS(LS )
Specify UNITS of WINDOW parameters

LS  =  Line & Sample
DEG =  Degrees (Lat. & Long.)
DMS =  Packed Degrees (Lat. & Long.)
       (+DDDMMMSSS.SS)
PRO =  Projection Coords. X & Y
       in meters

FILL(0 )
Fill value for empty frame files and transparent pixels found in CIB volume.

TILENUM(--)
Tile (boundary region) specification. This determines which boundary region(s) will be included in the image. The tile numbers are printed on the back of the CD jewel case.

Examples:

  1. LAS> cib2las indir=/sg1/csb3/cb10s00151 out=[production]out

    The user has selected the default option by not entering any input image window (WINDOW) or boundary rectangle (TILENUM) parameters. The entire CIB volume will be written to the file out.img in the directory "production" located under the current working directory. All empty frame files and the transparent pixels will contain the default fill value (FILL) of 0.

  2. LAS> cib2las indir=/sg1/csb3/cb10s00151 out=out window=(1 1 20000 1000)

    CIB2LAS will ingest portions of the CIB image specified by path INDIR. The output image (named out.img) will be located in the current working directory. Using the default value for UNITS (LS) the WINDOW parameter specifies lines and samples. The output image will start wtih the first sample and first line of the CIB image along with first 1000 samples of each of the first 20,000 lines. The empty frame files and transparent pixels in the image will contain the default fill value of 0.

  3. LAS> cib2las indir=/sg1/csb3/cib.cb10s00151 out=[production]out window = (24.38700 102.26627 24.38652 102.26700) units = "deg" fill = 128

    CIB2LAS will ingest portions of the CIB image specified by path INDIR. The output image will be located in the directory production under the current working directory and be named out.img. The output image will start at the the pixel containing the upper left (North West) Latitude (24.38700 degrees) and Longitude (102.26627 degrees) and end at the pixel containing the lower right (South East) Latitude (24.38652 degrees) and Longitude (102.26700 degrees) as specified by (WINDOW) and (UNITS = "DEG"). The empty frame files and transparent pixels in the image will contain the user specified fill value (FILL) of 128.

  4. LAS> cib2las comment = "please mount cib cd cb05nn3203001" out=out tilenum = (5,6,8,9)

    CIB2LAS will ingest portions of the CIB image off a remotely mounted CD. The user specified comment "Please mount CIB CD CB05NN3203001" will be sent to the computer operator directing them to install CD Series CB05 Item NN3203 Edition 001. The output image named out.img will be located in the current working directory. Only those boundary rectagles numbered 5, 6, 8, and 9 (TILENUM) will be included in the output image.

  5. LAS> cib2las comment = "please mount cib cd cb10s00142001" out=[sg1.dsb.production]out window = (2628673.234 10621118.645 2617175.456 10645549.345) units="pro"

    CIB2LAS will ingest portions of the CIB image from a remotely mounted CD. The user specified comment "Please mount CIB CD CB10S00142001" will be sent to the computer operator directing them to install CIB CD Series CB10 Item 00142 Edition 001. The output image will be located in directory /sg1/dsb/production will be named named out.img. It will include the area specified by the projection parameters, Y = 2628673.234 meters to 2617175.456 meters, and X = 10621118.645 meters to 10645549.345 meters.

  6. LAS> cib2las comment = "please mount cib cd cb10s00142001" out=[production]out window = (2628673.234 10621118.645) units="pro"

    CIB2LAS will ingest portions of the CIB image from a remotely mounted CD. The output image located in the directory production under the current working directory and will be named named out.img. It will include the area specified by the WINDOW projection parameters, starting at Y = 2628673.234 meters and ending at the last line in the image, and X = 10621118.645 meters and end at the last sample in the image.

Description/Algorithm:

The TAE input parameters are retrieved. Error checking is done on the parameters to ensure they are valid, and all required parameters are present. Once the TAE parameters are input, a request is made to mount the CIB CD remotely (if a comment is specified) and the RPF table of contents file is read. The TOC file includes a frame file record for each frame file in the CIB volume. The frame file record includes path and filename information. A list is created and each frame file record is read into it. The list is processed and the zone row and zone column for each frame file is calculated and saved in the list. Based on the ouput image specifications (WINDOW, UNITS, and TILENUM) the portions of the CIB image to be output are determined. For each row of frame files contained in the output image, and for each frame file column found in the output image, that frame file is uncompressed (if compressed), color restored (colors were reduced to 216 colors), and placed into a buffer. Empty frame files are filled with the user specified fill value (FILL). For each line in row to be output the line is moved to a line buffer and written to the specified output image file. Only the portions of each line (samples) requested are placed into the line buffer. After writing image to the specified file, a DDR file is created, projection parameters are calculated, and the DDR file is written out.

Nonfatal Error Message:

  1. [cib2las-read] Error reading attributes from frame file </xxx/xxxxxxxx.xxx>

    An error has occurred while trying to read the data source attribute of the frame file.

  2. [cib2las-source] Error reading image datasource

    An error has occurred while trying the read the source attribute of the frame file.

Fatal Error Messages:

  1. [cib2las-env] Error DATASYS undefined

    Environment variable DATASYS is undefined. Contact your system administrator.

  2. [cib2las-ddr] Error writing DDR <xxxxx.ddr>

    An error occurred while writing out DDR information.

  3. [cib2las-ddr] Error writing band DDR <xxxxx.ddr>

    An error occurred while writing out bdr information for ddr.

  4. [cib2las-ddr] Error Updating Last Used fields

    An error occurred while updating the last used fields in the ddr file.

  5. [cib2las-ddr] Error setting <xxxx xxxx>

    An error occurred while trying to update and set the indicated ddr projection parameter.

  6. [cib2las-tae] An error occurred retrieving TAE parameters

    An error occurred in while reading in TAE parameters

  7. [cib2las-ddr] Error retrieving datum info

    An error occurred while retrieving the datum values.

  8. [cib2las-tae] Error passing <xxxxxxxx> to TAE

    An error occurred while trying to pass the specified variable back to TAE.

  9. [cib2las-coors] Error getting CIB zone for Latitude <xx.xxx>

    An error occurred while determining the CIB zone base on input Latitude specified.

  10. [cib2las-tae] Error passing variables to TAE

    An error has occurred while passing variables to TAE.

  11. [cib2las-cd] Error encountered un-mounting CD

    An error has occurred while trying to un-mount a CD.

  12. [cib2las-cd] Error encountered closing CD

    An error has occurred while trying to un-mount a CD.

  13. [cib2las-read] Error Reading Frame File <xxxxxxxx.xxx>

    An error has occurred while reading the specified frame file.

  14. [cib2las-toc] Error in head.standard_num:MIL-PRF-89041

    An error has occurred while trying to read the standard number from the RPF header in A.TOC.

  15. [cib2las-read] Error reading Locations section of frame file <xxxxxxxx.xxx>

    An error occurred while reading the locations (section starting byte address) of sections in RPF formatted frame file.

  16. [cib2las-coverage] Error reading CIB image <xxxxxx.xxx> coverage

    An error has occurred while reading the coverage from the specified frame file.

  17. [cib2las-toc] Error reading RPF TOC file A.TOC locations

    An error has occurred while trying to read the locations section from the RPF header file. The locations section indicates the starting location and size of the remaining sections of the Table of Contents file.

  18. [cib2las-alloc] Error allocating dynamic memory

    An error has occurred while attempting to allocate dynamic memory. Contact your administrator if problem persists.

  19. [cib2las-open] Error opening output image <xxxx.img>

    An error has occurred while trying to open the output image. Verify path and filename are correct.

  20. [cib2las-write] Error writing output image <xxxx.img>

    An error occurred while writing to the output image.

  21. [cib2las-read] Error reading RPF headers <xxxxx.xxx> location

    An error occurred while trying to read the locations sections address from the header file. The address is the starting byte of the locations section of the RPF header. Can be a frame file or an Table of Contents file.

  22. [cib2las-cd] Fatal Error mounting CD

    A fatal error occurred while mounting a remote CD.

  23. [cib2las-out] Error converting LAS output name to host output name

    An error occurred while converting the LAS output file name into a host filename.

  24. [cib2las-toc] Fatal Error Reading TOC

    An error occurred while trying to read the Raster Product Format (RPF) Table of contents file (TOC) named A.TOC located in a subdirectory named RPF under the specified input directory INDIR. If an error occurs here verify you specified the correct input directory. It should have a subdirectory called "RPF" which will contain the TOC file with frame files contained in sub-directories beneath that.

  25. [cib2las-tae] Error in <yy xxxxxxx> (<zzz.zzzz>)

    The specified input coordinate exceeds its limits. Latitude must be less than or equal to 90 degrees (+/-) and longitude must be less than or equal to 180 degrees (+/-). Enter correct value. yy is one of (UL UR LL LR), xxxxxxx is Latitude or Longitude, zzz.zzzz is value in error.

  26. [cib2las-locate] Error calculating frame file <xxxxxxxx.xxx> location

    The images in the CIB database are divided into zones. Within each zone there are rows and columns of frame files images. The number of rows and columns vary with each zone. Frame file numbers are assigned to each frame file image in a zone. The frame file number starts at the lower left corner of the zone and increases in a row major fashion. The zones start at 180 degrees Longitude. The frame file numbers are used to create a different name for each frame file. The last six digits of the frame file name are the radix 34 value of the sequential frame file number. Using this portion of the frame file name, and the number rows and columns in the specified zone, the row and column location (of the specified frame file) can be determined. These row and column numbers are used to reassemble the image. An error may occur when ingest an image whose resolution is unsupported. Currently only 5 and 10 meter resolutions are supported. 5 and 10 meter resolutions are the only resolutions that are currently registered in MIL-STD-2411-1 Section 5.1.4, Data Series Codes (I1 = 10 meter, I2 = 5 meter).

  27. [cib2las-cd] Error encountered mounting CD

    A fatal error occurred while attempting to mount the remote CD.

  28. [cib2las-hostname] Error reading the hostname

    An error occurred while trying to get hostname during remote CD mounting.

  29. [cib2las-open] Error opening frame file <xxxxxxxx.xxx>

    An error occurred while trying to open the specified frame file.

  30. [cib2las-read] Error locating RPF header A.TOC

    An error occurred while trying to read the header in the RPF table of contents file.

  31. [cib2las-read] Error finding RPF TOC file A.TOC locations

    An error occurred while trying to find the required locations in the [location] section of the specified RPF TOC file.

  32. [cib2las-close] Error closing output image <xxxx.img>

    An error occurred while closing the specified LAS output image file.

  33. [cib2las-exists] Output image <xxxx> already exists

    A file with the same name already exists in that directory. It may be an image file, a ddr file, a history file, or any combination.

  34. [cib2las-input] SE Latitude <xx.xxxxxx> must be < <yy.yyyyyy>

    When entering coordinates, the SE corner must be below and to the right of the North West corner. Need to re-enter the correct coordinates.

  35. [cib2las-input] SE Longitude <xxx.xxxxxx> must be > <yyy.yyyyyy>

    When entering coordinates, the SE corner must be below and to the right of the Norht West corner. Need to re-enter the correct coordinates.

  36. [cib2las-input] Missing window specifications

    Some of the WINDOW specifications are missing. You must either leave all blank, specify two, or specify four. When four are entetted, they are the upper left corner and lower right corner of the output image. When two are entered, they are the upper left corner (default lower right to lower right of input CIB image). If left blank, then the entire CIB image will be ingested.

  37. [cib2las-toc] Error moving file pointer in <xxxxx.xxx>

    An error occurred while performing an fseek (move file pointer) in the specified file.

  38. [cib2las-toc] Error reading from <xxxxx.xxx>

    An error occurred while reading from the specified file.

  39. [cib2las-coors] Error converting corner coordinates

    An error occurred while trying to convert the corner coordinates of the CIB image from degrees to meters.

  40. [cib2las-ddr] Error saving temporary DDR file <xxxxx.ddr>

    An error occurred while trying to create a temporary DDR for use in call to c_wndconv to caluclate portions of CIB image to output.

  41. [check-window] No window

    This error will occur when the window specified by the window coordinates is completely outside of the input CIB image.

  42. [cib2las-toc] No frame files found

    An error occurred while trying to read the table of contents file. An error occurred causing an empty list to be returned.

  43. [cib2las-boundnumber] Error determining boundary rectangle numbering

    There was an error when attempting to determine the boundary rectangle numbering.

  44. [cib2las-boundnumber] Attempting to place multiple boundary rectangle references into same matrix location

    This error will occur when more than one boundary rectangle is calculated to be located at the same one degree square location within the boundary rectangle matrix when only a single boundary rectangle is used to describe each one degree square geographic area.

  45. [cib2las-boundnumber] Boundary rectangle position within matrix exceeds limit

    The calculated location for the boundary rectangle matrix exceeds the limits of the matrix.

  46. [cib2las-zone] Could not determine zone code from boundary rectangle

    When the user specifies the boundary rectangles to ingest, the most northwest boundary rectangle is used to determine the zone code. There was an error when attempting to retrieve the zone code for this region.

User Notes:

  1. CIB images in polar zones are not supported at this time due to unavailability of polar zone images for testing.

  2. Document revisions referenced while creating CIB2LAS and references for additional information are:

    Performance Specification - Controlled Image Base MIL-PRF-89041 AMMENDMENT 1 - 31 July 1995

    Military Standard - Raster Product Format - MIL-STD-2411 NOTICE 1 - 17 January 1995

    DOD Interface Standard - Registered Data Values for Raster Product Format MIL-STD-2411-1 - 30 August 1994

    DOD Interface Standard - Integration of Raster Product Format Files into the National Imagery Transmission Format - MIL-STD2411-2 - 26 August 1994

    DOD Interface Standard - National Imagery Transmission Format Version 2.1 for the National Imagery Transmission Format Standard - MIL-STD-2500B 22 August 1997

    Military Specification - ARC Digitized Raster Graphics (ADRG) MIL-A-89007 - April 1989

    These specifications can be viewed/downloaded from NIMA's website at

    http://164.214.2.59/publications/specs/index.html

  3. Frame files are 1536 by 1536 pixel images.

  4. Transparent pixels are pixels in a frame file with no useable data. When transparent pixels are present there will be an extra value present in the color lookup tables (217 vs. 216). Transparent pixels will be filled with the user specified fill value (FILL). Zones will have some areas with no data. Some frame files do not exist in a zone (no data for that area). These empty frame files will be filled with the user specified fill (FILL) value.

  5. Supported CIB image pixel resolutions are 5 (five) and 10 (ten) meters. When attempting to ingest any other resolution, a fatal error will occur. When DOD Interface Standard - Registered Data Values for Raster Product Format MIL-STD-2411-1 30 August 1994 is updated to include new registered values for additional resolutions, CIB2LAS can easily be updated to handle the new resolutions.

  6. CIB is a database of images separated into 18 zones. There are 16 non-polar zones and two polar zones. CIB images are in the Equal Arcsecond Raster Chart/map (ARC) system projection. Images in non-polar zones are in an Equirectangular Projection (see Map Projections--- A Working Manual U.S.G.S Professional Paper 1395 pg. 90) and images in the polar zone are in the Azimuth Equidistant Projection (see Map Projections-- A working Manual U.S.G.S Professional Paper 1395 pg. 191). CIB images use the WGS-84 datum.

  7. Even though many zones use the same projection, each zone uses a different True Scale value for that projection. Essentially, this means that image data from different zones is really projected onto cylinders of different size and and can not be concatenated together without reprojecting them. Hence, only image data from one zone is ingested by cib2las. When multiple zones are found in the data specified for ingest, an informational message will be displayed to inform the user that multiple zones are present and which zone will be ingested.

  8. CIB volumes may also contain overview images. Overview images are not ingested.

    ACRONYMS:

        CIB              Controlled Image Base
        NIFT             National Imagery Transmission Format 
        RPF              Raster Product Format
        ARC Projection   Equal Arc-second Raster Chart/Map (ARC) system projection