[postgis-users] Buffering around 1/2 an object
Picavet Vincent
Vincent.Picavet at mediapost.fr
Wed Dec 10 06:46:13 PST 2008
Hi,
> I known this sound like a strange question, but is it
> possible to create a buffer around 1/2 of geomtry objectt.
>
> If I choose to buffer round a stright line, I get a geomtry
> that looks like a sausage, if I buffer round a point, I
> get a geomtry that looks like a circle.
>
> What I would like to do is buffer round only half an object,
> in the case of a point I would like to get a semi circle,
> buffer round a line, 1/2 a sausage!
>
> Is this possible, any suggestions ?
Buffer the whole object,
Take the bounding box of the generated buffer
Cut the latest in half
Your <1/2 buffer> is the geometric intersection beetween the generated
buffer and its 1/2 bounding box.
As for the way of cutting the bbox, it's up to you to define a way since
you did not detail which half you wanted.
There may be other better ways of doing it, but this one will do the
job.
As a first optimization, you could first buffer half the object instead
of the whole one (and stay consistent with your definition of half).
Good luck,
Vincent
>
> In the simultation that I am modeling, the data point/line
> describe a starting point and I need to ensure that its
> possible for traffic to leave the starting point on one side.
>
> Dave.
> --
> Any views expressed in this message are those of the
> individual sender, except where the sender specifically
> states them to be the views of the Pinan Software
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
More information about the postgis-users
mailing list