[MapServer-dev] Rendering Openstreetmap data in Mapserver
Lime, Steve D (MNIT)
steve.lime at state.mn.us
Thu Mar 5 15:10:11 PST 2026
Yeah, I saw those sections. I didn't think we can just set p.dblval in the way the geomtransform code does - or maybe it is that simple - easy enough to test.
From: Tamas Szekeres <szekerest at gmail.com>
Sent: Thursday, March 5, 2026 5:00 PM
To: Lime, Steve D (MNIT) <steve.lime at state.mn.us>
Cc: mapserver-dev at lists.osgeo.org
Subject: Re: [MapServer-dev] Rendering Openstreetmap data in Mapserver
In my understanding, the actual value should be provided somewhere here:
https://github.com/MapServer/MapServer/blob/89d81cb8d0fcf5d44e043d53afe70f6e6a785756/src/maputil.c#L713
in a similar way as the geomtransform code:
https://github.com/MapServer/MapServer/blob/89d81cb8d0fcf5d44e043d53afe70f6e6a785756/src/mapgeomtransform.c#L283
Best regards,
Tamas
Lime, Steve D (MNIT) <steve.lime at state.mn.us<mailto:steve.lime at state.mn.us>> ezt írta (időpont: 2026. márc. 5., Cs, 23:17):
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<mailto: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<mailto: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/b5acdda9/attachment-0001.htm>
More information about the MapServer-dev
mailing list