123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 |
- <HEAD>
- <TITLE>GRASS 5.7/6 Vector Format and API</TITLE>
- </HEAD>
- <BODY>
- <p>
- <H1>GRASS 5.7/6 Vector Format and API</H1>
- The API is described in
- <p>
- <a href="http://grass.itc.it/devel/index.php#prog">GRASS 6 Programmer's Manual</a>
- <p>
- source code file:<br>
- lib/vector/vectorlib.dox
- <HR>
- <h2><A NAME="ascii">Vector ASCII Format Specification</A></h2>
- <p>
- <i>format notes here are outdated and to be merged into<br>
- vector/v.in.ascii/description.html</i>
- <p>
- The ASCII format in the new version contains support for categories,
- z-coordinates, and the new types centroid, face, and kernel.
- Points and centroids are saved as one coordinate pair instead of two.
- File is saved in old dig_ascii directory but the name will be probably changed.
- <H3>Head</H3>
- The head of the file is similar as the head file of vector binary
- format but contains bounding box also. Key words are:<br>
- <PRE>
- ORGANIZATION
- DIGIT DATE
- DIGIT NAME
- MAP NAME
- MAP DATE
- MAP SCALE
- OTHER INFO
- ZONE
- WEST EDGE
- EAST EDGE
- SOUTH EDGE
- NORTH EDGE
- MAP THRESH
- </PRE>
- <H3>Body</H3>
- The body begins with the row:
- <PRE>
- VERTI:
- </PRE>
- followed by records of lines:
- <PRE>
- TYPE NUMBER_OF_COORDINATES [NUMBER_OF_CATEGORIES]
- X Y [Z]
- ....
- X Y [Z]
- [ FIELD CATEGORY]
- ....
- [ FIELD CATEGORY]
- </PRE>
- Everything above in <b>[ ]</b> is optional.
- Note the coordinate order in the old version (Y X) has been changed
- to (X Y [Z]).
- <br><br>
- TYPE may be:<br>
- <ul>
- <li><b>P</b> point (dot) <br>
- <li><b>p</b> dead point (dead dot) <br>
- <li><b>L</b> line <br>
- <li><b>l</b> dead line <br>
- <li><b>B(A)</b> boundary <br>
- <li><b>b(a)</b> dead boundary <br>
- <li><b>C</b> centroid <br>
- <li><b>c</b> dead centroid <br>
- <li><b>F</b> face (3D boundary) <br>
- <li><b>K</b> kernel (3D centroid) <br>
- </ul>
- <br>
- Example of records:
- <PRE>
- P 1 1
- 1234 3435
- 1 354
- L 3 1
- 4132 4534
- 1453 1454
- 1453 4543
- 1 355
- </PRE>
- <HR>
- <h2><A NAME="example">Vector module programming example</A></h2>
- <a href=v.example/>Vector module C programming example</a>
- <h2><A NAME="status">Vector module upgrade status</A></h2>
- <a href=v.modules.html>Vector upgrade status</a> (partially outdated)
- <hr>
- $Date$
- </BODY>
- </HTML>
|