User's Guide

TICMARK

Place ticmarks in an image

Function:

Places ticmarks at user-specified coordinates and at uniform coordinate intervals. The ticmarks are overlaid onto an existing image or onto an image of constant background. A lat/lon grid can be made by connecting the ticmarks. Coordinates may be entered in either geographic coordinates, the image's projection coordinates, or line/sample coordinates depending on the subcommand.

Parameters:

Subcommand -UNIFORM:
Places ticmarks on an image at uniform intervals.

OUT
Output image. If IN is specified, OUT has the same number of bands, data type, and size as the input image. If IN is NULL, the output size is determined by applying the projection parameters resulting in a single-band BYTE image.

INPROJ(--)
Input projection definition file. This file contains information describing the output image projection.

OPROJKEY(--)
Output projection key. OPROJKEY is the key of the projection system in INPROJ. If there are two sets of projection parameters with the same projection key, the first one is used. This parameter is ignored if IN is not NULL.

IN(-- )
Input image. This image will be copied to OUT and have ticmarks engraved. If IN is NULL, OUT will be a ticmark mask with a constant background.

COORS(--)
Coordinates. These coordinates define the frame of the output area. The coordinates must be in the format defined by GEOUNITS.

PIXSIZ(--)
Pixel size. PIXSIZ defines the ground dimension of each pixel. If PIXSIZ is NULL, then IN must contain an image with a valid DDR. The first value is the dimension in the line (Y) direction, and the second is in the sample (X) direction.

TICDIST
Distance between ticmarks. TICDIST is the distance between ticmarks measured in the format defined by GEOUNITS. If GEOUNITS = PRO, TICDIST must be given in degrees.

TICGREY(0)
Tic grey level. This value is any integer within the range of the input image data type.

TICSIZ(3,3,1)
Tic size. TICSIZ defines the dimensions of the ticmark in the output image. Dimensions are entered as height (number of pixels in the line direction), width (number of pixels in the sample direction), and thickness (number of pixels wide). See User Note 1.

ORIGIN(--)
Coordinates of the origin. ORIGIN specifies the coordinates of the upper-left ticmark. From the ORIGIN, additional ticmarks will be placed TICDIST apart. If ORIGIN is NULL, the first even increment of TICDIST from the upper-left corner is used. Values for ORIGIN must be entered in the format defined by GEOUNITS.

GEOUNITS("DEG")
Geographic units. The format of all coordinate parameter fields in this function. Units of measure may be:

  = DMS:  Deg Min Sec
  = MIN:  Minutes 
  = DEG:  Degrees
  = SEC:  Seconds
  = PRO:  Projection coordinates

BACKGRND(0)
Background value. BACKGRND is the intensity assigned to all output pixels forming the constant mask background. This parameter is used only when IN is null.

PRINT(TERM)
Output destination. The destination of the report on the ticmark locations.

  = --:        No Report
  = TERM:      Terminal.  Output is sent to the user's
               terminal.
  = LP:        Line printer.  Output is sent to the
               printer defined by $PRINTER.
  = Filename:  User-supplied filename.  Output is sent
               to a disk file named "filename".

GRIDFLG("NO")
Grid flag. Create a lat/lon grid.

  = YES:  Connect the ticmarks on the output image.
  = NO:   Do not connect the ticmarks.
Subcommand -USERDEF:
Places ticmarks at user-defined image (geographic/projection) coordinates.

OUT
Output image. If IN is specified, OUT has the same number of bands, data type, and size as the input image. If IN is NULL, the output size is determined by applying the projection parameters resulting in a single-band BYTE image.

INPROJ(--)
Input projection definition file. This file contains information describing the output image projection.

OPROJKEY(--)
Output projection key. OPROJKEY is the key of the projection system in INPROJ. If there are two sets of projection parameters with the same projection key, the first one is used. This parameter is ignored if IN is not NULL.

INFILE
Input file. INFILE is a file of user ticmarks. INFILE is an ASCII file created by a text editor. Each record of the file describes the center point of a ticmark to be overlaid onto the image. See User Note 2.

IN(--)
Input image. This image will be copied to OUT and have ticmarks engraved. If IN is NULL, OUT will be a ticmark mask with a constant background.

COORS(--)
Coordinates. These coordinates define the frame of the output area. The coordinates must be in the format defined by GEOUNITS.

PIXSIZ(--)
Pixel size. PIXSIZ defines the ground dimension of each pixel. If PIXSIZ is NULL, then IN must contain an image with a valid DDR. The first value is the dimension in the line (Y) direction, and the second is in the sample (X) direction.

GEOUNITS("DEG")
Geographic units. The format of all coordinate parameter fields in this function. Units of measure may be:

  = DMS:  Deg Min Sec
  = MIN:  Minutes 
  = DEG:  Degrees
  = SEC:  Seconds
  = PRO:  Projection coordinates

