1

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?

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

2 Answers 2

4

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?

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

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;
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.