<HTML dir=ltr><HEAD><TITLE>Re: [postgis-users] WKT parsers</TITLE>
<META http-equiv=Content-Type content="text/html; charset=unicode">
<META content="MSHTML 6.00.6000.16441" name=GENERATOR></HEAD>
<BODY>
<DIV id=idOWAReplyText12857 dir=ltr>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2>The only downside to the other formats aside from the WKB one is that PostGIS doesn't have comparable write back functions for those as we have for WKT (GeomFromText etc.).</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>But that's on our 2.0 wishlist for KML and GML at anyrate.  If we were to have an AsJSON it would be nice to have a comparable write back for that, although not sure if that is entirely necessary.</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>Thanks,</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2>Regina</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV></DIV>
<DIV dir=ltr><BR>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> postgis-users-bounces@postgis.refractions.net on behalf of Paul Ramsey<BR><B>Sent:</B> Fri 5/18/2007 6:03 PM<BR><B>To:</B> PostGIS Users Discussion<BR><B>Subject:</B> Re: [postgis-users] WKT parsers<BR></FONT><BR></DIV>
<DIV>
<P><FONT size=2>Mark,<BR><BR>If you have the opportunity, avoid parsing WKT and either (a) use an<BR>internal postgis transform like AsSVG, AsGML, AsKML or (b) pull<BR>text-based binary, and parse the WKB, which is a much more predictable<BR>structure (using encode(asbinary(geom),'hex') ).<BR><BR>I guess my answer could be phrased as a question: what are you going to<BR>do with the WKT once you parse it? Perhaps PostGIS needs another<BR>representation function (I'm sure we'll have an AsJSON soon enough...)<BR><BR>p<BR><BR>Mark Fredrickson wrote:<BR>> Hello everyone,<BR>><BR>> Can anyone point me to any WKT parsers? I'd prefer JavaScript and PHP<BR>> implementations, but I'm not that picky. Hopefully, they'd have some<BR>> regexs I could steal, er, borrow. :-)<BR>><BR>> TIA,<BR>> -Mark<BR>> _______________________________________________<BR>> postgis-users mailing list<BR>> postgis-users@postgis.refractions.net<BR>> <A href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</A><BR><BR><BR>--<BR><BR>   Paul Ramsey<BR>   Refractions Research<BR>   <A href="http://www.refractions.net/">http://www.refractions.net</A><BR>   pramsey@refractions.net<BR>   Phone: 250-383-3022<BR>   Cell: 250-885-0632<BR>_______________________________________________<BR>postgis-users mailing list<BR>postgis-users@postgis.refractions.net<BR><A href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</A><BR></FONT></P></DIV></BODY></HTML>
<HTML><BODY><P><hr size=1></P>
<P><STRONG>
The substance of this message, including any attachments, may be confidential, legally privileged and/or exempt from disclosure pursuant to Massachusetts law. It is intended solely for the addressee. If you received this in error, please contact the sender and delete the material from any computer.
</STRONG></P></BODY></HTML>