Permalink
Browse files

Admin boundaries, all bar the weird one.

  • Loading branch information...
1 parent d2bb4b4 commit 0c4c067a39f026b04c056a9b7f39fe5150da9285 @gravitystorm committed Nov 15, 2012
Showing with 76 additions and 65 deletions.
  1. +1 −1 addressing.mss
  2. +75 −64 admin.mss
View
@@ -30,4 +30,4 @@
text-size: 9;
}
}
-}
+}
View
@@ -1,74 +1,85 @@
+#admin-01234 {
+ [admin_level = '2'],
+ [admin_level = '3'] {
+ [zoom >= 4] {
+ line-color: purple;
+ line-width: 0.6;
+ line-opacity: 0.2;
+ }
+ [zoom >= 7] {
+ line-width: 2;
+ }
+ [zoom >= 10] {
+ line-opacity: 0.1;
+ [admin_level = '2'] {
+ line-width: 6;
+ }
+ [admin_level = '3'] {
+ line-width: 5;
+ line-dasharray: 4,2;
+ }
+ }
+ }
+ [admin_level = '4'] {
+ [zoom >= 4] {
+ line-color: purple;
+ line-width: 0.6;
+ line-dasharray: 4,3;
+ line-opacity: 0.2;
+ }
+ [zoom >= 7] {
+ line-width: 1;
+ }
+ [zoom >= 11] {
+ line-width: 3;
+ }
+ }
+}
+
+#admin-5678 {
+ [admin_level = '5'][zoom >= 11] {
+ line-color: purple;
+ line-width: 2;
+ line-dasharray: 6,3,2,3,2,3;
+ line-opacity: 0.3;
+ }
+ [admin_level = '6'][zoom >= 11] {
+ line-color: purple;
+ line-width: 2;
+ line-dasharray: 6,3,2,3;
+ line-opacity: 0.3;
+ }
+ [admin_level = '7'],
+ [admin_level = '8'] {
+ [zoom >= 12] {
+ line-color: purple;
+ line-width: 1.5;
+ line-dasharray: 5,2;
+ line-opacity: 0.3;
+ }
+ }
+}
+
+#admin-other {
+ [admin_level = '9'],
+ [admin_level = '10'] {
+ [zoom >= 13] {
+ line-color: purple;
+ line-width: 2;
+ line-dasharray: 2,3;
+ line-opacity: 0.3;
+ }
+ }
+}
+
/*
-<Style name="admin-01234">
- <Rule>
- <Filter>[admin_level]='2' or [admin_level]='3'</Filter>
- &maxscale_zoom4;
- &minscale_zoom6;
- <LineSymbolizer stroke="purple" stroke-width="0.6" stroke-opacity="0.2"/>
- </Rule>
- <Rule>
- <Filter>[admin_level]='2' or [admin_level]='3'</Filter>
- &maxscale_zoom7;
- &minscale_zoom9;
- <LineSymbolizer stroke="purple" stroke-width="2" stroke-opacity="0.2"/>
- </Rule>
- <Rule>
- <Filter>[admin_level]='2'</Filter>
- &maxscale_zoom10;
- <LineSymbolizer stroke="purple" stroke-width="6" stroke-opacity="0.1"/>
- </Rule>
- <Rule>
- <Filter>[admin_level]='3'</Filter>
- &maxscale_zoom10;
- <LineSymbolizer stroke="purple" stroke-width="5" stroke-dasharray="4,2" stroke-opacity="0.1"/>
- </Rule>
- <Rule>
- <Filter>[admin_level]='4'</Filter>
- &maxscale_zoom4;
- &minscale_zoom6;
- <LineSymbolizer stroke="purple" stroke-width="0.6" stroke-dasharray="4,3" stroke-opacity="0.2"/>
- </Rule>
- <Rule>
- <Filter>[admin_level]='4'</Filter>
- &maxscale_zoom7;
- &minscale_zoom10;
- <LineSymbolizer stroke="purple" stroke-width="1" stroke-dasharray="4,3" stroke-opacity="0.2"/>
- </Rule>
- <Rule>
- <Filter>[admin_level]='4'</Filter>
- &maxscale_zoom11;
- <LineSymbolizer stroke="purple" stroke-width="3" stroke-dasharray="4,3" stroke-opacity="0.2"/>
- </Rule>
-</Style>
-<Style name="admin-5678">
- <Rule>
- <Filter>[admin_level]='5'</Filter>
- &maxscale_zoom11;
- <LineSymbolizer stroke="purple" stroke-width="2" stroke-dasharray="6,3,2,3,2,3" stroke-opacity="0.3"/>
- </Rule>
- <Rule>
- <Filter>[admin_level]='6'</Filter>
- &maxscale_zoom11;
- <LineSymbolizer stroke="purple" stroke-width="2" stroke-dasharray="6,3,2,3" stroke-opacity="0.3"/>
- </Rule>
- <Rule>
- <Filter>[admin_level]='8' or [admin_level]='7'</Filter>
- &maxscale_zoom12;
- <LineSymbolizer stroke="purple" stroke-width="1.5" stroke-dasharray="5,2" stroke-opacity="0.3"/>
- </Rule>
-</Style>
+ * err, what does this do?
<Style name="admin-other">
- <Rule>
- <Filter>[admin_level]='10' or [admin_level]='9'</Filter>
- &maxscale_zoom13;
- <LineSymbolizer stroke="purple" stroke-width="2" stroke-dasharray="2,3" stroke-opacity="0.3"/>
- </Rule>
<Rule>
<Filter>not [admin_level] != ''</Filter>
@springmeyer
springmeyer Dec 30, 2012 Contributor

as you've likely seen there was an osm-dev discussion on this, now captured at #26.

I'll add that the not [admin_level] != '' is basically trying to find values that are false/null (I think). This can, as of Mapnik > 2.2, be simply written like <Filter>not [admin_level]</Filter> or <Filter>![admin_level]</Filter>, see: mapnik/mapnik#1665 and mapnik/mapnik#1642

&maxscale_zoom9;
&minscale_zoom11;
<LineSymbolizer stroke="purple" stroke-width="1" stroke-opacity="0.2"/>
</Rule>
</Style>
-
*/

0 comments on commit 0c4c067

Please sign in to comment.