<div dir="ltr">Sorry, been on vacation... Anyway, presumably you're not using a database backend? If that's the case then I don't know that what you're trying to do is possible. The shape, when made available to the labeling code, has already been transformed (and I think clipped). I'm not sure why [map_cellsize] resolves to 0 though since the value is well known at that point in the processing. I don't recall who/when that support was added.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jul 9, 2020 at 3:21 PM Tamas Szekeres <<a href="mailto:szekerest@gmail.com">szekerest@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Devs,<div><br></div><div>I wanted to add label text to a layer to display the computed area value in the label. Tried using this expression:</div><div><br></div><div>TEXT (area([shape]))<br></div><div><br></div><div>but that calculates the area in pixel space which is useless for the purpose. I've also tried to utilize [map_cellsize] in the expression to convert the area to map units, but [map_cellsize] always returns 0 in this use case.</div><div><br></div><div>Can anyone explain how to use area in the text expression to get correct result?</div><div><br></div><div>Thanks,</div><div><br></div><div>Tamas</div><div><br></div></div>
_______________________________________________<br>
mapserver-dev mailing list<br>
<a href="mailto:mapserver-dev@lists.osgeo.org" target="_blank">mapserver-dev@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/mapserver-dev" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/mapserver-dev</a></blockquote></div>