[MapServer-dev] Rendering Openstreetmap data in Mapserver
Lime, Steve D (MNIT)
steve.lime at state.mn.us
Thu Mar 5 14:17:45 PST 2026
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.
From: MapServer-dev <mapserver-dev-bounces at lists.osgeo.org> On Behalf Of Tamas Szekeres via MapServer-dev
Sent: Thursday, March 5, 2026 2:32 PM
To: mapserver-dev at lists.osgeo.org
Subject: [MapServer-dev] Rendering Openstreetmap data in Mapserver
Hi Devs,
I'm trying to create a vector based map for the openstreetmap data in Mapserver by utilizing the mapnik styles provided by the openstreetmap-carto<https://github.com/openstreetmap-carto/openstreetmap-carto> 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 [way_pixels] 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 [map_cellsize] would be a very close solution I think, however that is only implemented for the GEOMTRANSFORM expressions actually.
For example the mapnik style expression
[way_pixels] > 750
could be provided in a MapServer CLASS expression as somehing like:
[way_area] > 750 * [map_cellsize] * [map_cellsize]
Would that be reasonable to implement [map_cellsize] in the CLASS expressions?
Best regards,
Tamas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20260305/79f245c6/attachment-0001.htm>
More information about the MapServer-dev
mailing list