Rasterize vector data from World Data Bank II
Rasterize vector data from World Data Bank II (WDBII) and either create a new image that can be used as an overlay for the input image, copy the image data from the input image to a new image with line work overlaid on it, or write the line work directly into the input image. This routine places line work into AVHRR LAS images in satellite or other projections. If the input image is in the AVHRR satellite's projection, it must have an associated AVHRR Data Descriptor Record (ADDR).
- IN
- Input image. The image for which the vector overlay is being generated. It must be a single band image if the vector data is to be overlaid onto the image (when OUT is NULL).
- OUT
- Output image. The output image will be a one-band image containing a background of BACKGRND values or the image data from IN, with lines of PIXVAL drawn over it. When this parameter is NULL, the vector data is drawn directly into the input image.
- AREA(NA)
- World Data Bank II area. The area of the World Data Bank II that is to be rasterized. The name of a user-specified area is used as the file name for nonstandard World Data Bank II format files.
= NA: North America = EU: Europe = AS: Asia = SA: South America = AF: Africa = User-specified area
- CIL(--)
- Coastlines, islands, and lakes classifications. The outlines of these coastlines, islands, and lakes will be drawn into the appropriate image. If defaulted, none of these features will be drawn.
= 1: Coastlines, islands, and lakes that appear on all maps = 2: Major islands and lakes = 3: Intermediate islands and lakes = 4: Minor islands and lakes = 6: Intermittent major lakes = 7: Intermittent minor lakes = 8: Reefs = 9: Major salt pans = 10: Minor salt pans = 13: Major ice shelves = 14: Minor ice shelves = 15: Glaciers
- RIV(--)
- Rivers. The outlines of these types of rivers will be drawn into the appropriate image. If defaulted, no rivers will be drawn.
= 1: Permanent major rivers = 2: Additional major rivers = 3: Additional rivers = 4: Minor rivers = 5: Double-lined rivers = 6: Major intermittent rivers = 7: Additional intermittent rivers = 8: Minor intermittent rivers = 10: Major canals = 11: Minor canals = 12: Irrigation canals
- BDY(--)
- International boundaries or limits of sovereignty. These boundaries will be drawn into the appropriate image. If defaulted, none of these boundaries will be drawn.
= 1: Demarcated or delimited = 2: Indefinite or in dispute = 3: Other line of separation or sovereignty on land
- PDY(--)
- Internal boundaries. These boundaries will be drawn into the appropriate image. If defaulted, none of these boundaries will be drawn.
= 1: First order administrative = 2: Second order administrative = 3: Third order administrative
- RRR(--)
- Railroads. The outlines of these railroads will be drawn into the appropriate image. If defaulted, no railroads will be drawn.
= 11: Broad gauge = 12: Standard gauge = 13: Narrow gauge
- RDS(--)
- Roads. The outlines of these roads will be drawn into the appropriate image. If defaulted, no roads will be drawn.
= 11: 2 or more lanes = 12: Hard-surface highway = 13: Gravel = 14: Unsurfaced = 15: Track, trail, or caravan = 16: Road ferries = 17: Under construction = 19: Undifferentiated
- PIXVAL(255)
- Pixel value. The grey level value to be given to the rasterized vector data.
- BACKGRND(0)
- Background value. The value given to the pixels of the output image that are not assigned a value from the input vector data. If BACKGRND is NULL, the background of OUT will be filled with the pixel values from the input image. This parameter is ignored if OUT is NULL.
- LINWT(1)
- Line weight. The width, in number of pixels, of the rasterized line.
- PNTINT(1)
- Point interval. Every PNTINT point from the WDBII line segment will be used to generate line work in OUT. Increasing PNTINT will allow the user to generate an image more quickly while maintaining relatively accurate line work. Each increment of PNTINT is about 40% faster than the previous PNTINT, up to PNTINT=5. After that, the speed increase is less noticeable. For example, specifying PNTINT=5 will complete in one-third to one-fourth the time of PNTINT=1.
- PROJ(SAT)
- Projection code. The projection type of the input image.
= SAT: Satellite projection. The input image is in satellite projection. = OTH: All other projections. Projection information for the image is retrieved from the DDR.
OUTIMG will be a one-band image the same size as INIMG, containing the coastlines, islands, and lakes that appear on all maps, and other major islands and lakes of North America. Since INIMG is in the satellite's projection, OUTIMG will also.
Band two of INIMG will have line work drawn into it. The minor rivers of North and South America will be drawn with a pixel value of 1023. Lines will be two pixels wide.
The international boundaries of South America will be drawn into OUTIMG. INIMG was reprojected, so OUTIMG will be in the same projection. Every fourth point of the WDBII segments is selected.
WDBII files contain vector data of feature outlines. The data consists of a series of latitude/longitude pairs that are points along the line segments. In order to "rasterize" the WDBII vector data, each latitude/longitude point in the file must be converted to a line/sample coordinate. The points must then be connected to produce line segments.Processing begins by opening a temporary scan file. The correct WDBII files for the specified areas and features are opened. While reading through the WDBII file, whenever a line segment falls within the image, the corresponding line and sample values of every PNTINT point in that segment are calculated. Then the endpoints and line/sample values of pixels connecting these two points are written to the temporary scan file. After all the WDBII files have been read, they are closed and the scan file is sorted. The raster image is then opened and the sorted file is read. Line work is inserted into the raster image as it is being written. If a new output image is being created, it will be a single-band image the same size as IN. For each line in the sorted file, the appropriate pixels are set to PIXVAL, and the rest are set to BACKGRND or copied from IN if BACKGRND is NULL. If no output image is specified, the lines will be written over the top of IN with a pixel value of PIXVAL.
The specified WDBII file does not exist; therefore, the expected line work will not be created. The program will go on to the next feature.
An error occurred while creating an AVHRR DDR file for OUT. This file may be necessary if OUT will in turn be processed using ADAPS functions.
A nonfatal error was encountered during processing. The preceding message explains the exact error.
An error occurred dynamically allocating memory, which was required for further processing. Contact the system administrator if the problem persists.
The value specified for BACKGRND was not within the valid range for the data type of IN. Retry, using a different value for BACKGRND.
After scanning all lines in the specified WDBII files, no segments were found to fall in the output image. Check that the AREA specified covers the area of the scene.
A fatal error was encountered during processing. The preceding message explains the exact error.
This error may occur in two cases. One band of IN must be specified when OUT is NULL, because the line work is placed directly into IN. If OUT is specified and BACKGRND is NULL, one band from IN must be specified from which background data will be taken. Retry, either by specifying a new image in OUT or by specifying one band in IN.
An error occurred opening a file into which line segments will be placed. Check to ensure there is sufficient disk space and that you have write permission in the current working directory.
PROJ was specified as "OTH", but the input image's DDR had an invalid projection code. Ensure that the image is in a valid projection. If not, reproject the image or use the "SAT" satellite projection.
PROJ was specified as "OTH", but the input image's DDR had invalid corner projection coordinates. These are necessary to find the appropriate line and sample for the given line segment. Ensure that the image is in a valid projection. If not, reproject the image or use the "SAT" satellite projection.
PROJ was specified as "OTH", but the input image's DDR had invalid values for projection distance per pixel. These are necessary to find the appropriate line and sample for the given line segment. Verify that the image has a valid DDR. If not, reproject the image, or use the "SAT" satellite projection.
The value specified for PIXVAL was not within the valid range for the data type of IN. Retry, using a different value for PIXVAL.
PROJ was specified as "OTH", but the input image's DDR had an invalid projection unit. This is necessary to find the appropriate line and sample for the given line segment. Reproject the image, or use the "SAT" satellite projection.
An error occurred while sorting the scan file of line segments. Check to ensure there is sufficient disk space to write another file the same size as the scan file.