-
Notifications
You must be signed in to change notification settings - Fork 527
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
Matching empty strings #2319
Comments
Try "[access = null]". The "[access != '']" is a hack for old Mapnik versions (before v2.2.0) which did not support filtering on nulls. Now that "[access != null]" and "[access = null]" work you should avoid "[access != '']". It is only there now as a back compatibility shim.
|
perfect, thank you ! :) |
Updating openstreetmap-carto (gravitystorm/openstreetmap-carto#517 for details) I tried to filter data by "[access = '']". openstreetmap-carto already contains filters for "[access != '']" and these work fine. I can't get "[access = '']" to work though. I have a postgis setup, with a node that I want to be rendered, it doesn't have an 'access' tag, which is what I thought the rule I am trying should match (as the value for the access column in the relevant database row is blank) - it doesn't render the node with this rule. It doesn't render it when I change to "[access != '']", but that is expected!
Am I taking the wrong approach to this filter, or trying to match an empty(/null) string incorrectly or is this a bug? How does this affect the OSM website (mapnik?) if it is a bug? NB, as mentioned on the linked pull request, doing a regex for a blank string seems to allow the node to render correctly, but I didn't have time to double check my regex was correct :)
The text was updated successfully, but these errors were encountered: