Geometric functions seem to work in pixels rather then coordinates

Description

Context: having a polygon dataset, I wanted to show smaller polygons (<1m2) different
from the rest of the polygons (actually I want them to show these as an icon instead of a polygon).

I thought to use the 'area' function which according to
the function reference documentation would give:

"The area of the specified geometry. Works in a Cartesian plane, the
result will be in the same unit of measure as the geometry coordinates
(which also means the results won’t make any sense for geographic data)"

But what I observe here is that it returns the size in pixels, while
data is in meters. Having a style where polygons <10m2 should be rendered as points, ALL polygons will finally be rendered with the point -style when you zoom out enough..

Another test: when you create a label for the polygons containing the result of the 'area'-function you see the 'area' change with every zoom level change...

Though I can imagine that the area in pixels is helpfull too (like when you want to hide polygons which are smaller then a certain value), in my case I want to use the real (static) geometric area.

By the way I think all Geometric functions work on the rendering polygons rather then on the geometric polygons?

In the mailing list thread (https://sourceforge.net/p/geoserver/mailman/message/35522965/) Andrea already mentiones that calculating the area in the labeling phase will be more difficult then calculating it (just before) rendering the geo.

Thanks for looking into this.

Attached a sld rule with the used function (and an example to use it in a label, though that has been used solely for testing)

Environment

None

Assignee

Andrea Aime

Reporter

Richard Duivenvoorde

Triage

Fix versions

Affects versions

None

Priority

Medium
Configure