[postgis] GML generation scripts and question

Rosemary Mann/Nedjo Rogers rmann at coastnet.com
Wed Jan 9 11:58:29 PST 2002


Attached is a preliminary script for generating Geography Markup Language
(GML) 2.0 content from well-known text (WKT) representations of the sort
generated by PostGIS (i.e., that of the OpenGIS Simple Features
Specification for SQL).

The script is called "convertgeom.php"; "example.php" is an example file.
To use, save both in a php-enabled web directory and open example.php.

For maximum portability (and, perhaps, lower server overhead), I've chosen
to convert the raw WKT instead of using a series of queries to extract
sub-geometries (e.g., rings of polygons or elements of MULTI geometries).
But the GML polygon format requires a distinction between the "outer" and
any "inner" rings.  In this script, I've assumed the first ring given in the
WKT is the outer one.

Is this a valid assumption--or is the order of the rings arbitrary?  (If the
latter, a test would be necessary to determine order.)

Nedjo Rogers


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/ 





More information about the postgis-users mailing list