BACKGRND(0)
Background value. BACKGRND is the intensity assigned to all output pixels forming the constant mask background. This parameter is used only when IN is null.

PRINT(TERM)
Output destination. The destination of the report on the ticmark locations.

  = --:        No Report
  = TERM:      Terminal.  Output is sent to the user's
               terminal.
  = LP:        Line printer.  Output is sent to the
               printer defined by $PRINTER.
  = Filename:  User-supplied filename.  Output is sent
               to a disk file named "filename".

GRIDFLG("NO")
Grid flag. Create a lat/lon grid.

  = YES:  Connect the ticmarks on the output image.
  = NO:   Do not connect the ticmarks.
Subcommand -BOTH:
Places ticmarks at uniform intervals and at user-defined locations.

OUT
Output image. If IN is specified, OUT has the same number of bands, data type, and size as the input image. If IN is NULL, the output size is determined by applying the projection parameters resulting in a single-band BYTE image.

INPROJ(--)
Input projection definition file. This file contains information describing the output image projection.

OPROJKEY(--)
Output projection key. OPROJKEY is the key of the projection system in INPROJ. If there are two sets of projection parameters with the same projection key, the first one is used. This parameter is ignored if IN is not NULL.

INFILE
Input file. INFILE is a file of user ticmarks. INFILE is an ASCII file created by a text editor. Each record of the file describes the center point of a ticmark to be overlaid onto the image. See User Note 2.

IN(--)
Input image. This image will be copied to OUT and have ticmarks engraved. If IN is NULL, OUT will be a ticmark mask with a constant background.

COORS(--)
Coordinates. These coordinates define the frame of the output area. The coordinates must be in the format defined by GEOUNITS.

PIXSIZ(--)
Pixel size. PIXSIZ defines the ground dimension of each pixel. If PIXSIZ is NULL, then IN must contain an image with a valid DDR. The first value is the dimension in the line (Y) direction, and the second is in the sample (X) direction.

TICDIST
Distance between ticmarks. TICDIST is the distance between ticmarks measured in the format defined by GEOUNITS. If GEOUNITS = PRO, TICDIST must be given in degrees.

TICGREY(0)
Tic grey level. This value is any integer within the range of the input image data type.

TICSIZ(3,3,1)
Tic size. TICSIZ defines the dimensions of the ticmark in the output image. Dimensions are entered as height (number of pixels in the line direction), width (number of pixels in the sample direction), and thickness (number of pixels wide). See User Note 1.

ORIGIN(--)
Coordinates of the origin. ORIGIN specifies the coordinates of the upper-left ticmark. From the ORIGIN, additional ticmarks will be placed TICDIST apart. If ORIGIN is NULL, the first even increment of TICDIST from the upper-left corner is used. Values for ORIGIN must be entered in the format defined by GEOUNITS.

GEOUNITS("DEG")
Geographic units. The format of all coordinate parameter fields in this function. Units of measure may be:

  = DMS:  Deg Min Sec
  = MIN:  Minutes 
  = DEG:  Degrees
  = SEC:  Seconds
  = PRO:  Projection coordinates

BACKGRND(0)
Background value. BACKGRND is the intensity assigned to all output pixels forming the constant mask background. This parameter is used only when IN is null.

PRINT(TERM)
Output destination. The destination of the report on the ticmark locations.

  = --:        No Report
  = TERM:      Terminal.  Output is sent to the user's
               terminal.
  = LP:        Line printer.  Output is sent to the
               printer defined by $PRINTER.
  = Filename:  User-supplied filename.  Output is sent
               to a disk file named "filename".

GRIDFLG("NO")
Grid flag. Create a lat/lon grid.

  = YES:  Connect the ticmarks on the output image.
  = NO:   Do not connect the ticmarks.
Subcommand -EMBEDPT:
Places ticmarks at user-defined line/sample locations. This is different than USERDEF in that line/sample locations are used instead of geographic/ projection coordinates.

IN
Input image. This image will be copied to OUT and have ticmarks engraved. See User Note 5.

OUT
Output image. OUT has the same number of bands, data type, and size as the input image.

INFILE
Input file. INFILE is a file of user defined ticmarks. Each record of the file describes the center point line/sample, and brightness value of a ticmark to be overlaid onto the image. See User Note 3.

TICSIZ(3,3,3)
Tic size. TICSIZ defines the dimensions of the ticmark in the output image. Dimensions are entered as height (number of pixels in the line direction), width (number of pixels in the sample direction), and thickness (number of pixels wide). See User Note 1.

PRINT(TERM)
Output destination. The destination of the report on the ticmark locations.

  = --:        No Report
  = TERM:      Terminal.  Output is sent to the user's
               terminal.
  = LP:        Line printer.  Output is sent to the
               printer defined by $PRINTER.
  = Filename:  User-supplied filename.  Output is sent
               to a disk file named "filename".

