User's Guide

WVSCHIPS

Create chip images containing World Vector Shorelines line work

Function:

Rasterize vector data from the World Vector Shorelines (WVS), 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.

VECTSRC(/SGS4/DCW/WVS)
Vector source. This value should define the root directory of the WVS vector data.

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> wvschips in=inimg ints=namerica outmt=na1

    All 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> wvschips in="inimg(:2)" ints=camerica outmt=tmp1 pixval=1023 backgrnd=--

    Band two of INIMG will be used as the background for chips specified in CAMERICA;TPS. Coastlines will have a pixel value of 1023. The chips will be in the same projection as INIMG. Merged tie point information will be written to TMP1;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 WVS for the area covered by the chip window. The chip image is then created, with either a solid background, or background pixels taken from the appropriate window in IN. The WVS lines are converted to line/sample coordinates based on the projection of IN, and each line/sample pixel location is set to PIXVAL in 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. [wvschips-empty] No vector data occurs in the output image

    After scanning all lines in the appropriate WVS 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.

  2. [wvschips-mwrite] Error occurred writing merged tie point file

    An error occurred writing to OUTMT. Ensure that there is sufficient disk space. Chips are created but the appropriate information will not be saved in OUTMT.

  3. [wvschips-nocreate] 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.

  4. [wvschips-write] Error occurred writing chip image

    An error occurred writing the output chip image. Ensure that there is sufficient disk space. Processing will continue with the next chip.

Fatal Error Messages:

  1. [wvschips-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. [wvschips-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. [wvschips-calc] Error occurred calculating line/samp

    An error occurred converting a geographic latitude/longitude coordinate (either a tie point location or the vector location) to a line/sample coordinate of IN. Verify that all the projection information in IN's DDR is valid.

  4. [wvschips-fatal] Fatal error encountered

    A fatal error was encountered during processing. The preceding message explains the exact error. Any chips successfully created before this error occurred will remain on disk along with the associated output merged tie point file.

  5. [wvschips-imgread] Error occurred reading image background

    An error occurred reading the background pixel values for the chip from IN. Ensure that IN has read access.

  6. [wvschips-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. [wvschips-open] Error occurred opening <XXX>

    An error occurred opening the specified file. If the message indicates an error with an output file, ensure that there is sufficient disk space and that you have write permission in the current working directory. If the message indicates an input file, ensure that the file exists with read permission.

  8. [wvschips-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. [wvschips-proj] Invalid projection information contained in DDR

    An error occurred because PROJ was OTH, but IN did not contain valid projection information. Validate the appropriate projection fields in IN's DDR.

  10. [wvschips-read] Error occurred reading tie point file

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

User Notes:

  1. WVSCHIPS is a routine used to create image chips containing WVS 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 WVS database contains vector data of coastlines. The data consists of a series of latitude/longitude pairs that are points along the outline segments. In order to "rasterize" the WVS 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.

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

  4. If the chips created by WVSCHIPS 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.