[postgis] GML vs. WKT
mbdavis
mbdavis at vividsolutions.com
Fri Feb 15 08:29:27 PST 2002
As Frank said, WKT predates GML, and yes, it does separate coordinates with
a space and points with a comma. This syntax is defined in the OGC Simple
Features for SQL specification
(http://www.opengis.org/techno/specs/99-049.pdf).
In actual fact, the GML spec doesn't restrict coordinate and point
separators to be commas and spaces - it allows the user to specify the
separators (see http://www.opengis.net/gml/01-029/GML2.html#sec4.3).
Whether anyone should make use of this flexibility is another question.
Personally, I think not - the more flexible the specification, the more
complex parsers have to be.
While the difference is unfortunate, as you say it only makes life
*slightly* more complex for translator developers. Also, no matter what the
extra effort required, the work in writing a WKT-to-GML translator is far
less than in writing any <binary spatial format>-to-GML translator.
Martin Davis, Senior Technical Specialist
Vivid Solutions Inc.
Suite #1A-2328 Government Street Victoria, B.C. V8T 5G5
Phone: (250) 385 6040 Fax: (250) 385 6046
EMail: mbdavis at vividsolutions.com Web: www.vividsolutions.com
> -----Original Message-----
> From: Rob Hranac [mailto:robhranac at vfny.org]
> Sent: Thursday, February 14, 2002 6:16 PM
> To: postgis at yahoogroups.com
> Subject: [postgis] GML vs. WKT
>
> 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.
>
> Regards,
> Rob Hranac
> Vision for New York
> 377 Broadway
> NY, NY 10013
> tel: 212.219.6052
> fax: 212.219.6006
> eml: robhranac at vfny.org
> web: www.vfny.org
>
>
> ------------------------ Yahoo! Groups Sponsor
> ---------------------~-->
> Sponsored by VeriSign - The Value of Trust
> When building an e-commerce site, you want to start with a
> secure foundation. Learn how with VeriSign's FREE Guide.
> http://us.click.yahoo.com/kWSNbC/XdiDAA/yigFAA/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/
>
>
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Sponsored by VeriSign - The Value of Trust
Do you need to encrypt all your online transactions? Find
the perfect solution in this FREE Guide from VeriSign.
http://us.click.yahoo.com/vCuuSA/UdiDAA/yigFAA/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/
More information about the postgis-users
mailing list