[postgis-devel] Specifying end cap and join styles Buffer op

strk strk at keybit.net
Mon Jun 22 11:30:04 PDT 2009


On Mon, Jun 22, 2009 at 05:39:06AM -0400, Paragon Corporation wrote:
> Strk,
> I was thinking that we check it at the SQL  level.
> 
> So we would have say 3 functions
> 
> _ST_Buffer --> geom,rad,params  C lang calls postgis function directly
> ST_Buffer(geom,rad,params) -> SELECT _ST_Buffer(geom,rad, CASE WHEN params
> ~= '[0123456789]+' THEN 'quad_segments=' || params ELSE params END) ; (well
> some regex thingy my syntax is probably wrong) 
> 
> --I suppose in theory we don't need this last one anymore to keep backward
> compatibility as the integer would be cast to text and move to the other
> (which is perhaps what Paul was thinking in too terse of a statement),
> -- but I don't like relying on the implicit cast being there.
> 
> ST_Buffer(geom,rad, quad_segment) (takes integer  -- which becomes
> short-hand for something like _ST_Buffer(geom,rad, 'quad_segments=' ||
> CAST(quad_segment As text)) 
> 
> So in the end you have just one C function to rule them all

Alright, my +1 here.
Can others with voting powers vote so I can proceed to speed ?
TIA

--strk; 

 Free GIS & Flash consultant/developer      ()  ASCII Ribbon Campaign
 http://foo.keybit.net/~strk/services.html  /\  Keep it simple! 



More information about the postgis-devel mailing list