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:
http://www.around-the-world.co.uk/downloads/red_linestring_and_green_buffer_on_180_degrees.jpg

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


Subject
Views
Written By
Posted
buffer() function does not handle the anti-meridian
4552
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.