User's Guide

DCWCHIPS

Create chip images containing Digital Chart of the World line work

Function:

Rasterize vector data from the Digital Chart of the World (DCW), creating 64 line by 64 sample "chip" images centered at tie points.

Parameters:

IN
Input image. The image for which the image chips are to be generated. It must be a single band image if its pixels will be used as background in the image chips. Windowing is ignored. IN may be an AVHRR image with an associated ADDR file or a projected image with a valid DDR. The chip images created will be the same data type as IN.

INTS
Input tie point selection file. This file specifies tie points whose latitude and longitude coordinates become the center of each chip.

OUTMT
Output merged tie point file. The merged tie point file contains coordinates in the reference (chip) image and search (IN) image corresponding to each tie point, along with other information that is used in image correlation.

CDPATH(/SGS4/DCW/DCW)
CD drive location. If the DCW is stored on disk, this value should define the root directory of the DCW data.

LIBRARY("NOAMER" COUNT=(1:4)
DCW Library. The DCW library that lines will be extracted from. The DCW is divided into four libraries. Each library exists on a single CD, or in a single directory on disk. These libraries are:

 
    = NOAMER:      North America
    = EURNASIA:    Europe and Northern Asia
    = SOAMAFR:     South America and Africa
    = SASAUS:      South Asia and Australia

PO(--)
Political boundaries and ocean features. The following fields may be selected for this feature.

  =  1: International boundary, de jure
  =  2: International boundary, de facto
  =  3: International boundary, de jure & de facto
  =  4: Administrative boundary, primary
  =  5: Administrative boundary, major
  =  6: Treaty or occupancy
  =  7: Coastal closure line
  =  8: Ocean demarcation line
  =  9: Ice line
  = 10: Coastline
  = 11: Ice/water line
  = 12: Sea wall
  = 13: International Date Line

DN(--)
Drainage feature. The following fields may be selected for this feature.

  = 1: Streams, rivers
  = 2: Inland shorelines
  = 3: Wet sand limits
  = 4: Canals, aqueducts
  = 5: Glacial limits
  = 6: Snow field, glacier
  = 7: Land/ice line

RD(--)
Road feature. The following fields may be selected for this feature.

  = 1: Dual lane highways
  = 2: Primary or secondary roads
  = 3: Tracks, trails

RR(--)
Railroad feature. The following fields may be selected for this feature.

  = 1: Single track railroad
  = 2: Multi-track railroad
  = 3: Light Railroad

HY(--)
Hypsography feature. The following fields may be selected for this feature.

  = 1: Close land contour
  = 2: Depression contour
  = 3: Closed land, approximated
  = 4: Carrying contour
  = 5: Depression, approximated

HS(--)
Supplemental hypsography feature. The following fields may be selected for this feature.

  = 1: Partial interim or auxiliary contour
  = 2: Partial depression contour
  = 3: Partial interim contour, approximated
  = 4: Carrying contour
  = 5: Cut or fill
  = 6: Unreliable
  = 7: Transition or mistake contour

PIXVAL(255)
Pixel value. The grey level value to be given to the rasterized vector lines.

BACKGRND(0)
Background value. The value given to the pixels of each chip image that are not assigned a value for the vector data. If BACKGRND is NULL, the background of the chip will be filled with the pixel values from the input image.

PROJ(SAT)
Projection code. The projection type of the input image.

  = SAT:  Satellite projection.  The input image is 
          in AVHRR satellite projection.
  = OTH:  All other valid GCTP-supported projections.
	  Projection information for the image is 
          retrieved from the DDR.

Examples:

  1. LAS> dcwchips in=inimg ints=namerica outmt=na1 po=(1,10)

    All international boundaries and coastlines of North America will be drawn into chip images centered at points in namerica;tps. Merged tie point information will be written to na1;mtp.

  2. LAS> dcwchips in="inimg(:2)" ints=camerica outmt=tmp1 library=(noamer,soamafr) dn=1 pixval=1023 backgrnd=--

    Band two of INIMG will be used as the background for chips specified in camerica;tps. Line work of streams and rivers will be taken from the North America and South America/ Africa libraries. Lines will have a pixel value of 1023. Merged tie point information will be written to tmp1;mtp.

  3. LAS> dcwchips in=inimg ints=africa outmt=af1 library=soamafr po=1 proj=oth

    All international boundaries of South America/Africa will be drawn into chips specified by africa;tps. INIMG was reprojected, so the chips will be in the same projection. Merged tie point information will be written to af1;mtp.

Description/Algorithm:

Processing begins by opening INTS and OUTMT. Points are read from INTS until one is found that is located in IN. Once a valid point has been found, a 64x64 window from IN is calculated to surround the point. This window will become the chip image. The appropriate lines are read from DCW for the area covered by the chip window. The DCW lines are converted to line/sample coordinates based on the projection of IN, sorted, and stored in a temporary file. The chip image is then created, with either a solid background, or background pixels taken from the appropriate window in IN. The temporary file is used to insert line work of pixel value PIXVAL into the chip image. The coordinates of the tie point, elevation, name of the chip, chip size, and other information are written to OUTMT. When all points in INTS have been checked, INTS and OUTMT are closed.

Nonfatal Error Messages:

  1. [dcwchips-create] Error occurred creating <XXX>

    An error occurred creating the specified chip image. The preceding message will explain why the chip could not be created. Processing will continue with the next chip.

  2. [dcwchips-empty] No vector data occurs in the output image

    After scanning all lines in the specified DCW files, no segments were found to fall in the output image. The chip will not be created, and processing will continue with the next chip.

  3. [dcwchips-free] Error freeing dynamic memory

    An error occurred while freeing dynamically allocated memory. It will be automatically freed when the program terminates.

Fatal Error Messages:

  1. [dcwchips-alloc] Error allocating dynamic memory

    An error occurred dynamically allocating memory, which was required for further processing. Contact the system administrator if the problem persists.

  2. [dcwchips-brange] BACKGRND is not within the valid range for <XXX> data

    The value specified for BACKGRND was not within the valid range for the data type of IN. Retry, using a different value for BACKGRND.

  3. [dcwchips-fatal] Fatal error encountered

    A fatal error was encountered during processing. The preceding message explains the exact error.

  4. [dcwchips-feature] No DCW features were selected

    No features from PO, DN, RD, RR, HY, or HS were selected, so no line work would be drawn. Retry, specifying the desired features.

  5. [dcwchips-find] Error finding alternate directory for sort

    An error occurred searching DATAPATH for room to sort the raster scan file. Verify that DATAPATH includes valid directories.

  6. [dcwchips-onebnd] Only a single band image allowed on input

    If BACKGRND is NULL, one band from IN must be specified from which background pixel values will be taken. Retry, specifying one band in IN.

  7. [dcwchips-open] Error opening <XXX>

    An error occurred opening the specified file. Check to ensure that there is sufficient disk space and that you have write permission in the current working directory.

  8. [dcwchips-prange] PIXVAL is not within the valid range for <XXX> data

    The value specified for PIXVAL was not within the valid range for the data type of IN. Retry, using a different value for PIXVAL.

  9. [dcwchips-read] Error reading tie point file

    An error occurred reading INTS. Ensure that it is a valid tie point selection file by running DSPTIE-TPS.

  10. [dcwchips-system] System file sort failed

    An error occurred while sorting the scan file of line segments. Check to ensure that there is sufficient disk space to write another file the same size as the scan file. If not, the user may set the DATAPATH environment variable to specify an alternate location for sorting the rasterized information.

  11. [dcwchips-write] Error writing merged tie point file

    An error occurred writing to OUTMT. Ensure that there is sufficient disk space.

User Notes:

  1. DCWCHIPS is a routine used to create image chips containing DCW line work and an associated merged tie point file. The chips created will have "true" line work features which can be compared to the features in IN. If IN is in AVHRR satellite projection, OUTMT can then be used to correlate the input image to the chips and calculate satellite attitude corrections. Related functions are CORRELATE and NAVIGATE.

  2. The DCW database contains vector data of feature outlines. The data consists of a series of latitude/longitude pairs that are points along the outline segments. In order to "rasterize" the DCW vector data, each latitude/longitude point in the outline must be converted to a line/sample coordinate in IN. The points are then connected to produce line segments. For more information about the features in DCW, refer to the Appendix to the Military Specification, Digital Chart of the World, MIL-D-89009.

  3. An image "chip" is a small (typically, 64 x 64) subimage centered about a tie point of interest. The chips produced by DCWCHIPS are "reference chips" that may be used in image-to-image registration.

  4. If the chips created by DCWCHIPS are to be used in CORRELATE-EDGE, make PIXVAL greater than the cloud threshold value (THRVAL) that will be specified in CORRELATE. This will allow all cloud data in the search image to be screened out without screening out the line work in the reference chips.