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

Paul Ramsey pramsey at cleverelephant.ca
Mon Jun 22 07:51:25 PDT 2009


On Mon, Jun 22, 2009 at 5:29 AM, Mark Cave-Ayland
<mark.cave-ayland at siriusit.co.uk> wrote:

> I see, although I actually had in mind using the standard array constructor maybe something like this:
>
>
> select st_buffer(geom, 10, array['join=bevel', 'endcap=flat', 'limit=10']);

This is still an anonymous string, just one level in. I figured
array-of-array would be a good idea, until I realized that arrays are
homogeneous on type. So that this would fail:

select st_buffer(geom, 10, array[array['join','bevel'],
array['endcap','flat'], array['limit',10]]);

and this would be correct

select st_buffer(geom, 10, array[array['join','bevel'],
array['endcap','flat'], array['limit','10']]);

which seems just too finicky to argue for.

I don't perceive this

select st_buffer(geom, 10, array['join=bevel', 'endcap=flat', 'limit=10']);

as having any great claim to "internal structures" or I-am-not-a-hack
purity over this

select st_buffer(geom, 10, 'join=bevel endcap=flat limit=10');

the latter certainly uses fewer characters and is easier to type.

P. (suffering from "but, but, but, oracle does it" disease)



More information about the postgis-devel mailing list