[postgis-users] Expanding a geometry

Markus Schaber schabi at logix-tt.com
Fri Sep 22 07:47:23 PDT 2006


Hi, Nicolas,

Nicolas Ribot wrote:

> Is there an easy way to produce an expanded polygon (not only its bbox) ?
> By expanded polygon, I mean a resulting polygon which geometry is the
> same as the input one, but just "scaled" (no rounded corners like the
> result of buffer()). (edges remain parallel, and distance between
> initial polygon edges and resulting polygon is constant)
> 
> Are scale() or affine() able to produce a valid result, even with
> complex polygons (holes, multipolygon ?)

scale() as well as the appropriate affine() transformations multiply all
coordinates, so the resulting geometry will stay valid.

affine() is also able to rotate or shift the polygon, but they should
still remain valid in the topological sense.

HTH,
Markus

-- 
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf.     | Software Development GIS

Fight against software patents in Europe! www.ffii.org
www.nosoftwarepatents.org



More information about the postgis-users mailing list