<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:DontUseAdvancedTypographyReadingMail/>
<w:DontUseJustificationAdvancedTypographyReadingMail/>
<w:DontUseHyphenationAdvancedTypographyReadingMail/>
</w:WordDocument>
</xml><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Aptos;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:12.0pt;
font-family:"Aptos",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Aptos",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;
mso-ligatures:none;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt">Hmmm… I think this should be possible but I’m not sure exactly what would need to change. The expression parser code is not particularly straightforward. The map_cellsize token is generally recognized in the
parser – so not limited to GEOMTRANSFORM but it’s not clear how it gets its value.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> MapServer-dev <mapserver-dev-bounces@lists.osgeo.org>
<b>On Behalf Of </b>Tamas Szekeres via MapServer-dev<br>
<b>Sent:</b> Thursday, March 5, 2026 2:32 PM<br>
<b>To:</b> mapserver-dev@lists.osgeo.org<br>
<b>Subject:</b> [MapServer-dev] Rendering Openstreetmap data in Mapserver<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">Hi Devs, <o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I'm trying to create a vector based map for the openstreetmap data in Mapserver by utilizing the mapnik styles provided by the
<a href="https://github.com/openstreetmap-carto/openstreetmap-carto">openstreetmap-carto</a> project. So far, I could achieve a very good result and the map looks is very similar to the online OSM at all scales, however the only thing I cannot replicate is
the concept of the <b>[way_pixels]</b> attribute conditions, where the feature’s area in pixels at the current map scale should be the part of the class expressions. I don't see such an option in Mapserver as it stands now, but supporting the already existing
<b>[map_cellsize] </b>would be a very close solution I think, however that is only implemented for the GEOMTRANSFORM expressions actually.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">For example the mapnik style expression <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">[way_pixels] > 750 <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal">could be provided in a MapServer CLASS expression as somehing like:
<br>
<br>
[way_area] > 750 * [map_cellsize] * [map_cellsize]<br>
<br>
Would that be reasonable to implement <b>[map_cellsize]</b> in the CLASS expressions?
<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Best regards,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Tamas<o:p></o:p></p>
</div>
</div>
</div>
</div>
</body>
</html>