[postgis-devel] [PostGIS] #413: ST_Single_Sided_Buffer added

Martin Davis mbdavis at refractions.net
Fri Feb 19 13:36:54 PST 2010



Pierre Racine wrote:
> Right. In Arc, you can apply the OUTSIDE_ONLY option only to polygons. It is not possible to apply it to polylines. For me the result of building parallele lines along polylines (returning polylines) and building a buffer around polylines (returning polygons) is so similar that I don't see the need to create another function.
>   
The ARC Buffer OUTSIDE_ONLY option as I understand it returns the 
equivalent of ST_Difference(A, ST_Buffer(A,...).    This feature isn't 
really the question here - it's whether ST_Buffer should always return 
polygons.  In Arc this is the case.  I think this is a nice semantics to 
have, and that PostGIS should follow the same pattern. 

One reason for this is that users then know that they can apply 
"polygon" kinds of functions to the result of ST_Buffer.  For example, 
ST_Boundary(ST_Buffer()) will always return a linear geometry 
representing the outline of the buffer polygon.
> ST_Buffer should in any case allow the possibility to get polylines, not polygons. You could always ST_LineFromGeom(ST_Buffer()) to convert your polygon buffers to lines but aparently there is no such function as LineFromGeom... How do we convert polygons to polylines?
>   
ST_Boundary, as mentioned above.
> Pierre
>
>   
>> -----Original Message-----
>> From: postgis-devel-bounces at postgis.refractions.net [mailto:postgis-devel-
>> bounces at postgis.refractions.net] On Behalf Of Martin Davis
>> Sent: 19 février 2010 15:49
>> To: PostGIS Development Discussion
>> Subject: Re: [postgis-devel] [PostGIS] #413: ST_Single_Sided_Buffer added
>>
>> As I read it, the ArcGIS Buffer method is defined to return only
>> polygons.  This is a different situation than ST_OffsetCurve, which
>> returns lines.
>>
>> I think that having the ST_OffsetCurve name is good, to indicate that
>> the function returns linework.  That allows users to conceptualize the
>> simple rule that ST_Buffer always returns polygonal geometry.
>>
>> Pierre Racine wrote:
>>     
>>> In ArcGIS they pass one of the four following options:
>>>
>>> {FULL | LEFT | RIGHT | OUTSIDE_ONLY}
>>>
>>> http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=Buffer_%28Analysis%29
>>>
>>> Ex.:
>>>
>>> gp.buffer("roads.shp", "buffered_roads.shp", "Distance", "OUTSIDE_ONLY", "ROUND", "LIST",
>>>       
>> "Road_Type")
>>     
>>> The last two are of no interest for PostGIS. The ROUND is the same as ST_Buffer's endcap. Probably
>>>       
>> there should be a 4th option to ST_Buffer's buffer_style_parameters to indicate the surface occupied
>> by the buffer:
>>     
>>> 'lineside=full|left|right|outside'
>>>
>>> You probably want to be ablt to do "right|outside" or "left|outside" at the same time.
>>>
>>> Probably, to completely fulfill rafalmag's needs, it would be nice to add "none" as endcap, so we
>>>       
>> don't get any end cap at all.
>>     
>>> Pierre
>>>
>>>
>>>       
>>>> -----Original Message-----
>>>> From: postgis-devel-bounces at postgis.refractions.net [mailto:postgis-devel-
>>>> bounces at postgis.refractions.net] On Behalf Of strk
>>>> Sent: 19 février 2010 14:42
>>>> To: PostGIS Development Discussion
>>>> Subject: Re: [postgis-devel] [PostGIS] #413: ST_Single_Sided_Buffer added
>>>>
>>>> On Fri, Feb 19, 2010 at 01:52:03AM -0200, George Silva wrote:
>>>>
>>>>         
>>>>> I'm sorry to give my 2 cents, but in most softwares everything it's just
>>>>> called buffer, with different parameters.
>>>>>
>>>>>           
>>>> Could you please provide a full call example of a few of these softwares
>>>> to obtain what the ST_Single_Sided_Buffer would give ?
>>>> What it does is giving a linestring offsetted from the original
>>>> (no area returned).
>>>>
>>>> --strk;
>>>>
>>>>  ()   Free GIS & Flash consultant/developer
>>>>  /\   http://foo.keybit.net/~strk/services.html
>>>> _______________________________________________
>>>> postgis-devel mailing list
>>>> postgis-devel at postgis.refractions.net
>>>> http://postgis.refractions.net/mailman/listinfo/postgis-devel
>>>>
>>>>         
>>> _______________________________________________
>>> postgis-devel mailing list
>>> postgis-devel at postgis.refractions.net
>>> http://postgis.refractions.net/mailman/listinfo/postgis-devel
>>>
>>>
>>>       
>> --
>> Martin Davis
>> Senior Technical Architect
>> Refractions Research, Inc.
>> (250) 383-3022
>>
>> _______________________________________________
>> postgis-devel mailing list
>> postgis-devel at postgis.refractions.net
>> http://postgis.refractions.net/mailman/listinfo/postgis-devel
>>     
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel
>
>   

-- 
Martin Davis
Senior Technical Architect
Refractions Research, Inc.
(250) 383-3022




More information about the postgis-devel mailing list