[postgis-users] ST_Buffer returning multipolygons

Stephen Woodbridge woodbri at swoodbridge.com
Fri Jan 18 08:22:44 PST 2013


On 1/18/2013 11:10 AM, marquz74 wrote:
> Francois Hugues wrote
>> We don't know what are your original geometries or what kind of buffer
>> you apply (since you work with linestrings we can assume it is a
>> positive buffer). Maybe some of your linestrings are multilinestrings
>> with disjoint components.
>
> the query:
>
> SELECT GeometryType(the_geom)
> FROM streams
> WHERE GeometryType(the_geom)  <> 'LINESTRING';
>
> returns 0 records.

If you have a linestring that follows a stream or rivier then you likely 
will have an ox bow like geometry, think of the letter Omega. If you add 
enough buffer to this you will end up intersecting your buffer with 
another part of the buffer. This creates polygon or multipolygon.

You could post you command and geometry so others can look at it.

select gid, astext(the_geom) from streams where 
GeometryType(st_buffer(the_geom, <distance>)) = 'MULTIPOLYGON';

-Steve


More information about the postgis-users mailing list