MySQL Forums
Forum List  »  GIS

buffer() function does not handle the anti-meridian
Posted by: Mike McCutcheon
Date: August 07, 2010 10:59AM

I am using the buffer() function successfully in most of the world to define what I call the "scope" of a linestring, but if the linestring is too close to the anti-meridian, the function doesn't seem to work.

My php code is as follows:
mysql_query("UPDATE `table` SET scope = geomfromwkb(buffer(linestring, '$range'))");

You can see an example linestring and bad buffer in the following Google Earth screenshot:

As you can see, the buffer wrongly runs down the 180 degree longitude line.

My earlier post suggests that the distance() function does not handle the anti-meridian either.

If nobody explains that I am wrong, I will post this as an error to correct in the project documentation.

Options: ReplyQuote

Written By
buffer() function does not handle the anti-meridian
August 07, 2010 10:59AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.