# Find the area of points in PostGIS?

I have points that form a line. I would like to assign a radius to each point to give them volume, e.g. 50m and then find the area of the combined points. Does anyone know of a way to do this in PostGIS?

• You mean without counting the area that overlaps multiple times? – Jakub Kania Apr 8 '15 at 13:09
• Please edit the extra info you provided in the comments. – Martin F Apr 10 '15 at 5:24

I guess you mean the area of the combined 50m buffers?

If so, then like this:

``````SELECT SUM(ST_Area(ST_Buffer(geom, 50))) FROM points;
``````

This assumes that the points are projected in a CRS with meters as units. And I'm not sure I understand what you mean by "points that form a line". Is the PostGIS table a point feature or line feature?

• The points are coordinates from a person walking across a field. So they are points but represent the path that the person walked. – Ellis Valentiner Apr 7 '15 at 19:39
• Then the above should work, provided the coordinate reference system uses a meter units, NOT longitude/latitude – Micha Apr 7 '15 at 19:41
• The area of buffer of every point will be the same so there's no need to call those functions for every point. – Jakub Kania Apr 8 '15 at 13:08
• Unless some points are closer than 50 meters and the circles overlap... – Micha Apr 8 '15 at 15:28
• @Micha In which case the result will be the same as the query doesn't aggregate the buffers. – Jakub Kania Apr 9 '15 at 16:54

If the area of the buffers should be combined (as not to count the same area several times) then this query should be used:

``````SELECT ST_Area(ST_Union(ST_Buffer(geom, 50))) FROM points;
``````