[postgis] GML vs. WKT

Frank Warmerdam warmerdam at pobox.com
Thu Feb 14 18:31:29 PST 2002


Rob Hranac wrote:
> Hi Guys,
> 
> I have a question about the syntax of your geometry functions.  Example:
> GeometryFromText('LINESTRING(191232 243118,191108 243242)',-1)
> 
> You mention that this is the WKT description of OGC primitives.  Note that
> your geometry functions separate coordinates by a space delimiter and
> coordinate tuples by a comma delimiter.  This is the exact opposite of
> common practice in the GML world.  Although GML allows you to specify any
> delimiter you want for each (in the 'ts' and 'cs' attributes of the
> <coordinates> element), the default is that coordinates are separated by
> commas and points/tuples by spaces.  I know almost nothing about WKT (and a
> quick search on the pristinely organized OGC website showed nothing), but is
> the default syntax for it's delimiters, then, the exact opposite of GML?
> 
> If not, ignore the rest, but if it is... It is a safe bet that the GML
> default will become a near-standard in most applications.  Certainly not a
> show stopper, but it does make life slightly more difficult GML converters
> such as myself; it is probably a fair assumption that GML converters will
> someday comprise a large portion of your user base.  Given, this you might
> think about switching your delimiters, unless I am missing something in WKT
> or OGC SQL.  
> 
> Remain a big Postgis fan, by the way.  Will soon spam this list with a beta
> announcement for my open source WFS, which serves exclusively from Postgis.
> It is getting tested in OWS1 and Postgis is holding up really well.

Rob,

The WKT format predated GML.  I have no idea why the GML folks used the syntax
they did but it also struck me as odd they approached it the opposite of WKT
though they likely have precident in some other standard.

Second, the PostGIS guys are by no means in "charge" of the WKT standard.  It
is embedded in the various simple features standards and is unlikely to change.

What might be helpful is if the PostGIS (and perhaps my OGR) WKT translators
could recognise the GML coordinate list format and accept it in a WKT
geometry formulation - assuming this wouldn't introduce any scary
ambiguities.

Best regards,

-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



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