pgitest
From STX Wiki
< Programmer Guide | Command Reference | EVAL
Jump to navigationJump to search
Check the relation (outside, inside, overlap) of a given point, line or simple polygon p to the polygon x.
- Usage 1
pgitest(X, IX, PXscalar, PYscalar)
- X
- a closed point-list or a polygon-stream defining one or more polygons.
- IX
- The index of the polygon of X to be tested; 0 <= IX < N (=
pgget(X)
) - PX, PY
- The point P=<PX,PY> to be tested.
- Result 1
- The result r is a scaler.
r=0 ... point P is outside the polygon - r=1 ... point P is inside the polygon
pgitest(X, I, PXscalar, PYvector)
pgitest(X, I, PXvector, PYscalar)
pgitest(X, I, PXvector, PYvector)
- X
- A closed point-list or a polygon-stream defining one or more polygons.
- Result 1
- The number of simple polygons N stored in X. If the result is 0, X contains no valid polygons.
- Usage 2
pgget(X, I, fmt)
- X
- A closed point-list or a polygon-stream defining one or more polygons.
- I
- The index of the polygon to be returned; 0 <= I < N (=
pgget(X)
) - fmt
- The format of the result.:
fmt=0 ... return the I-th polygon of X as polygon-stream fmt=1 ... return the polygon-stream header (a 8x2 matrix) of the I-th polygon of X
- Result 2
- The I-th polygon stored in X in the format selected by fmt.