Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Empty file="" point_symbolizer attribute being passed to Mapnik #159

springmeyer opened this Issue · 11 comments

3 participants


Hoping for help from @tmcw and @ajashton on understanding if this is a bug.

This is a followup on mapbox/tilemill#1499.

The issue is that xml like:

<PointSymbolizer transform="scale(0.2);" allow-overlap="true" ignore-placement="true" file="" />

(Full XML is at

is being output for css like:

  point-allow-overlap: true;
  point-ignore-placement: true;
  [zoom < 13] {point-transform: "scale(0.1);"}
  [zoom > 12] {point-transform: "scale(0.2);"}

Full carto is at

My sense is that file="" is wrong - carto should not be setting this unless the user specifically types point-url(). Right?


ping @tmcw - can you provide any insight on this? I've not dug into the carto code yet on this, but it seems wrongly odd that file="" could be being created by carto.


This doesn't compile in my install; is this with a different mapnik-reference? I get a require point-file error upon trying to compile this.


yes, the behavior changed at some point as I see from looking back at mapbox/tilemill#1499. I can also confirm that we throw now, so this must be fixed. As per #167 I guess the solution is to remove the required in mapnik-reference (as long as people are okay with the default rendered point, which I think they will be).


I landed on this ticket while looking for problems with transform="scale(0.2);" in PointSymbolizers.
It looks like such construct is not valid as of Mapnik-2.2.0, but my carto (using mapnik-reference@5.0.7) doesn't complain about it. Is that normal ? My problem is ticketed here: CartoDB/Windshaft-cartodb#93


If you use old-style string expressions for transforms, they are not validated beyond being valid strings. New-style expression transforms like transform=scale(0.2); are validated.

@strk strk referenced this issue in CartoDB/Windshaft-cartodb

point-transform: scale not working #93


@tmcw is there any valid CartoCSS that would break by removing the quotes around the transform value ? In other words, what's the rationale for not always validating that way ?


Hm, it would be a weird parser trick to re-parse-as-expression in one specific case (where otherwise we never go back to the parsing stage from the ast), and suddenly changing validation standards would break backwards compatibility with some maps.


Can a string value ever be valid ? Or would removing the "transform" directive completely always yield the same result as keeping it as a string ?


Can a string value ever be valid

Do you mean invalid?

Or would removing the "transform" directive completely always yield the same result as keeping it as a string ?

What are you asking here?


I was really asking if using a string ever had any real effect, but figured out by myself: yes, it does.
Actually it turns out that some valid W3C syntaxes can only be specified as a string because the carto validator doesn't accept them (ie: "scale(6)", valid as the value 6 is taken for both X and Y while mapnik-reference has a strict requirement for 2 distinct values for X and Y).


So, to recap, my problem seems to be that "point-file" is either required or not depending on "strictness" of map loading in Mapnik. When parsing is "strict", mapnik will error out, when it isn't, it will just warn.

Do you think such "strict" flag should make it into "mapnik-reference" @springmeyer ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.