Programmer Guide/Command Reference/EVAL/pgget: Difference between revisions

From STX Wiki
Jump to navigationJump to search
No edit summary
No edit summary
Line 2: Line 2:
Extract a polygon from a [[../#polygons|closed point-list]] or a [[../#polygons|polygon-stream]].
Extract a polygon from a [[../#polygons|closed point-list]] or a [[../#polygons|polygon-stream]].
----
----
;Usage 1:<code>pginit(<var>X</var>)</code>
;Usage 1:<code>pgget(<var>X</var>)</code>
:;<var>X</var>:A [[../#polygons|closed point-list]] or a [[../#polygons|polygon-stream]] defining one or more polygons.
:;<var>X</var>:A [[../#polygons|closed point-list]] or a [[../#polygons|polygon-stream]] defining one or more polygons.
;Result 1: The number of [[../#polygons|simple polygons]] ''N'' stored in ''X''. If the result is '''0''', ''X'' contains no valid polygons.
;Result 1: The number of [[../#polygons|simple polygons]] ''N'' stored in ''X''. If the result is '''0''', ''X'' contains no valid polygons.
----
----
;Usage 2:<code>pginit(<var>X</var>, <var>I</var>, <var>fmt</var>)</code>
;Usage 2:<code>pgget(<var>X</var>, <var>I</var>, <var>fmt</var>)</code>
:;<var>X</var>:A [[../#polygons|closed point-list]] or a [[../#polygons|polygon-stream]] defining one or more polygons.
:;<var>X</var>:A [[../#polygons|closed point-list]] or a [[../#polygons|polygon-stream]] defining one or more polygons.
:;<var>I</var>:The index of the polygon to be returned; 0 <= ''I'' < ''N'' (= <code>pgget(''X'')</code>)
:;<var>I</var>:The index of the polygon to be returned; 0 <= <var>I</var> < ''N'' (= <code>pgget(''X'')</code>)
:;<var>fmt</var>:The format of the result.:
:;<var>fmt</var>:The format of the result.:
::{|class="keinrahmen"
::{|class="keinrahmen"
|''fmt''=0 ||... return the ''I''-th polygon of ''X'' as [[../#polygons|polygon-stream]]
|''fmt''=0 ||... return the ''I''-th polygon of ''X'' as [[../#polygons|polygon-stream]]
|-
|''fmt''=1 ||... return the [[../#polygons|polygon-stream]] header (a 8x2 matrix) of the ''I''-th polygon of ''X''
|''fmt''=1 ||... return the [[../#polygons|polygon-stream]] header (a 8x2 matrix) of the ''I''-th polygon of ''X''
|}
|}

Revision as of 07:26, 20 April 2011

Extract a polygon from a closed point-list or a polygon-stream.


Usage 1
pgget(X)
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.

on. If E<=0 the simplification is skipped.


See also
pgget, pgitest, pgiline, pgxgrid, pgsplit, pgtrans, pghull


<function list>

Navigation menu

Personal tools