[mapserver-users] ANN: Magnacarto - convert CartoCSS to MapServer map files
Lime, Steve D (MNIT)
Steve.Lime at state.mn.us
Fri Jul 31 09:29:53 PDT 2015
Hey Oliver: Thanks! Any information is appreciated... Regarding your questions:
- multiple attributes in symbol names: That's possible if you're using a RSBMS backend since you can create the combined symbol name as a new attribute and then reference that. It's not possible for plain old shapefiles.
- style defaults: definitely something we could do better on. That said, INCLUDES can be used to do this now so you can do:
STYLE
INCLUDE 'default.style'
... override defaults...
END
LABEL
INCLUDE 'default.label'
... override defaults...
END
Not sure how realistic it would be for Magnacarto to write a main mapfile supported with default blocks stored externally.
Steve
-----Original Message-----
From: Oliver Tonnhofer [mailto:olt at omniscale.de]
Sent: Friday, July 31, 2015 6:34 AM
To: Lime, Steve D (MNIT) <Steve.Lime at state.mn.us>
Cc: mapserver-users at lists.osgeo.org
Subject: Re: [mapserver-users] ANN: Magnacarto - convert CartoCSS to MapServer map files
Hi Steve,
> On 30.07.2015, at 22:31, Lime, Steve D (MNIT) <Steve.Lime at state.mn.us> wrote:
>
> Oliver: Been thinking about this more. Since you guys have done probably the most exhaustive comparison of CartoCSS and map files, do you have a list of the features in CartoCSS that aren't supported by MapServer. That might provide some direction on gaps for us to fill.
I can try to compile a list with missing features. Might take a while till I get to it, though.
One feature I missed when I tried to build the official OpenStreetMap styling was multiple attributes in symbol names.
For example: secondary_[width]x[height].svg, where width and height are calculated in the SQL query, based on the length of ref-label.
Or does that work with Mapserver?
> The other item of interest is where you saw simple CartoCSS manifest itself as boatloads of mapfile configuration. There may be ways we could be more concise... Thanks.
Here is a monster mapfile (>100k lines) generated from https://github.com/mapbox/osm-bright
http://download.omniscale.de/misc/osm-bright.map
Magnacarto could combine some CLASSes with similar STYLE (search for '[type]' = “drain” which is identical to the ditch CLASS). That should cut a few thousand lines.
For MapSever:
Allowing to set style defaults for each layer could help. LINECAP/LINEJOIN are set for every line STYLE because CartoCSS/Mapnik are using other defaults then Mapserver.
Regards,
Oliver
--
Oliver Tonnhofer | Omniscale GmbH & Co KG | http://omniscale.com
OpenStreetMap WMS and tile services | http://maps.omniscale.com
More information about the MapServer-users
mailing list