# How to find the area of polygon in geodjango?

I need to calculate the area of the Building (which the coordinates represents). I used transform() to calculate the area, but the calculated area is not accurate. Please help me calculating the area using the lat/lon coordinates.

``````          Class Parcel(models.Model):
geom = models.MultiPolygonField(srid=3492)
street_nbr = models.CharField(max_length=80)

Class Primary(models.Model):
geom  = models.MultiPolygonField(srid=4326)

>>>parcel = Parcel.objects.filter(street_nbr__contains="2730", street_nam__contains="11TH AVE",city__contains="SACRA").values()
>>>parcel[0]['geom'].geojson

>>>build = Primary.objects.filter(goem__contained= parcel[0]['geom'].geojson).values()

>>>build[0]['geom'].geojson
'{"coordinates": [[[[-121.476756, 38.542154], [-121.47686, 38.542152], [-121.47686, 38.542136], [-121.476904, 38.542135], [-121.476904, 38.542132], [-121.476962, 38.542131], [-121.476966, 38.542295], [-121.476893, 38.542296], [-121.476892, 38.542278], [-121.476845, 38.542279], [-121.476845, 38.542281], [-121.476759, 38.542282], [-121.476756, 38.542154]]]], "type": "MultiPolygon"}'

>>>x = build[0]['geom']
>>>y = x.transform(3492,Clone=True)
>>>y.area
1636.8046
``````

Here i'm getting the area as 1636.8046, I was supposed to get 2,327 sqft . I'm not able to find what I am doing wrong.

If your coordinates are in lat/long, then the SRID should be 4326. So just change the transformation parameter in `x.transform`.
Try changing `y = x.transform(3492,Clone=True)` to `y = x.transform(4326,Clone=True)`