[OpenLayers-Dev] WKT support?

Christopher Schmidt crschmidt at metacarta.com
Mon Mar 26 08:54:53 EDT 2007


On Mon, Mar 26, 2007 at 08:39:40AM -0400, Paul Spencer wrote:
> OTOH, it would probably be more efficient to convert said WKT into  
> GeoJSON before returning it to the browser and thus reduce the client  
> load.

That's the path I'd like to see encouraged, yeah.

> If WKT support is added, I would prefer to use Chris' approach of  
> having a couple of utility functions that go to/from geometries ...  
> and also discourage general use of WKT in favour of something like  
> GeoJSON.  I would actually see more use in having a Geometry.asWKT()  
> function to work with various server-side pieces that support WKT  
> directly rather than having to futz with GML conversion at both ends.

Agreed. Geometry.asWKT() is definitely a nice feature that I'd like to
see come in with 2.5 (or with 2.4 if someone cooks up a decent patch
before we get to an RC cycle :))

> Re the 'well known' part, I have not directly run into problems with  
> this myself, but I have worked mostly with the simple types (POINT,  
> LINE, POLYGON) which do seem to be pretty standard.  Given the types  
> of geometry that OpenLayers supports, I think these three would be  
> all that would be required (for output anyway) and would be pretty  
> standard.

Hm, that sparks a memory that perhaps it was only the MULTI stuff that I
was having problems with. What I remember (this was in my early days of
geo, more than a year ago now) was that copying something from whatever
postgis I had installed (something along the lines of 0.6 or really
early like that) into some tool I was interacating with at the Python 
interactive interpreter broke... but this was all long enough ago that
it's certainly possible it's ancient history (or an imaginary part of
history to begin with).  

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Dev mailing list