Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openstreetmap-carto #7

Open
pnorman opened this issue Sep 13, 2015 · 9 comments
Open

openstreetmap-carto #7

pnorman opened this issue Sep 13, 2015 · 9 comments

Comments

@pnorman
Copy link

@pnorman pnorman commented Sep 13, 2015

Please note that openstreetmap-carto relies on a few advanced Mapnik features that are not supported by Mapserver. Future versions of Magnacarto might work around these limitations.

What are these features? If there's reasonable ways to work without them, we could consider changing the style.

Are there any features that don't work with Mapnik?

@olt

This comment has been minimized.

Copy link
Member

@olt olt commented Sep 14, 2015

From the top of my head?

  • group-by layer property
  • Variable substitutions in file names, e.g. primary_[width]x[height].svg

The group-by could be moved into he SQL query and the complete filename could be constructed inside the SQL as well.

Mapnik 3 in general allows variable substitutions everywhere. This is not supported by Magnacarto nor Mapserver.

Are there any features that don't work with Mapnik?

Mapserver has support for move advanced (and datadriven) symbols. But they are currently not supported by Magnacarto anyway.

@pnorman

This comment has been minimized.

Copy link
Author

@pnorman pnorman commented Sep 14, 2015

  • Variable substitutions in file names, e.g. primary_[width]x[height].svg

the complete filename could be constructed inside the SQL

I've been thinking about this. If we get pictorial shields then it makes sense to do the filename substitution in SQL to avoid large numbers of style rules.

Of course, by then we might be using a groupsymbolizer for shields.

  • group-by layer property

The group-by could be moved into he SQL query

@math1985 knows the complex roads queries better than I do, but is this possible? Of course, every time I try to use group-by I have to relearn it. It's not something I use often enough.

@matthijsmelissen

This comment has been minimized.

Copy link

@matthijsmelissen matthijsmelissen commented Nov 28, 2015

Sorry for the late response, I only got to this now.

No, it's not possible to move group-by to the SQL query, neither in general nor in the particular roads example from openstreetmap-carto.

Mapnik sorts by 1. layer, 2. group-by, 3. attachment, and 4. order from the SQL result set. Moving the group-by to the SQL would result in sorting by 1. layer, 2. attachment, 3. group-by 4. rest of the order from the SQL result set.

In the concrete road example, we currently render first casing and fill for bridges on layer 1, then casing and fill for bridges on layer 2, then layer 3, etc. Moving the order-by to the SQL would result in first rendering the casing for all layers, followed by the fill for all layers, which is obviously wrong.

@StyXman

This comment has been minimized.

Copy link

@StyXman StyXman commented Jul 18, 2017

Mapnik 3 in general allows variable substitutions everywhere

In particular, as part of zoom filters:

[feature = 'amenity_atm'][zoom >= @useful] { ... }

Should I open a new issue for this?

@olt

This comment has been minimized.

Copy link
Member

@olt olt commented Jul 19, 2017

Mapnik 3 in general allows variable substitutions everywhere

In this context variables are values from an SQL query, etc.

In particular, as part of zoom filters:
[feature = 'amenity_atm'][zoom >= @useful] { ... }
Should I open a new issue for this?

And this is an actual variable from CartoCSS. So yes, please create a new issue.

@StyXman

This comment has been minimized.

Copy link

@StyXman StyXman commented Jul 19, 2017

Done #42.

@kocio-pl

This comment has been minimized.

Copy link

@kocio-pl kocio-pl commented Jun 24, 2018

Since CartoCSS is no longer developed after 1.0.0 release, it would be good to test if OSM Carto could make the switch to Magnacarto. What are possible obstacles? Could anybody test how it works with the current OSM Carto code (sounds non-trivial to me)?

@pnorman

This comment has been minimized.

Copy link
Author

@pnorman pnorman commented Jun 26, 2018

Given the major features missing (e.g. group-by) and lack of other deployments I wouldn't recommend using magnocarto over cartocss unless you had other compelling reasons like wanting to deploy to mapserver, particularly for a complex style like osm-carto.

@olt

This comment has been minimized.

Copy link
Member

@olt olt commented Jun 26, 2018

group-by is working, but there will be likely a few other obstacles. Right now, I wouldn't recommend it either as I don't have time to help out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.