# Drawing a buffer from a POINT and a value for Acreage

We have a situation where we get a single lat/long point and a value for "acreage", and we need to draw a polygon circle that is roughly the size that the acreage value implies. What we have is a query that comes extremely close, but the total area is still off, for some reason.

``````create TEMP TABLE g (geom geometry, acres float);
insert into g VALUES (ST_SETSRID(ST_POINT(-74,34.00), 4326), 100);
insert into g VALUES (ST_SETSRID(ST_POINT(-74,34.00), 4326), 10000);
insert into g VALUES (ST_SETSRID(ST_POINT(-74,34.00), 4326), 100000);
create temp table gg  AS select
ST_TRANSFORM(
ST_BUFFER(
-- Build a buffer, calculating radius as sqrt(area/pi)
geom::geography,
SQRT(
(acres/.00024711)/3.1415
)
)::geometry
, 4326)::geography as b,
acres,
acres/.00024711 as area_in_meters
FROM g;

SELECT
b,
st_area(b, TRUE), -- This and area_in_meters are not _quite_ equal
acres,
area_in_meters
FROM gg;
``````

I believe its one of a few factors, but I am having a hard time deriving the right test.

`acres/.00024711 as area_in_meters` - is this an accurate way of converting acres to sq meters?

`ST_TRANSFORM(buffer_geom, 4326)` Will this always yield an accurate geometry for the buffer we want? are we loosing data jumping around between geography and geometry?

`st_area(b, TRUE)` b is a geography, so this is in meters right? its what the docs say, but perhaps `::geography as b` isn't fully performing the cast I think it is?

• The conclusion btw. is that, as long as geometries are described with vertex meshes, and vizualized via rasterization of these meshes, technically you cannot have circular entities. Mathematically however, you can happily assume a circle to have the exact area resulting by defining a radius around a point. Thus, if you need a value to present, don't rely on vector entities and their limits inherited from digital representation, use `PI*r*r` (or the more complex speroidal surface sector area calculation) instead. Jan 30, 2021 at 10:27

The polygon generated by using `ST_Buffer` on a point is only an approximation to a circle. By default it is a 32-sided regular polygon. The number of sides can be increased by specifying the number of segments in a quarter-circle as the third parameter. But it will still have an area which is slightly less than a circle of the same diameter.