SCALFACT(1)
Scale factor. Used to divide the line and samples from INFILE. This is useful to scale ticmarks to a particular image. This factor must be a power of two (ie. 1 2 4 8 16 32). See User Note 4.

MINVAL(5)
Minimum value. The minimum pixel value for ticmarks. Any ticmark from INFILE with an intensity less than MINVAL will be reset to MINVAL.

MAXVAL(250)
Maximum value. The maximum pixel value for ticmarks. Any ticmark from INFILE with an intensity greater than MAXVAL will be reset to MAXVAL.

Examples:

  1. LAS> ticmark-uniform out=result inproj=par inprojkey=key + ticdist=2.0 in=image ticgrey=255 ticsiz=(5,5,1)

    Tics with a uniform spacing of 2.0 degrees are engraved with a grey-level value of 255. They are five pixels in the line and sample directions, and one pixel thick. The image projection information is obtained by applying the projection parameters contained in PAR.PROJ. The first ticmark in the upper-left part of the image defaults to the first even increment of TICDIST from the upper-left corner coordinate given in IMAGE.DDR. The resulting output image is written to RESULT.

  2. LAS> ticmark-userdef out=result inproj=parfil inprojkey=in coors=(30018000. -117020000. 29030020. -116040010.) pixsiz=(.9 .9) infile=symbols geounits=dms backgrnd=255

    This example creates a mask image. The size of the output image RESULT is calculated by applying the projection parameters in PARFIL.PROJ and by using COORS. The background areas of RESULT are set to 255. The input coordinates and ticmark type, size, and grey level are defined in SYMBOLS.TXT. All coordinates in SYMBOLS.TXT are latitude/longitude in DMS (degrees, minutes, seconds) format.

  3. LAS> ticmark-both out=result inproj=par infile=symbols ticdist=2000000.00 coors=(38040010. -123040020. 370050040. -122040010.) in=image origin=(38030030.00,-123030030.00)

    In this example, both ticmarks with uniform spacing and user- defined ticmark locations are applied to IMAGE to create RESULT. Uniform ticmarks have a grey level of zero and are 3 x 3 x 1 in size. The first ticmark is placed at 38 degrees, 30 minutes, 30.00 seconds latitude and -123 degrees, 30 minutes, 30.00 seconds longitude. The ticmarks are 2 degrees apart. Additional ticmarks defined in SYMBOLS.TXT are also applied.

  4. LAS> ticmark-embedpt in=input out=result infile=points print=(term,lp)

    This example copies INPUT;IMG to RESULT;IMG. The input line/sample and ticmark pixel value are defined in POINTS;TXT. A 3 x 3 x 3 ticmark is embedded at the line/sample location. Any ticmark pixel values below 5 are reset to 5. Any ticmark pixel values above 250 are reset to 250. The report on the location of the ticmarks will be printed to the terminal and to the printer specified by the global $PRINTER.

Description/Algorithm:

The projection parameters contained in INPROJ or information from the input image DDR are applied to the General Cartographic Transformation Package (GCTP) to calculate image projection information for all subcommands except EMBEDPT.

Four processing options are available. The UNIFORM processing option places ticmarks on an image at uniform intervals. From the starting ticmark coordinate in the upper-left part of the image, the corresponding line/sample location in the output image is calculated using the GCTP. The starting coordinate is then incremented by TICDIST to obtain the next coordinate, and an output line/sample location is again calculated. This process continues until an evenly spaced grid of ticmark line/sample locations is produced for the entire image. The USERDEF processing option calculates line/sample locations for each coordinate given by the user in the file of user-defined ticmark locations. In this option, the user defines which ticmark is associated with each coordinate, the dimension of each ticmark, and the grey level of each ticmark. The BOTH option combines the first and second options. The EMBEDPT option is similar to the second option. Line/sample coordinates and ticmark intensities are read from a file of user-defined ticmark locations and intensities. The ticmark intensities are checked to be within the range specified by MINVAL and MAXVAL. The coordinates are divided by SCALFACT to obtain the proper coordinates to be used with IN. The ticmark size is specified by TICSIZ.

The ticmarks are then engraved onto the image. If a grid is desired the ticmarks will be connected. If the input image is null, the ticmarks will appear on a constant background, creating a mask image. The output size is determined by applying the projection parameters. If an input image is given, ticmarks will be embedded onto the image. The output image is the same size as the input image.

A report is also generated showing the line/sample and user defined coordinates of each tic mark. This report will have an asterisk* beside each tic mark that is invalid(outside the output image). The report will also give the total number of invalid ticmarks.

Nonfatal Error Messages:

  1. [ticmark-upddr] Error updating DDR

    An error occurred while updating the output DDR file. The image data is valid and will be saved.

