# [postgis] About description of usage of C Clients (libpq) in PostGIS Manual

Dave Blasby dblasby at refractions.net
Thu Jul 26 10:33:39 PDT 2001

```> POINT(x y z)
> LINESTRING(x1 y1 z1, x2 y2 z2, x3 y3 z3)
> POLYGON((x1 y1 z1, x2 y2 z2, x3 y3 z3),(x4 y4 z4, x5 y5 z5, x6 y6 z6))
> MULTIPOINT(x1 y1 z1, x2 y2 z2)
> MULTILINESTRING((x1 y1 z1, x2 y2 z2, x3 y3 z3),(x4 y4 z4, x5 y5 z5, x6
> y6 z6))
> MULTIPOLYGON(((x1 y1 z1, x2 y2 z2, x3 y3 z3),(x4 y4 z4, x5 y5 z5, x6 y6
> z6)),((x1 y1 z1, x2 y2 z2, x3 y3 z3),(x4 y4 z4, x5 y5 z5, x6 y6 z6)))

Dont forget GEOMETRYCOLLECTION( <geometry >, <geometry> ...)
Where <geometry> is a POINT, LINESTRING, or POLYGON.

>From the documentation, here's some more examples.  Note; you can use
force2d(geometry) to get rid of the Z coordinate.

POINT(0 0 0)
LINESTRING(0 0,1 1,1 2)
POLYGON((0 0 0,4 0 0,4 4 0,0 4 0,0 0 0),(1 1 0,2 1 0,2 2 0,1 2 0,1 1 0))
MULTIPOINT(0 0 0,1 2 1)
MULTILINESTRING((0 0 0,1 1 0,1 2 1),(2 3 1,3 2 1,5 4 1))
MULTIPOLYGON(((0 0 0,4 0 0,4 4 0,0 4 0,0 0 0),(1 1 0,2 1 0,2 2 0,1 2 0,1
1 0)),((-1 -1 0,-1 -2 0,-2 -2 0,-2 -1 0,-1 -1 0)))
GEOMETRYCOLLECTION(POINT(2 3 9),LINESTRING((2 3 4,3 4 5)))

The WKT spec is in this document, page 3-24;

http://www.opengis.org/techno/specs/99-049.rtf

dave

Tell us what you think!
http://us.click.yahoo.com/vO1FAB/txzCAA/ySSFAA/PhFolB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
postgis-unsubscribe at yahoogroups.com

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/

```