GRDPOL -- Polygon Coverage Gridding

Convert polygons or arcs in vector segments to raster image or bitmap.

See Also: GRDVEC, GRDINT, RTV

PARAMETERS

GRDPOL is controlled by the following global parameters:

Name     Prompt                                  Count     Type
FILV     Database Vector File Name               1-64      Char
DBVS     Database Vector Segment                 1-16      Int
FILE     Database File Name                      1-64      Char
DBOC     Database Output Channel List            0-1       Int
FLDNME   Field Name                              1-64      Char
ALGO     Algorithm                               1-10      Char
REPORT   Report Mode: TERM/OFF/filename          0-64      Char

FILV

Specifies the name of the file containing the vector layers to be rasterized into the raster channel. If this is not specified, it will be assumed to be the same as the contents of FILE.

 EASI>FILV="filespec"

DBVS

Specifies the vector segments containing polygons (for ALGO = "POLYGON") or vector segments containing arcs and/or seed points (for ALGO = "EDGEFILL"). This segment should be found on the file indicated in FILV.

 EASI>DBVS=i
 EASI>DBVS=i,..,j

FILE

Specifies the name of the PCIDSK database file to which the rasterized output will be written.

 EASI>FILE="filespec"

DBOC

Specifies the database channel where the rasterized output image will be stored. If DBOC is not specified, it is taken that the output should be saved to a bitmap. A bitmap segment is automatically created.

 EASI>DBOC=i            | save to channel #i
 EASI>DBOC=             | save to bitmap

REPORT

Specifies the destination to which a brief status report should be sent.

 EASI>REPORT="filename"
 EASI>REPORT="OFF"      | turn off report
 EASI>REPORT="TERM"     | terminal output (default)

FLDNME

  Valid Values:   ATTRIBUTE, ZCOORD
  Default:        ATTRIBUTE
Specifies the attribute name whose value is to be used to grid the polygons or edges. If this parameter is specified as ZCOORD, the z coordinate of the first vertex of each vector shape is used. If the specified attribute does not exist and it is not ZCOORD, the ShapeID of the vector shapes are used for gridding. When ALGO is EDGEFILL, the attribute value is taken from the seed points.

 ATTRIBUTE      -> The attribute of the vector segment is used. 
 ZCOORD         -> The actual Z-coordinates of the vectors are used.

ALGO

  Valid Values:   POLYGON, EDGEFILL
  Default:        POLYGON
ALGO[Selection,"POLYGON|EDGEFILL"]:Algorithm

Specifies one of two algorithms:

DETAILS

GRDPOL uses two algorithms for gridding polygons.

First, if the complete boundary of each polygon is specified in a single vector, the polygon scanline conversion algorithm is applied to directly grid the polygons (corresponding to ALGO="POLYGON"). In order to use this algorithm, each vector in the specified vector layers must be a closed curve (or several closed rings) with at least 4 vertices (including a pair of duplicated vertices). The scanline conversion algorithm can process polygons with holes or even with islands within holes, as long as the entire boundaries (exterior and interior) of each polygon are given in one shape.

GRDPOL accepts generic vector layers as well as Arc/Info type of topological layers. In case of topological layers, only the area layer should be specified in DBVS; GRDPOL will automatically find and use the corresponding topological arc layer. The grey level for a polygon is derived from the vector attribute value whose name is given by the Field Name parameter.

Any image area not covered by a polygon is filled with a background value. This background value (typically chosen as zero, if available) should be different from all other polygon grey levels.

The second algorithm used by GRDPOL first draws polygon boundaries as arcs and then fills the polygon interiors (corresponding to ALGO="EDGEFILL"). Each arc only specifies a partial boundary of a polygon (or between several polygons) and it is not necessary to be a closed curve. A polygon is then defined by the area enclosed by several arcs. An interior point (seed point) is required for each polygon. The input vector layers specify the arcs and the points, where they can be in separate layers or combined in a single layer. If an interior point is too close to an arc (with distance less than half of pixel size), it becomes ambiguous for the algorithm and will be ignored. Any multiple points within one polygon will also be ignored. The grey level for a polygon is derived from the attribute value of the interior point where the attribute name is specified in the Field Name parameter.

If any polygon does not have an interior point, it will be filled with a background value. This background value is chosen to be different from all filled polygon values. It is typically zero. This algorithm may need to create a temporary file if the available memory is less than the required buffer size. GRDPOL will delete the temporary file if GRDPOL exits normally.

If requested, a status report is generated which summarizes the results of gridding and interpretation.

EXAMPLE

The EDGEFILL algorithm of GRDPOL is the inverse of the RTV program. Use RTV to create a vector segment based on channel 6 of irvine.pix, which contains land use/land cover data. The vector segment will contain polygons for each area defined in channel 6, and interior points with the attribute value set to the grey level of the polygon.

 EASI>FILE="irvine.pix"
 EASI>DBIC=6
 EASI>DBIW=
 EASI>DBSN="POLYGONS"
 EASI>DBSD=
 EASI>POLYINFO="BOTH"
 EASI>BORDER="OFF"
 EASI>CONTINT=
 EASI>RUN RTV
Use GRDPOL to create raster polygon coverage based on polygons stored in the segment created by RTV. The resulting output channel 8 should be identical to channel 6.

 EASI>DBVS=LASC         |RTV puts created segment number in LASC
 EASI>DBOC=8
 EASI>FILV=
 EASI>FLDNME="Attribute"
 EASI>ALGO="EDGEFILL"
 EASI>REPORT=
 EASI>RUN GRDPOL

About PCI Help Gateway