Skip to content

Commit

Permalink
Improved rendering of various areas.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahlzen committed Dec 11, 2011
1 parent e99bde3 commit 068b14e
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 0 deletions.
1 change: 1 addition & 0 deletions areas.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

ca = Box2d(-124.9, 32.3, -113.9, 42.1)
cadetail = Box2d(-123, 37, -119.0, 38.0)
sfo = Box2d(-122.6, 37.6, -122.2, 37.9)
oakland = Box2d(-122.34, 37.75, -122.12, 37.89)
yosdetail = Box2d(-119.67, 37.70, -119.52, 37.76)

Expand Down
Binary file added custom-symbols/hatch-red-10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added custom-symbols/hatch-red-13.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added custom-symbols/hatch-red-16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
53 changes: 53 additions & 0 deletions templates/features.xml.templ
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,46 @@
-->
</Style>

<Style name="misc-areas">

<!-- Military areas -->
<Rule>
&minz6; &maxz13;
<Filter>[landuse] = 'military'</Filter>
<PolygonPatternSymbolizer file="&customsymbolsdir;/hatch-red-10.png" />
<LineSymbolizer stroke="#f00" stroke-width="1" stroke-opacity="1.0" />
</Rule>
<Rule>
&minz14;
<Filter>[landuse] = 'military'</Filter>
<PolygonPatternSymbolizer file="&customsymbolsdir;/hatch-red-16.png" />
<LineSymbolizer stroke="#f00" stroke-width="1.5" stroke-opacity="1.0" />
</Rule>

<Rule>
&minz10;
<Filter>
[landuse] = 'cemetary' or
[amenity] = 'grave_yard'
</Filter>
<PolygonSymbolizer fill="#8b8" fill-opacity="&areaopacity;" />
<LineSymbolizer stroke="#8b8" stroke-width="1" />
</Rule>
<Rule>
&minz10;
<Filter>[landuse] = 'construction'</Filter>
<PolygonSymbolizer fill="#bb3" fill-opacity="&areaopacity;" />
<LineSymbolizer stroke="#bb3" stroke-width="1" />
</Rule>
<Rule>
&minz10;
<Filter>[natural] = 'beach'</Filter>
<PolygonSymbolizer fill="#fec" fill-opacity="&areaopacity;" />
<LineSymbolizer stroke="#fec" stroke-width="1" />
</Rule>

</Style>

<!-- adapted from OSM mapnik stylesheet -->
<Style name="ferry-routes">
<Rule>
Expand Down Expand Up @@ -286,6 +326,19 @@
</Datasource>
</Layer>

<Layer name="misc-areas" status="on">
<StyleName>misc-areas</StyleName>
<Datasource>
&dbsettings; &extents;
<Parameter name="table">
(SELECT way, way_area, name, landuse, "natural", amenity
FROM ${DB_PREFIX}_polygon
WHERE landuse IS NOT NULL OR "natural" IS NOT NULL or amenity IS NOT NULL)
AS areas
</Parameter>
</Datasource>
</Layer>

<Layer name="ferry-routes" status="on">
<StyleName>ferry-routes</StyleName>
<Datasource>
Expand Down

0 comments on commit 068b14e

Please sign in to comment.