NAME
polygon2xy - export polygon data for usage with
GMT.
SYNOPSIS
polygon2xy [-subset expr] db
SUPPORT
Contributed code: NO BRTT support.
THIS PIECE OF SOFTWARE WAS CONTRIBUTED BY THE ANTELOPE USER COMMUNITY. BRTT DISCLAIMS ALL OWNERSHIP, LIABILITY, AND SUPPORT FOR THIS PIECE OF SOFTWARE.
FOR HELP WITH THIS PIECE OF SOFTWARE, PLEASE CONTACT THE CONTRIBUTING AUTHOR.
DESCRIPTION
polygon2xy writes the vertices of polygons stored in a database to standard out. Polygons are closed by appending the 1st vertex if not already closed.
OPTIONS
-
-subset expr
Datascope expression to subset the database. See dbexpressions(5) and polygon1.2(5).
-
db
Database object containing the polygon data. Note that the database must at least contain a table polygon. If specified as -, the input is read from stdin. See the examples below.
EXAMPLE
Export the border of Austria:
polygon2xy -subset "pname=~/Austria/" mydb > Austria.xy
dbsubset mydb.polygon "pname=~/Austria/"|\
polygon2xy - > Austria.xy
BUGS AND CAVEATS
The output is in the form of a
multiple segment file, i.e the individual polygons are preceeded by a
> and the -M flag must be specified when running
psxy with the output.
If the selected records are closed (if closed is set to "y" in the database), the output is a closed polygon, i.e there is no need to specify the -L flag to psxy. This allows to plot both polygons, lines and points from the same file.
SEE ALSO
dbsubset(1), dbexpressions(5),
polygon1.2(5), psxy(1), xy2polygon(1).
AUTHOR
Nikolaus Horn
ZAMG / Vienna, nikolaus.horn@zamg.ac.at
Antelope User Group Contributed Software