New answers tagged area
To elaborate on the issue above. As AndreJ as suggested and show - this is probably a bug in qgis's current version. Yet it should be noted that the problem isn't the wrong area, but that on-the-fly transformation affects in anyway on area calculations. The purpose of on-the-fly transformation/projection is to align data from different sources and with ...
I can confirm that it seems to be a bug. Create a csv file with the following content: E N 600000 200000 700000 200000 700000 300000 600000 300000 Import it as delimited text with EPSG:21781, enable snapping and draw a polygon shapefile on the four points. Without OTF, the result of $area/1000000.0 is 10000 m² (which is obviously correct). Turning OTF ...
I WAS LOOKING TO CREATE LEGIT DONUTS, PERFECTLY ROUND BUFFERS. IF YOU USE THE MULTIRING BUFFER TOOL AND SELECT DISSOLVE ALL. YOU CAN THEN DELETE THE SMALLER OF THE 2 BUFFERS LEAVING A PERFECT DONUT.
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;
I have the same problem, some areas are calculated just way too big and I can't explain it. Changing it from Multiparts to single parts does not change anything, the areas stay exactly the same. Sometimes, also redrawing does not change anything. Does anyone have more ideas about what could be wrong?
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?
You are using the wrong function. You want to use ST_Count, http://postgis.net/docs/manual-2.1/RT_ST_Count.html not ST_ValueCount. ST_ValueCount looks at the pixel values and counts by pixel values (which is why you get 2 number -- field 1 is the pixel value and field 2 is the count)
It is so much easier than that. Open the attribute table, right click on the column you want (most likely some Shape_Area column) and select "Calculate." Using that prompt you can convert these calculated values into the ones you want.
Top 50 recent answers are included