I get different results when measuring a object in QGIS and/or Postgis!
To have something exact I did this:
In QGIS:
- create a point shp-layer (epsg 25832)
- add a point
- created a buffer around it with 100 m
- made a polygon from layer extents
So I should have a square with 200 m x 200 m right and 40000 qm? And that is what is shown in the attribute table which is created automatically by the "Polygon from layer extent"-Function!
But: When I create a new column and measure the area with $area in QGIS the result is: 39892.72715?
When I import the layer to a postgis (keeping the epsg) table and measure the area with ST_area the result is: 40000.0000000116?
The difference between QGIS and postgis becomes much larger when polygons are involved!
Do I miss something?
Well I/You can reproduce the the result by doing this:
Create a .csv file (called it Point.csv) with this content:
nr,x,y
1,437850,5795350
Add this .csv to a new QGIS project (Set to EPSG:25832) as new Layer with "Add Delimited Text Layer ..." again with EPSG:25832. Now there is point layer called Point.
Now I use Vector > Geoprocessing Tools > Buffer(s) ... with this settings:
Input Vector layer: Point
Segments to approximate: 25
Buffer distance: 50
Output shapefile: BufferPoint.shp
Next I create the square: Vector > Research Tools > Polygon from Layer Extent... with this settings:
Input: BufferPoint
Output: SquarePoint
When I now look into the attribute table (the columns and values are created automaticly) everything looks fine:
MINX MINY MAXX MAXY CNTX CNTY AREA PERIM
437800.0 5795300.0 437900.0 5795400.0 437850.0 5795350.0 10000.0 400.0
HEIGHT WIDTH
100.0 100.0
But when I create new columns within this attribute table with the field calculator ($area and $perimeter) (both "real", length 15, precision 5) I get this values:
area1 border1
9973.36847 400.14108
And this is what makes me confused?
PS: the Values I get in PostGis (ST_Area, ST_Perimeter) also differ from the expected and right values!