Buffer

The Buffer function allows to generate a geometry around your initial layer.


Syntax : select Buffer(the_geom, bufferSize[, 'butt'|'square'|'round']) from myTable;


Remark : Butt, square and round are parameters of the Buffer function. They allow to determine the shape of the zone.


Butt

Square

Round


       - Example : With a parameter, the instruction will be : select Buffer(the_geom, 100, 'butt') from myTable

       - By default, if you do not specify the parameter, the buffer will be with the option "round" (it will be the case in the example below)


Example :

       - Goal : Generate a buffer around the hydrographic network

       - Syntax : SELECT Buffer(the_geom, 20) as the_geom, autonumeric() AS gid FROM "TRONCON_HYDROGRAPHIQUE";


-->


Remark : In this example, we use a spatial operator who requires two arguments (parameters): the field where is the geometry and the size of the zone. The result of the Buffer function returns a new geometry which will be stored in a field "the_geom". To complete the new layer, an auto-incremented (autonumeric) field is added (it is going to be the identifier).

Copyright - IRSTV - 2009 - www.orbisgis.org