[postgis-users] WKT parsers

Paul Ramsey pramsey at refractions.net
Fri May 18 15:03:51 PDT 2007


Mark,

If you have the opportunity, avoid parsing WKT and either (a) use an 
internal postgis transform like AsSVG, AsGML, AsKML or (b) pull 
text-based binary, and parse the WKB, which is a much more predictable 
structure (using encode(asbinary(geom),'hex') ).

I guess my answer could be phrased as a question: what are you going to 
do with the WKT once you parse it? Perhaps PostGIS needs another 
representation function (I'm sure we'll have an AsJSON soon enough...)

p

Mark Fredrickson wrote:
> Hello everyone,
> 
> Can anyone point me to any WKT parsers? I'd prefer JavaScript and PHP
> implementations, but I'm not that picky. Hopefully, they'd have some
> regexs I could steal, er, borrow. :-)
> 
> TIA,
> -Mark
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users


-- 

   Paul Ramsey
   Refractions Research
   http://www.refractions.net
   pramsey at refractions.net
   Phone: 250-383-3022
   Cell: 250-885-0632



More information about the postgis-users mailing list