I created a grid of rectangular polygons with the
Create Grid function, from the Vector Creation group of the Processing Toolbox in QGIS 3.4.2.
The rectangles measure half a degree of longitude by half a degree of latitude.
When I want to label the polygons, I write an expression that rounds the values of latitude and longitude attributes to 2 decimal places, since the attributes created in the grid brings many decimal places.
round function rounds the values badly.
I know that I can create new attributes that express the coordinates with fewer decimal places and label the entities based on those attributes, but I was struck by the behavior of the function. I expected it to round to the nearest value.
Does anyone know what the problem is that the
round function wrongly rounds off the decimal number?
Attached screenshots of Source Fields and the Attribute Table.