#4618 closed defect (wontfix)
ST_Buffer(geography) issue
Reported by: | olehz | Owned by: | pramsey |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS 3.0.1 |
Component: | postgis | Version: | 3.0.x |
Keywords: | ST_Buffer | Cc: |
Description
It seems that ST_Buffer(geography point, float radius_of_buffer) works incorrect. If you visualize the blue and red circles, you will see that they do not match. Blue is slightly smaller than red. The difference is about 90 km from the west and east side.
Is this a bug or am I not understanding something?
SELECT 'blue' AS color, ST_Buffer(c, dist, 90) AS geom FROM params UNION SELECT 'red' AS color, ST_MakePolygon(ST_MakeLine(points || points[1])) AS geom FROM ( SELECT ARRAY_AGG(p) points FROM params, generate_series(0, 359, 1) deg, Geometry(ST_Project(c, dist, RADIANS(deg))) p ) z
Attachments (1)
Change History (3)
by , 5 years ago
Attachment: | buffer.png added |
---|
comment:2 by , 5 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
ST_Buffer in geography is not a native function. It piggy backs on geometry ST_Buffer and in doing so chooses a best guess spatial reference system for the point before applying the buffer. That said for large buffers, its going to have more and more errors as your buffer size grows.
This is not a bug just an implementation limitation. As noted in the docs - http://postgis.net/docs/manual-3.0/ST_Buffer.html all assumptions full apart with large buffers.