Fatal Error Messages:

  1. [ticmark-alloc] Error allocating dynamic memory

    An error occurred while allocating memory. Contact the system manager.

  2. [ticmark-coord] Coordinates must be specified

    No coordinate values were specified. Either enter the corner coordinates or enter an input image with a valid DDR.

  3. [ticmark-decdeg] Illegal coordinate value

    An incorrect coordinate value was specified. Check the coordinate values and the GEOUNITS to be sure they are correct.

  4. [ticmark-dim] Invalid ticmark dimension

    Ticmark thickness may be no greater than the smaller dimension of height or length.

  5. [ticmark-fatal] Fatal error encountered

    A fatal error occurred. The message displayed before this describes the specific error.

  6. [ticmark-getparms] Error finding OPROJKEY

    Check ensure sure that the correct OPROJKEY was specified and is in the INPROJ file.

  7. [ticmark-noproj] Projection information not available from DDR

    The input image DDR does not contain valid projection information. Create an INPROJ file by using PROJPRM.

  8. [ticmark-open] Error opening file

    An error occurred while opening the user-defined ticmark file. Verify the accuracy of the file.

  9. [ticmark-specify] XXXXX must be specified

    The parameter XXXXX must be specified if IN is null. Re-run TICMARK specifying a value for XXXXX or specify an input image in IN.

  10. [ticmark-system] System file sort failed

    The system sort failed. Contact the system manager.

  11. [ticmark-ticloc] Symbol buffer full

    The buffer containing ticmark points is full. To correct the problem, reduce either the number of ticmarks or the size of each ticmark.

  12. [ticmark-window] Image windows differ in size

    Image windows differ in size. Make sure that the same sized window is used for each input image.

User Notes:

  1. The TICSIZ option controls the size of the ticmark as shown by the following examples.

    
         --A ticmark with dimensions of (3,3,1) appears as:  
    
    			 *
    			*** 
                             * 
                                              
         --while a ticmark with dimensions 
           of (6,6,2) appears as:                   
    
    			**
    			** 
                          ******
                          ****** 
                            ** 
                            ** 
    
    
  2. The input file of user ticmarks for subcommands USERDEF and BOTH is an ASCII file created by a text editor. The fields within a record should be separated by blank spaces, not commas. Each record of the file describes the center point of a ticmark to be overlaid onto the image. Each record contains:

           o  Coordinates of pt 
           o  Symbol id 
           o  Symbol scale(H,W,T) 
           o  Symbol grey level
    

    Coordinates are in the format defined by GEOUNITS.

    The first record indicates that there are four records with ticmark information. The second record in the example below defines an upper-left corner ticmark to be placed at the coordinates of 38.0, -123.0 (latitude/longitude degrees). The corner ticmark is six pixels in the line direction, six pixels in the sample direction, and two pixels thick. The corner ticmark will have a pixel brightness of 255:

              4 
              38.0  -123.0  2  6  6  2  255 
              36.0  -120.0  3  6  6  2  255 
              38.0  -120.0  4  6  6  2  255 
              36.0  -123.0  5  6  6  2  255
    

    Valid ticmarks are: (Ticmark centers are identified with "C")

                                       * 
              = 1:  Center ticmark    *C* 
                                       * 
                                               C** 
              = 2:  Upper-left corner ticmark  * 
                                               * 
                                                  **C 
              = 3:  Upper-right corner ticmark      * 
                                                    * 
                                               * 
              = 4:  Lower-left corner ticmark  * 
                                               C** 
                                                    * 
              = 5:  Lower-right corner ticmark      * 
                                                  **C
    

  3. The input file for subcommand EMBEDPT is an ASCII file that is generated with a text editor or by VERIFY2. The fields within a record must be separated by blank spaces, not commas. Each record of the file describes the center point line/sample of a ticmark to be overlaid onto the output image and the pixel value. Each record contains:

           o  Line/sample coordinates of pt
           o  Symbol pixel value (intensity)
    

    The first record in the example below indicates that there are four records with ticmark information. The second record defines a ticmark to be placed at line 143/SCALFACT and sample 225/SCALFACT. The ticmark will have a pixel value of 23.

              4
              143.0  225.0  23 
              367.0  141.0  31
              228.0  108.0  14 
              524.0  429.0  5 
    

  4. SCALFACT is useful for a file created by VERIFY2, which verifies tie points that were selected from an image. After these points were selected, the original image may have been resized. SCALFACT specifies the factor that the size of the original image was reduced by. This factor is then used to scale the line/sample coordinates of the ticmarks. This factor must be a power of two (ie. 1 2 4 8 16 32). If an incorrect SCALFACT is used, the output will be shifted, and the ticmarks will not be embedded where they should be relative to where the tie points were selected. Some ticmarks may not even be within the output image.

  5. A related program is EDGEX.