-
Notifications
You must be signed in to change notification settings - Fork 1
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
Adding "name" as a class field makes the script fail #18
Comments
My guess is that this is related to the fact that "name" is an existing SVG attribute. However, it might be the something else in the OSM. Can you send me the osm file and I'll try messing with it? |
Here's the OSM file I'm using. Take note that I've also changed the buildings query, to only grab buildings that have a name, are a train station, or are a school. I did this for practical and aesthetic reasons: Too many buildings in the bounding box causes Overpass to run out of memory immediately and quit. I like the outcome that shows only "significant" buildings. Here's the current buildings query:
I don't have my CSS anymore, but I think it was:
Which, now that I look at it, seems wrong. Maybe the selector was |
I can't reproduce the error. Can I suggest trying it (a) with no css, (b) without the other_tags field (delete it in QGIS). For the CSS, here what the SVG file looks like for a file named <g class="alpha beta" id="foobar">
<path class="polygon foobar alpha_value1">
<polygon class="polygon foobar alpha_value2">
</g> This works just like CSS on the web with div and p tags. To address all of the shapes in #foobar .polygon { fill: green } |
Test A.1:
Result: Succeeds in creating the image. Test A.2:
Result: Fails to create the image, with this error:
Test B:
Result: Fails, with this error message:
Test C: Result: Fails, with the following error:
|
OK, then there's a bug in how Can you add your CSS file to the issue I just opened in the svgis repo? |
@fitnr I added my CSS to that issue. I'm using |
Hey @fitnr, I want to style buildings with names differently than those without names, but when I include "name" as a class field, the script fails.
My workaround in the meantime is to only query Overpass for buildings with names, but I want buildings with and without names so that I can style them differently.
Sidenote: Is there a way to create a CSS class that fits any non-blank value, or negative value, like I want "building!=yes", to excluded non-categorized buildings.
Error when using "name" as a class field
It doesn't happen for any other field name that I've tried, like "cycleway".
I see in the
svgis
README example that it's supposed to work fine with "name" as a field.The text was updated successfully, but these errors were encountered: