improve rendering

git-svn-id: https://osmand.googlecode.com/svn/trunk@498 e29c36b1-1cfa-d876-8d93-3434fc2bb7b8
This commit is contained in:
Victor Shcherb 2010-09-13 18:39:20 +00:00
parent bb65b7222f
commit 4d147ca9cb
21 changed files with 7887 additions and 534 deletions

View file

@ -35,6 +35,7 @@ public class ToDoConstants {
//+ 15. Draw layers -> icons -> text. See intersects of double streets.
// 16. Internet access bits
// 17. Implement multipolygons to polygons
// TODO colors for road trunk and motorway
// 12. Fix : find proper location for streets ! centralize them (when create index)?

View file

@ -128,10 +128,12 @@ public class IndexCreator {
private File mapFile;
private Connection mapConnection;
private PreparedStatement mapWaysStat;
private PreparedStatement mapWayLocsStat;
private PreparedStatement mapWayLocsStatLevel2;
private PreparedStatement mapWayLocsStatLevel3;
private PreparedStatement mapObjStat;
private PreparedStatement mapLocsStatLevel0;
private PreparedStatement mapLocsStatLevel1;
private PreparedStatement mapLocsStatLevel2;
private Map<Long, List<Way>> lowLevelWaysSt = new LinkedHashMap<Long, List<Way>>();
private Map<Long, List<Way>> lowLevelWaysEnd = new LinkedHashMap<Long, List<Way>>();
// choose what to use ?
private boolean loadInMemory = true;
@ -936,73 +938,11 @@ public class IndexCreator {
if(indexMap && (e instanceof Way) || (e instanceof Node)){
// manipulate what kind of way to load
loadEntityData(e, true);
int type = MapRenderingTypes.encodeEntityWithType(e, 0);
int type1 = MapRenderingTypes.encodeEntityWithType(e, 1);
int type2 = MapRenderingTypes.encodeEntityWithType(e, 2);
boolean inverse = "-1".equals(e.getTag(OSMTagKey.ONEWAY));
boolean point = (type & MapRenderingTypes.TYPE_MASK) == MapRenderingTypes.POINT_TYPE;
long id = e.getId() << 3;
if(type != 0){
if(e instanceof Way){
id |= 1;
}
DataIndexWriter.insertMapRenderObjectIndex(pStatements, mapWaysStat, mapWayLocsStat, e,
MapRenderingTypes.getEntityName(e), id,type, inverse, point, BATCH_SIZE);
}
if(type1 != 0){
id |= 2;
boolean skip = false;
if(e instanceof Way){
id |= 1;
List<Node> nodes = ((Way) e).getNodes();
Way way = new Way(id);
int prevX = 0;
int prevY = 0;
for (int i = 0; i < nodes.size() - 1; i++) {
int r = i < nodes.size() - 1 ? 4 : 1;
int x = (int) (MapUtils.getTileNumberX(14, nodes.get(i).getLongitude()) * 256d);
int y = (int) (MapUtils.getTileNumberY(14, nodes.get(i).getLatitude()) * 256d);
if (Math.abs(x - prevX) > r || Math.abs(y - prevY) > r) {
way.addNode(nodes.get(i));
prevX = x;
prevY = y;
}
}
e = way;
skip = way.getNodes().size() < 2;
}
if(!skip){
DataIndexWriter.insertMapRenderObjectIndex(pStatements, mapWaysStat, mapWayLocsStatLevel2, e,
MapRenderingTypes.getEntityName(e), id, type, inverse, point, BATCH_SIZE);
}
}
if(type2 != 0){
id |= 4;
boolean skip = false;
if(e instanceof Way){
id |= 1;
List<Node> nodes = ((Way) e).getNodes();
Way way = new Way(id);
int prevX = 0;
int prevY = 0;
for (int i = 0; i < nodes.size() - 1; i++) {
int r = i < nodes.size() - 1 ? 4 : 1;
int x = (int) (MapUtils.getTileNumberX(9, nodes.get(i).getLongitude()) * 256d);
int y = (int) (MapUtils.getTileNumberY(9, nodes.get(i).getLatitude()) * 256d);
if (Math.abs(x - prevX) > r || Math.abs(y - prevY) > r) {
way.addNode(nodes.get(i));
prevX = x;
prevY = y;
}
}
e = way;
skip = way.getNodes().size() < 2;
}
if(!skip){
DataIndexWriter.insertMapRenderObjectIndex(pStatements, mapWaysStat, mapWayLocsStatLevel3, e,
MapRenderingTypes.getEntityName(e), id, type, inverse, point, BATCH_SIZE);
}
}
writeEntityToMapDatabase(e, e.getId(), inverse, 0);
indexLowLevelMap(e, 1);
indexLowLevelMap(e, 2);
}
if (indexAddress) {
@ -1091,6 +1031,174 @@ public class IndexCreator {
}
private <T, R> void putIntoMap(Map<T, List<R>> map, T key, R value){
if(!map.containsKey(key)){
map.put(key, new ArrayList<R>());
}
map.get(key).add(value);
}
private <T, R> void removeValueMap(Map<T, List<R>> map, T key, R value){
boolean remove = map.get(key).remove(value);
if(!remove){
throw new IllegalStateException();
}
if(map.get(key).isEmpty()){
map.remove(key);
}
}
private void indexLowLevelMap(Entity e, int level) throws SQLException{
int type = MapRenderingTypes.encodeEntityWithType(e, level);
if(type == 0){
return;
}
boolean writeIntoDB = true;
boolean ring = true;
if((type & MapRenderingTypes.TYPE_MASK) == MapRenderingTypes.POLYLINE_TYPE && e instanceof Way && level > 0){
List<Node> nodes = ((Way) e).getNodes();
Node n = nodes.get(0);
Node l = nodes.get(nodes.size() - 1);
// ring
ring = l.getId() == n.getId();
if (!ring) {
writeIntoDB = false;
Way start = null;
if (lowLevelWaysEnd.containsKey(n.getId())) {
for (Way w : lowLevelWaysEnd.get(n.getId())) {
int t = MapRenderingTypes.encodeEntityWithType(w, level);
if (t == type && Algoritms.objectEquals(MapRenderingTypes.getEntityName(w),
MapRenderingTypes.getEntityName(e))) {
start = w;
break;
}
}
}
if (start != null) {
ring = start.getNodeIds().get(0) == l.getId();
if(ring){
removeValueMap(lowLevelWaysEnd, n.getId(), start);
removeValueMap(lowLevelWaysSt, l.getId(), start);
} else {
// add nodes to start
for (int i = 1; i < nodes.size(); i++) {
start.addNode(nodes.get(i));
}
removeValueMap(lowLevelWaysEnd, n.getId(), start);
putIntoMap(lowLevelWaysEnd, l.getId(), start);
}
} else {
long tempId = (e.getId() << 2) | level;
start = new Way(tempId);
for(String t : e.getTagKeySet()){
start.putTag(t, e.getTag(t));
}
// add nodes to start
for (int i = 0; i < nodes.size(); i++) {
start.addNode(nodes.get(i));
}
putIntoMap(lowLevelWaysSt, n.getId(), start);
putIntoMap(lowLevelWaysEnd, l.getId(), start);
}
if (!ring) {
Way end = null;
if (lowLevelWaysSt.containsKey(l.getId())) {
for (Way w : lowLevelWaysSt.get(l.getId())) {
int t = MapRenderingTypes.encodeEntityWithType(w, level);
if (t == type && Algoritms.objectEquals(MapRenderingTypes.getEntityName(w),
MapRenderingTypes.getEntityName(e))) {
end = w;
break;
}
}
}
if (end != null) {
Long ll = end.getNodeIds().get(end.getNodeIds().size() - 1);
// remove end line
removeValueMap(lowLevelWaysSt, l.getId(), end);
removeValueMap(lowLevelWaysEnd, ll, end);
ring = ll == n.getId();
if (!ring) {
// add nodes to start
for (int i = 1; i < end.getNodes().size(); i++) {
start.addNode(end.getNodes().get(i));
}
// remove end start
removeValueMap(lowLevelWaysEnd, l.getId(), start);
putIntoMap(lowLevelWaysEnd, ll, start);
}
}
}
}
}
if(writeIntoDB || ring){
writeEntityToMapDatabase(e, e.getId(), false, level);
}
}
private void writeEntityToMapDatabase(Entity e, long baseId, boolean inverse, int level) throws SQLException {
int type = MapRenderingTypes.encodeEntityWithType(e, level);
if(type == 0){
return;
}
boolean point = (type & MapRenderingTypes.TYPE_MASK) == MapRenderingTypes.POINT_TYPE;
PreparedStatement mapLocations;
int zoom;
long id = baseId << 3;
if (level == 1) {
id |= 2;
mapLocations = mapLocsStatLevel1;
zoom = 14;
} else if (level == 2) {
id |= 4;
zoom = 9;
mapLocations = mapLocsStatLevel2;
} else {
zoom = 18;
mapLocations = mapLocsStatLevel0;
}
boolean skip = false;
if (e instanceof Way) {
id |= 1;
// simplify route
if (level > 0) {
List<Node> nodes = ((Way) e).getNodes();
Way way = new Way(id);
int prevX = 0;
int prevY = 0;
for (int i = 0; i < nodes.size(); i++) {
int r = i < nodes.size() - 1 ? 4 : 0;
int x = (int) (MapUtils.getTileNumberX(zoom, nodes.get(i).getLongitude()) * 256d);
int y = (int) (MapUtils.getTileNumberY(zoom, nodes.get(i).getLatitude()) * 256d);
if (Math.abs(x - prevX) > r || Math.abs(y - prevY) > r) {
way.addNode(nodes.get(i));
prevX = x;
prevY = y;
}
}
e = way;
skip = way.getNodes().size() < 2;
}
}
if (!skip) {
DataIndexWriter.insertMapRenderObjectIndex(pStatements, mapObjStat, mapLocations, e,
MapRenderingTypes.getEntityName(e), id, type, false, point, BATCH_SIZE);
}
}
private void convertEnglishName(MapObject o){
String name = o.getName();
@ -1201,14 +1309,14 @@ public class IndexCreator {
mapConnection = DriverManager.getConnection("jdbc:sqlite:" + mapFile.getAbsolutePath());
DataIndexWriter.createMapIndexStructure(mapConnection);
mapWaysStat = DataIndexWriter.createStatementMapWaysInsert(mapConnection);
mapWayLocsStat = DataIndexWriter.createStatementMapWaysLocationsInsert(mapConnection);
mapWayLocsStatLevel2 = DataIndexWriter.createStatementMapWaysLocationsInsertLevel2(mapConnection);
mapWayLocsStatLevel3 = DataIndexWriter.createStatementMapWaysLocationsInsertLevel3(mapConnection);
pStatements.put(mapWaysStat, 0);
pStatements.put(mapWayLocsStat, 0);
pStatements.put(mapWayLocsStatLevel2, 0);
pStatements.put(mapWayLocsStatLevel3, 0);
mapObjStat = DataIndexWriter.createStatementMapWaysInsert(mapConnection);
mapLocsStatLevel0 = DataIndexWriter.createStatementMapWaysLocationsInsert(mapConnection);
mapLocsStatLevel1 = DataIndexWriter.createStatementMapWaysLocationsInsertLevel2(mapConnection);
mapLocsStatLevel2 = DataIndexWriter.createStatementMapWaysLocationsInsertLevel3(mapConnection);
pStatements.put(mapObjStat, 0);
pStatements.put(mapLocsStatLevel0, 0);
pStatements.put(mapLocsStatLevel1, 0);
pStatements.put(mapLocsStatLevel2, 0);
mapConnection.setAutoCommit(false);
}
@ -1334,14 +1442,13 @@ public class IndexCreator {
// 4. update all postal codes from relations
if(indexAddress && !postalCodeRelations.isEmpty()){
progress.startTask("Registering postcodes...", -1);
if(pStatements.get(addressBuildingStat) > 0){
addressBuildingStat.executeBatch();
pStatements.put(addressBuildingStat, 0);
addressConnection.commit();
}
progress.startTask("Registering postcodes...", -1);
PreparedStatement pstat = addressConnection.prepareStatement("UPDATE " + IndexBuildingTable.getTable() +
" SET " + IndexBuildingTable.POSTCODE.name() + " = ? WHERE " + IndexBuildingTable.ID.name() + " = ?");
pStatements.put(pstat, 0);
@ -1354,6 +1461,17 @@ public class IndexCreator {
}
}
}
// 5. writing low level maps
if(indexMap){
// TODO level !!!
for(Long l : lowLevelWaysSt.keySet()){
for(Way w : lowLevelWaysSt.get(l)){
int level = (int) (w.getId() & 3);
writeEntityToMapDatabase(w, w.getId() >> 2, false, level);
}
}
}
try {
@ -1431,8 +1549,8 @@ public class IndexCreator {
IndexCreator creator = new IndexCreator(new File("e:/Information/OSM maps/osmand/"));
creator.setIndexMap(true);
creator.setNodesDBFile(new File("e:/Information/OSM maps/osmand/minsk.tmp.odb"));
creator.generateIndexes(new File("e:/Information/OSM maps/belarus osm/minsk.osm"), new ConsoleProgressImplementation(3), null);
// creator.setNodesDBFile(new File("e:/Information/OSM maps/osmand/minsk.tmp.odb"));
// creator.generateIndexes(new File("e:/Information/OSM maps/belarus osm/minsk.osm"), new ConsoleProgressImplementation(3), null);
// creator.setNodesDBFile(new File("e:/Information/OSM maps/osmand/belarus_nodes.tmp.odb"));
// creator.generateIndexes(new File("e:/Information/OSM maps/belarus osm/belarus_2010_09_03.osm.bz2"), new ConsoleProgressImplementation(3), null);

View file

@ -17,7 +17,6 @@ import net.osmand.osm.OSMSettings.OSMTagKey;
*/
public class MapRenderingTypes {
// TODO !!! think about layers of objects, include layer bits into standard schema (2 bits)?
// TODO !!! add others facilities to all types
// TODO Internet access bits for point
// TODO Find TextSymbolizer rules and write text for points and others
@ -52,10 +51,10 @@ public class MapRenderingTypes {
public final static int MASK_10 = (1 << 10) - 1;
public final static int HIGHWAY = 1; //TODO R
public final static int HIGHWAY = 1; //TODO REVIEW
public final static int BARRIER = 2;
public final static int WATERWAY = 3; //TODO R layer-water_features.xml.inc, layer-water.xml.inc
public final static int RAILWAY = 4;//TODO R
public final static int WATERWAY = 3;
public final static int RAILWAY = 4;//TODO REVIEW
public final static int AEROWAY = 5; //TODO R
public final static int AERIALWAY = 6;
public final static int POWER = 7;
@ -67,7 +66,7 @@ public class MapRenderingTypes {
public final static int TOURISM = 13;
public final static int HISTORIC = 14;
public final static int LANDUSE = 15;
public final static int MILITARY = 16; //TODO R
public final static int MILITARY = 16;
public final static int NATURAL = 17;//TODO R
public final static int AMENITY_SUSTENANCE = 18;
public final static int AMENITY_EDUCATION = 19;
@ -76,7 +75,7 @@ public class MapRenderingTypes {
public final static int AMENITY_HEALTHCARE = 22;
public final static int AMENITY_ENTERTAINMENT = 23;
public final static int AMENITY_OTHER = 24;
public final static int ADMINISTRATIVE = 25;//TODO R
public final static int ADMINISTRATIVE = 25;
public final static int ROUTE = 26; //NOT DONE YET
public final static int SPORT = 27; //+no icons
@ -331,6 +330,10 @@ public class MapRenderingTypes {
int attr = getHighwayAttributes(e);
attr <<= 13;
type |= attr;
} else if(!polygon && !point){
int attr = getLayerAttributes(e, 0);
attr <<= 13;
type |= attr;
}
return type;
}
@ -388,7 +391,12 @@ public class MapRenderingTypes {
if(one != null){
attr |= 1;
}
attr = getLayerAttributes(e, attr);
return attr;
}
private static int getLayerAttributes(Entity e, int attr){
// layer
attr <<= 2;
String l = e.getTag(OSMTagKey.LAYER);
@ -401,9 +409,14 @@ public class MapRenderingTypes {
}
} else if(e.getTag(OSMTagKey.BRIDGE) != null){
attr |= 2;
} else if(e.getTag(OSMTagKey.TUNNEL) != null){
attr |= 1;
}
return attr;
}
return attr;
public static boolean isLayerUnder(int attr){
return (attr & 3) == 1;
}
public static String getEntityName(Entity e){
@ -565,8 +578,9 @@ public class MapRenderingTypes {
// 3. waterway
register(1, "waterway", "stream", WATERWAY, 1, POLYLINE_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(2, "waterway", "river", WATERWAY, 2, POLYLINE_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(2, "waterway", "riverbank", WATERWAY, 3, POLYGON_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
// Questionable index river & canals for level=2 (depends on target)
register(2, "waterway", "river", WATERWAY, 2, POLYLINE_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(1, "waterway", "canal", WATERWAY, 4, POLYLINE_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("waterway", "ditch", WATERWAY, 5, POLYLINE_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("waterway", "drain", WATERWAY, 6, POLYLINE_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
@ -575,10 +589,11 @@ public class MapRenderingTypes {
register("waterway", "turning_point", WATERWAY, 9, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("waterway", "boatyard", WATERWAY, 10, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("waterway", "weir", WATERWAY, 11, POLYLINE_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("waterway", "dam", WATERWAY, 12, POLYLINE_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(1, "waterway", "dam", WATERWAY, 12, POLYLINE_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(1, "waterway", "mill_pond", WATERWAY, 13, POLYGON_WITH_CENTER_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
// 4. railway
register(1, "railway", "rail", RAILWAY, 1, POLYLINE_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(2, "railway", "rail", RAILWAY, 1, POLYLINE_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(1, "railway", "tram", RAILWAY, 2, POLYLINE_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("railway", "light_rail", RAILWAY, 3, POLYLINE_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("railway", "abandoned", RAILWAY, 4, POLYLINE_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
@ -608,7 +623,7 @@ public class MapRenderingTypes {
register(1, "aeroway", "helipad", AEROWAY, 3, POLYGON_WITH_CENTER_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("aeroway", "runway", AEROWAY, 7, POLYLINE_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("aeroway", "taxiway", AEROWAY, 8, POLYLINE_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("aeroway", "apron", AEROWAY, 9, POLYLINE_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(1, "aeroway", "apron", AEROWAY, 9, POLYLINE_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(1, "aeroway", "airport", AEROWAY, 10, POLYGON_WITH_CENTER_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("aeroway", "gate", AEROWAY, 12, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("aeroway", "windsock", AEROWAY, 13, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
@ -630,8 +645,8 @@ public class MapRenderingTypes {
register("power", "pole", POWER, 2, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(1, "power", "line", POWER, 3, POLYLINE_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("power", "minor_line", POWER, 4, POLYLINE_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("power", "station", POWER, 5, POINT_TYPE, POLYGON_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("power", "sub_station", POWER, 6, POINT_TYPE, POLYGON_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(1, "power", "station", POWER, 5, POINT_TYPE, POLYGON_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(1, "power", "sub_station", POWER, 6, POINT_TYPE, POLYGON_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("power", "generator", POWER, 7, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("power", "cable_distribution_cabinet", POWER, 8, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
@ -641,13 +656,14 @@ public class MapRenderingTypes {
register("building", null, MAN_MADE, SUBTYPE_BUILDING, POLYGON_TYPE); //$NON-NLS-1$
register("man_made", "wastewater_plant", MAN_MADE, 2, POINT_TYPE, POLYGON_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
registerAsBuilding("man_made", "water_works", MAN_MADE, 3); //$NON-NLS-1$ //$NON-NLS-2$
registerAsBuilding("man_made", "works", MAN_MADE, 4); //$NON-NLS-1$ //$NON-NLS-2$
register("man_made", "works", MAN_MADE, 4, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("building", "garages", MAN_MADE, SUBTYPE_GARAGES, POLYGON_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("man_made", "cutline", MAN_MADE, 7, POLYLINE_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("man_made", "groyne", MAN_MADE, 8, POLYLINE_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("man_made", "pier", MAN_MADE, 9, POLYLINE_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(1, "man_made", "groyne", MAN_MADE, 8, POLYLINE_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(1, "man_made", "breakwater", MAN_MADE, 8, POLYLINE_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(1, "man_made", "pier", MAN_MADE, 9, POLYLINE_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("man_made", "pipeline", MAN_MADE, 10, POLYLINE_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("man_made", "reservoir_covered", MAN_MADE, 11, POLYGON_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
@ -670,17 +686,18 @@ public class MapRenderingTypes {
register("leisure", "sports_centre", LEISURE, 2, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("leisure", "golf_course", LEISURE, 3, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("leisure", "stadium", LEISURE, 4, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
registerRules(0, "leisure", "track", LEISURE, 5, POINT_TYPE, POLYLINE_TYPE, POLYGON_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
registerRules(1, "leisure", "track", LEISURE, 5, POINT_TYPE, POLYLINE_TYPE, POLYGON_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("leisure", "pitch", LEISURE, 6, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("leisure", "water_park", LEISURE, 7, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("leisure", "marina", LEISURE, 8, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(1, "leisure", "marina", LEISURE, 8, POLYLINE_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("leisure", "slipway", LEISURE, 9, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("leisure", "fishing", LEISURE, 10, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(2, "leisure", "nature_reserve", LEISURE, 11, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("leisure", "park", LEISURE, 12, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(1, "leisure", "park", LEISURE, 12, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(1, "leisure", "recreation_ground", LEISURE, 12, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("leisure", "playground", LEISURE, 13, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("leisure", "garden", LEISURE, 14, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("leisure", "common", LEISURE, 15, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(1, "leisure", "garden", LEISURE, 14, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(1, "leisure", "common", LEISURE, 15, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("leisure", "ice_rink", LEISURE, 16, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("leisure", "miniature_golf", LEISURE, 17, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("leisure", "dance", LEISURE, 18, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
@ -791,7 +808,7 @@ public class MapRenderingTypes {
register("tourism", "camp_site", TOURISM, 4, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("tourism", "caravan_site", TOURISM, 5, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("tourism", "picnic_site", TOURISM, 6, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("tourism", "theme_park", TOURISM, 7, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(1, "tourism", "theme_park", TOURISM, 7, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("tourism", "zoo", TOURISM, 8, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
registerAsBuilding("tourism", "alpine_hut", TOURISM, 9); //$NON-NLS-1$ //$NON-NLS-2$
@ -822,68 +839,75 @@ public class MapRenderingTypes {
register("historic", null, HISTORIC, 12, POINT_TYPE); //$NON-NLS-1$
// 15. landuse
register("landuse", "allotments", LANDUSE, 1, POLYGON_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("landuse", "basin", LANDUSE, 2, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("landuse", "brownfield", LANDUSE, 3, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("landuse", "cemetery", LANDUSE, 4, POLYGON_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(1, "landuse", "allotments", LANDUSE, 1, POLYGON_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(1, "landuse", "basin", LANDUSE, 2, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(1, "landuse", "brownfield", LANDUSE, 3, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(1, "landuse", "cemetery", LANDUSE, 4, POLYGON_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("landuse", "grave_yard", LANDUSE, 4, POLYGON_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(1, "landuse", "commercial", LANDUSE, 5, POLYGON_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(1, "landuse", "construction", LANDUSE, 6, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("landuse", "farm", LANDUSE, 7, POLYGON_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("landuse", "farmland", LANDUSE, 8, POLYGON_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("landuse", "farmyard", LANDUSE, 9, POLYGON_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(1, "landuse", "farm", LANDUSE, 7, POLYGON_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(1, "landuse", "farmland", LANDUSE, 7, POLYGON_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(1, "landuse", "farmyard", LANDUSE, 9, POLYGON_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(2, "landuse", "forest", LANDUSE, 10, POLYGON_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("landuse", "garages", LANDUSE, 11, POLYGON_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("landuse", "grass", LANDUSE, 12, POLYGON_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("landuse", "greenfield", LANDUSE, 13, POLYGON_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("landuse", "greenhouse_horticulture", LANDUSE, 14, POLYGON_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(1, "landuse", "grass", LANDUSE, 12, POLYGON_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(1, "landuse", "greenfield", LANDUSE, 13, POLYGON_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(1, "landuse", "greenhouse_horticulture", LANDUSE, 14, POLYGON_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(1, "landuse", "industrial", LANDUSE, 15, POLYGON_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("landuse", "landfill", LANDUSE, 16, POLYGON_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("landuse", "meadow", LANDUSE, 17, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("landuse", "military", LANDUSE, 18, POLYGON_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("landuse", "orchard", LANDUSE, 19, POLYGON_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(1, "landuse", "landfill", LANDUSE, 16, POLYGON_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(1, "landuse", "meadow", LANDUSE, 17, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(1, "landuse", "military", LANDUSE, 18, POLYGON_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(1, "landuse", "orchard", LANDUSE, 19, POLYGON_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(1, "landuse", "railway", LANDUSE, 20, POLYGON_TYPE); //$NON-NLS-1$ //$NON-NLS-2$]
register("landuse", "recreation_ground", LANDUSE, 21, POLYGON_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("landuse", "reservoir", LANDUSE, 22, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("landuse", "residential", LANDUSE, 23, POLYGON_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("landuse", "retail", LANDUSE, 24, POLYGON_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("landuse", "salt_pond", LANDUSE, 25, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("landuse", "village_green", LANDUSE, 26, POLYGON_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("landuse", "vineyard", LANDUSE, 27, POLYGON_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(1, "landuse", "recreation_ground", LANDUSE, 21, POLYGON_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(1, "landuse", "conservation", LANDUSE, 21, POLYGON_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(1, "landuse", "village_green", LANDUSE, 21, POLYGON_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(2, "landuse", "reservoir", LANDUSE, 22, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(2, "landuse", "water", LANDUSE, 22, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(1, "landuse", "residential", LANDUSE, 23, POLYGON_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(1, "landuse", "retail", LANDUSE, 24, POLYGON_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(1, "landuse", "salt_pond", LANDUSE, 25, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(1, "landuse", "quarry", LANDUSE, 26, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(1, "landuse", "vineyard", LANDUSE, 27, POLYGON_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
// 16. military
register("military", "airfield", MILITARY, 1, POLYGON_WITH_CENTER_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("military", "bunker", MILITARY, 1, POLYGON_WITH_CENTER_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("military", "barracks", MILITARY, 1, POLYGON_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("military", "danger_area", MILITARY, 1, POLYGON_WITH_CENTER_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("military", "range", MILITARY, 1, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("military", "naval_base", MILITARY, 1, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("military", "bunker", MILITARY, 2, POLYGON_WITH_CENTER_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("military", "barracks", MILITARY, 3, POLYGON_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("military", "danger_area", MILITARY, 4, POLYGON_WITH_CENTER_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("military", "range", MILITARY, 5, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("military", "naval_base", MILITARY, 6, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
// 17. natural
register(3, "natural", "coastline", NATURAL, 5, POLYLINE_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(1, "natural", "bay", NATURAL, 1, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(1,"natural", "beach", NATURAL, 2, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(1,"natural", "cave_entrance", NATURAL, 3, POLYGON_WITH_CENTER_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("natural", "bay", NATURAL, 1, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(1, "natural", "beach", NATURAL, 2, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(1, "natural", "cave_entrance", NATURAL, 3, POLYGON_WITH_CENTER_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
registerRules(1, "natural", "cliff", NATURAL, 4, POLYGON_TYPE, POINT_TYPE, POLYLINE_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("natural", "fell", NATURAL, 6, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("natural", "glacier", NATURAL, 7, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("natural", "heath", NATURAL, 8, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("natural", "land", NATURAL, 9, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(2, "natural", "glacier", NATURAL, 7, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(1, "natural", "heath", NATURAL, 8, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(1,"natural", "land", NATURAL, 9, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("natural", "heath", NATURAL, 10, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("natural", "marsh", NATURAL, 11, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("natural", "mud", NATURAL, 12, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(1, "natural", "marsh", NATURAL, 11, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(1, "natural", "mud", NATURAL, 12, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(1, "natural", "peak", NATURAL, 13, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("natural", "sand", NATURAL, 14, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("natural", "scree", NATURAL, 15, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("natural", "scrub", NATURAL, 16, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(1, "natural", "scrub", NATURAL, 16, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("natural", "spring", NATURAL, 17, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("natural", "stone", NATURAL, 18, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("natural", "tree", NATURAL, 19, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(1, "natural", "volcano", NATURAL, 20, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(2, "natural", "water", NATURAL, 21, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("natural", "wetland", NATURAL, 22, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(2, "natural", "lake", NATURAL, 21, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(1, "natural", "wetland", NATURAL, 22, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(2, "natural", "wood", NATURAL, 23, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register(2, "landuse", "wood", NATURAL, 23, POLYGON_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
// 18. amenity sustenance
registerAsBuilding("amenity", "restaurant", AMENITY_SUSTENANCE, 1); //$NON-NLS-1$ //$NON-NLS-2$
@ -897,10 +921,10 @@ public class MapRenderingTypes {
register("amenity", "bbq", AMENITY_SUSTENANCE, 9, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
// 19. amenity education
registerAsBuilding("amenity", "kindergarten", AMENITY_EDUCATION, 1); //$NON-NLS-1$ //$NON-NLS-2$
register("amenity", "kindergarten", AMENITY_EDUCATION, 1, POINT_TYPE, POLYGON_WITH_CENTER_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("amenity", "school", AMENITY_EDUCATION, 2, POINT_TYPE, POLYGON_WITH_CENTER_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("amenity", "college", AMENITY_EDUCATION, 3, POINT_TYPE, POLYGON_WITH_CENTER_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("amenity", "library", AMENITY_EDUCATION, 4, POINT_TYPE, POLYGON_WITH_CENTER_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("amenity", "library", AMENITY_EDUCATION, 4, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("amenity", "university", AMENITY_EDUCATION, 5, POINT_TYPE, POLYGON_WITH_CENTER_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
@ -961,8 +985,8 @@ public class MapRenderingTypes {
register("amenity", "police", AMENITY_OTHER, 10, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("amenity", "post_box", AMENITY_OTHER, 11, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
registerAsBuilding("amenity", "post_office", AMENITY_OTHER, 12); //$NON-NLS-1$ //$NON-NLS-2$
registerAsBuilding("amenity", "prison", AMENITY_OTHER, 13); //$NON-NLS-1$ //$NON-NLS-2$
registerAsBuilding("amenity", "public_building", AMENITY_OTHER, 14); //$NON-NLS-1$ //$NON-NLS-2$
register("amenity", "prison", AMENITY_OTHER, 13, POLYGON_WITH_CENTER_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("amenity", "public_building", AMENITY_OTHER, 14, POLYGON_WITH_CENTER_TYPE, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("amenity", "recycling", AMENITY_OTHER, 15, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("amenity", "shelter", AMENITY_OTHER, 16, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$
register("amenity", "telephone", AMENITY_OTHER, 17, POINT_TYPE); //$NON-NLS-1$ //$NON-NLS-2$

View file

@ -14,6 +14,7 @@ public class OSMSettings {
ONEWAY("oneway"), //$NON-NLS-1$
LAYER("layer"), //$NON-NLS-1$
BRIDGE("bridge"), //$NON-NLS-1$
TUNNEL("tunnel"), //$NON-NLS-1$
TOLL("toll"), //$NON-NLS-1$
JUNCTION("junction"), //$NON-NLS-1$

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 621 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 B

View file

@ -119,8 +119,8 @@ public class MapActivity extends Activity implements IMapLocationListener, Senso
private ImageButton backToMenu;
// the order of layer should be preserved ! when you are inserting new layer
private RouteLayer routeLayer;
private RendererLayer rendererLayer;
private RouteLayer routeLayer;
private YandexTrafficLayer trafficLayer;
private OsmBugsLayer osmBugsLayer;
private POIMapLayer poiMapLayer;
@ -204,12 +204,13 @@ public class MapActivity extends Activity implements IMapLocationListener, Senso
mapView.setMapLocationListener(this);
routingHelper = ((OsmandApplication) getApplication()).getRoutingHelper();
// 0.5 layer
rendererLayer = new RendererLayer();
mapView.addLayer(rendererLayer, 0.5f);
// 1. route layer
routeLayer = new RouteLayer(routingHelper);
mapView.addLayer(routeLayer, 1);
rendererLayer = new RendererLayer();
mapView.addLayer(rendererLayer, 1.1f);
// 1.5. traffic layer
trafficLayer = new YandexTrafficLayer();

View file

@ -9,7 +9,6 @@ import java.util.List;
import java.util.Map;
import net.osmand.LogUtil;
import net.osmand.R;
import net.osmand.osm.MapRenderObject;
import net.osmand.osm.MapRenderingTypes;
import net.osmand.osm.MapUtils;
@ -49,23 +48,12 @@ public class OsmandRenderer implements Comparator<MapRenderObject> {
/// Colors
private int clFillScreen = Color.rgb(241, 238, 232);
private PathEffect arrowDashEffect1 = new DashPathEffect(new float[] { 0, 12, 10, 152 }, 0);
private PathEffect arrowDashEffect2 = new DashPathEffect(new float[] { 0, 12, 9, 153 }, 1);
private PathEffect arrowDashEffect3 = new DashPathEffect(new float[] { 0, 18, 2, 154 }, 1);
private PathEffect arrowDashEffect4 = new DashPathEffect(new float[] { 0, 18, 1, 155 }, 1);
private PathEffect dashEffect2_2 = new DashPathEffect(new float[]{2,2}, 1);
private PathEffect dashEffect3_2 = new DashPathEffect(new float[]{3,2}, 1);
private PathEffect dashEffect4_2 = new DashPathEffect(new float[]{4,2}, 1);
private PathEffect dashEffect4_3 = new DashPathEffect(new float[]{4,3}, 1);
private PathEffect dashEffect6_2 = new DashPathEffect(new float[]{6,2}, 1);
private PathEffect dashEffect5_2 = new DashPathEffect(new float[]{5,2}, 1);
private PathEffect dashEffect6_3 = new DashPathEffect(new float[]{6,3}, 1);
private PathEffect dashEffect7_7 = new DashPathEffect(new float[]{7,7}, 1);
private PathEffect dashEffect6_3_2_3 = new DashPathEffect(new float[]{6,3,2,3,}, 1);
private PathEffect dashEffect6_3_2_3_2_3 = new DashPathEffect(new float[]{6,3,2,3,2,3}, 1);
private PathEffect arrowDashEffect1 = new DashPathEffect(new float[]{0,12,10,152},0);
private PathEffect arrowDashEffect2 = new DashPathEffect(new float[]{0,12,9,153}, 1);
private PathEffect arrowDashEffect3 = new DashPathEffect(new float[]{0,18,2,154}, 1);
private PathEffect arrowDashEffect4 = new DashPathEffect(new float[]{0,18,1,155}, 1);
private Map<String, PathEffect> dashEffect = new LinkedHashMap<String, PathEffect>();
private Map<Integer, Shader> shaders = new LinkedHashMap<Integer, Shader>();
private Map<Integer, Bitmap> cachedIcons = new LinkedHashMap<Integer, Bitmap>();
@ -91,7 +79,7 @@ public class OsmandRenderer implements Comparator<MapRenderObject> {
int resId;
}
private static class RenderingContext {
/*package*/ static class RenderingContext {
List<TextDrawInfo> textToDraw = new ArrayList<TextDrawInfo>();
List<IconDrawInfo> iconsToDraw = new ArrayList<IconDrawInfo>();
float leftX;
@ -114,11 +102,19 @@ public class OsmandRenderer implements Comparator<MapRenderObject> {
// use to set rendering properties
int color = Color.BLACK;
// polyline props
boolean showText = true;
PathEffect pathEffect = null;
int shadowLayer = 0;
int shadowColor = 0;
float strokeWidth = 0;
// polygon props
boolean showPolygon = true;
int colorAround = 0;
int widthAround = 1;
Shader shader = null;
}
public OsmandRenderer(Context context){
@ -150,6 +146,18 @@ public class OsmandRenderer implements Comparator<MapRenderObject> {
}
public PathEffect getDashEffect(String dashes){
if(!dashEffect.containsKey(dashes)){
String[] ds = dashes.split("_"); //$NON-NLS-1$
float[] f = new float[ds.length];
for(int i=0; i<ds.length; i++){
f[i] = Float.parseFloat(ds[i]);
}
dashEffect.put(dashes, new DashPathEffect(f, 0));
}
return dashEffect.get(dashes);
}
public Shader getShader(int resId){
if(shaders.get(resId) == null){
Shader sh = new BitmapShader(
@ -302,155 +310,16 @@ public class OsmandRenderer implements Comparator<MapRenderObject> {
Path path = null;
int type = MapRenderingTypes.getObjectType(obj.getType());
int subtype = MapRenderingTypes.getPolygonSubType(obj.getType());
int color = Color.rgb(245, 245, 245);
int colorAround = 0;
Shader shader = null;
boolean showPolygon = true;
if (type == MapRenderingTypes.MAN_MADE) {
showPolygon = zoom > 15;
if (subtype == MapRenderingTypes.SUBTYPE_BUILDING) {
color = Color.rgb(188, 169, 169);
} else if (subtype == MapRenderingTypes.SUBTYPE_GARAGES) {
color = Color.rgb(221, 221, 221);
}
rc.color = Color.rgb(245, 245, 245);
rc.shader = null;
rc.showPolygon = true;
} else if (type == MapRenderingTypes.WATERWAY) {
if(subtype == 3){
color = Color.rgb(181, 208, 208);
}
} else if (type == MapRenderingTypes.POWER) {
if(subtype == 5 || subtype == 6){
color = Color.rgb(186, 186, 186);
}
} else if (type == MapRenderingTypes.HIGHWAY) {
if (subtype == MapRenderingTypes.PL_HW_SERVICE || subtype == MapRenderingTypes.PL_HW_UNCLASSIFIED
|| subtype == MapRenderingTypes.PL_HW_RESIDENTIAL) {
colorAround = Color.rgb(194, 194, 194);
color = Color.WHITE;
} else if(subtype == MapRenderingTypes.PL_HW_PEDESTRIAN || subtype == MapRenderingTypes.PL_HW_FOOTWAY){
color = Color.rgb(236, 236, 236);
colorAround = Color.rgb(176, 176, 176);
}
} else if (type == MapRenderingTypes.TOURISM) {
showPolygon = zoom > 15;
if (subtype == 2) {
color = Color.rgb(204, 153, 153);
} else if(subtype == 8){
shader = getShader(R.drawable.h_zoo);
}
} else if (type == MapRenderingTypes.NATURAL) {
if(subtype == 23){
color = Color.rgb(174, 209, 160);
} else if(subtype == 2){
color = Color.rgb(238, 204, 85);
} else if(subtype == 21 || subtype == 5){
color = Color.rgb(181, 208, 208);
}
} else if (type == MapRenderingTypes.LANDUSE) {
switch (subtype) {
case 1:
color = Color.rgb(189, 227, 203);
break;
case 2:
case 22:
color = Color.rgb(180, 213, 240);
break;
case 3:
color = Color.rgb(235, 215, 254);
break;
case 4:
shader = getShader(R.drawable.h_grave_yard);
break;
case 5:
color = Color.rgb(239, 200, 200);
break;
case 6:
color = Color.rgb(157, 157, 108);
break;
case 10:
shader = getShader(R.drawable.h_forest);
break;
case 11 :
color = Color.rgb(223, 209, 214);
break;
case 12:
color = Color.rgb(207, 236, 168);
break;
case 15:
color = Color.rgb(223, 209, 214);
break;
case 18:
color = Color.rgb(252, 216, 219);
break;
case 23:
color = Color.rgb(221, 221, 221);
break;
case 24:
color = Color.rgb(254, 234, 234);
colorAround = Color.rgb(245, 154, 152);
break;
case 27:
shader = getShader(R.drawable.h_vineyard);
break;
}
} else if (type == MapRenderingTypes.LEISURE) {
colorAround = Color.rgb(147, 207, 170);
switch (subtype) {
case 2:
color = Color.rgb(189, 227, 203);
break;
case 3:
case 14:
case 15:
color = Color.rgb(199, 241, 163);
break;
case 6:
color = Color.rgb(137, 210, 174);
case 4:
color = Color.rgb(51, 204, 153);
break;
case 5:
color = Color.rgb(189, 207, 203);
break;
case 12:
color = Color.rgb(206, 246, 202);
break;
case 13:
color = Color.rgb(204, 255, 241);
break;
case 11:
shader = getShader(R.drawable.h_nr);
break;
}
} else if (type == MapRenderingTypes.AMENITY_HEALTHCARE) {
if (subtype == 2) {
color = Color.rgb(240, 240, 216);
colorAround = Color.rgb(212, 168, 158);
}
} else if (type == MapRenderingTypes.AMENITY_TRANSPORTATION) {
if (subtype == 1 || subtype == 2) {
color = Color.rgb(246, 238, 183);
}
} else if (type == MapRenderingTypes.AMENITY_ENTERTAINMENT) {
if (subtype == 3) {
color = Color.rgb(204, 153, 153);
}
} else if (type == MapRenderingTypes.AMENITY_EDUCATION) {
if(subtype == 2 || subtype == 3 || subtype == 5){
color = Color.rgb(240, 240, 216);
colorAround = Color.rgb(212, 168, 158);
} else {
// draw as building education
color = Color.rgb(188, 169, 169);
}
}
if(!showPolygon){
PolygonRenderer.renderPolygon(rc, zoom, type, subtype, this);
if(!rc.showPolygon){
return null;
}
paint.setColor(color);
paint.setColor(rc.color);
for (int i = 0; i < obj.getPointsLength(); i++) {
PointF p = calcPoint(obj, i, rc);
xText += p.x;
@ -466,10 +335,10 @@ public class OsmandRenderer implements Comparator<MapRenderObject> {
if (path != null) {
xText /= obj.getPointsLength();
yText /= obj.getPointsLength();
paint.setShader(shader);
paint.setShader(rc.shader);
canvas.drawPath(path, paint);
if(colorAround != 0){
paintStroke.setColor(colorAround);
if(rc.colorAround != 0){
paintStroke.setColor(rc.colorAround);
paintStroke.setStrokeWidth(1);
canvas.drawPath(path, paintStroke);
}
@ -499,6 +368,8 @@ public class OsmandRenderer implements Comparator<MapRenderObject> {
return null;
}
public void clearCachedResources(){
Collection<Bitmap> values = new ArrayList<Bitmap>(cachedIcons.values());
cachedIcons.clear();
@ -610,18 +481,17 @@ public class OsmandRenderer implements Comparator<MapRenderObject> {
private void drawPolyline(MapRenderObject obj, Canvas canvas, RenderingContext rc) {
int length = obj.getPointsLength();
if(length < 2){
return;
}
int type = MapRenderingTypes.getObjectType(obj.getType());
int subtype = MapRenderingTypes.getPolylineSubType(obj.getType());
renderPolyline(type, subtype, rc);
PolylineRenderer.renderPolyline(type, subtype, obj.getType(), rc, this);
if(rc.strokeWidth == 0){
return;
}
int length = obj.getPointsLength();
if(length < 2){
return;
}
Path path = null;
float pathRotate = 0;
float xLength = 0;
@ -729,215 +599,7 @@ public class OsmandRenderer implements Comparator<MapRenderObject> {
canvas.drawPath(path, paintStroke);
}
public void renderPolyline(int type, int subtype, RenderingContext rc){
int zoom = rc.zoom;
int color = Color.BLACK;
boolean showText = true;
PathEffect pathEffect = null;
int shadowLayer = 0;
int shadowColor = 0;
float strokeWidth = zoom >= 15 ? 1 : 0;
if (type == MapRenderingTypes.HIGHWAY) {
int hwType = subtype;
boolean carRoad = true;
if (hwType == MapRenderingTypes.PL_HW_TRUNK) {
color = Color.rgb(168, 218, 168);
} else if (hwType == MapRenderingTypes.PL_HW_MOTORWAY) {
color = Color.rgb(128,155,192);
} else if (hwType == MapRenderingTypes.PL_HW_PRIMARY) {
color = Color.rgb(235, 152, 154);
} else if (hwType == MapRenderingTypes.PL_HW_SECONDARY) {
color = Color.rgb(253, 214, 164);
} else if (hwType == MapRenderingTypes.PL_HW_TERTIARY) {
color = Color.rgb(254, 254, 179);
shadowLayer = 2;
shadowColor = Color.rgb(186, 186, 186);
} else if (hwType == MapRenderingTypes.PL_HW_SERVICE || hwType == MapRenderingTypes.PL_HW_UNCLASSIFIED
|| hwType == MapRenderingTypes.PL_HW_RESIDENTIAL) {
shadowLayer = 1;
shadowColor = Color.rgb(194, 194, 194);
color = Color.WHITE;
} else if (hwType == MapRenderingTypes.PL_HW_PEDESTRIAN) {
shadowLayer = 1;
shadowColor = Color.rgb(176, 176, 176);
color = Color.rgb(236, 236, 236);
} else {
carRoad = false;
strokeWidth = 2;
pathEffect = dashEffect2_2;
if (hwType == MapRenderingTypes.PL_HW_TRACK || hwType == MapRenderingTypes.PL_HW_PATH) {
color = Color.GRAY;
pathEffect = dashEffect6_2;
} else if (hwType == MapRenderingTypes.PL_HW_CYCLEWAY || hwType == MapRenderingTypes.PL_HW_BRIDLEWAY) {
color = Color.rgb(20, 20, 250);
} else {
color = Color.rgb(250, 128, 115);
}
}
if (carRoad) {
if(zoom <= 12){
if (hwType <= MapRenderingTypes.PL_HW_SECONDARY) {
if (zoom < 10) {
strokeWidth = 1;
} else if (zoom < 12) {
strokeWidth = 2;
} else if (zoom == 12) {
strokeWidth = 3;
}
} else {
strokeWidth = 0;
}
} else if(zoom < 15){
strokeWidth = 4.5f;
} else if (zoom < 16) {
strokeWidth = 6;
} else if (zoom == 16) {
strokeWidth = 8;
} else if (zoom == 17) {
strokeWidth = 13;
} else if (zoom >= 18) {
strokeWidth = 16;
} else if (zoom >= 19) {
strokeWidth = 20;
}
if (hwType == MapRenderingTypes.PL_HW_SERVICE) {
strokeWidth -= 2;
}
}
showText = (carRoad && zoom > 12) || zoom > 16;
} else if(type == MapRenderingTypes.BARRIER){
if(subtype == 5){
color = Color.GRAY;
if(zoom == 14){
strokeWidth = 4;
} else if(zoom == 15){
strokeWidth = 6;
} else if(zoom > 15){
strokeWidth = 9;
} else {
strokeWidth = 0;
}
} else {
strokeWidth = zoom >= 16 ? 1 : 0;
color = Color.BLACK;
}
} else if(type == MapRenderingTypes.POWER){
if (zoom >= 14) {
if (subtype == 3) {
color = Color.rgb(186, 186, 186);
strokeWidth = zoom == 14 ? 1 : 2;
} else if (subtype == 4) {
color = Color.rgb(186, 186, 186);
strokeWidth = 1;
}
} else {
strokeWidth = 0;
}
} else if(type == MapRenderingTypes.AERIALWAY){
// TODO shader on path doesn't work
if(zoom >= 12){
if(subtype == 1 || subtype == 2){
color = Color.rgb(186, 186, 186);
strokeWidth = 2;
//paint.setShader(getShader(R.drawable.h_cable_car));
} else if(subtype == 3 || subtype == 4 || subtype == 5){
color = Color.rgb(186, 186, 186);
strokeWidth = 2;
//paint.setShader(getShader(R.drawable.h_chair_lift));
}
}
} else if(type == MapRenderingTypes.ADMINISTRATIVE){
color = 0xFF800080;
if(subtype == 29 || subtype == 30){
// admin level 9, 10
if (zoom > 12) {
pathEffect = dashEffect3_2;
strokeWidth = 1;
if (zoom > 16) {
strokeWidth = 2;
}
} else {
strokeWidth = 0;
}
} else if(subtype == 28 || subtype == 27){
// admin level 7, 8
if(zoom > 11){
pathEffect = dashEffect5_2;
strokeWidth = 2;
} else {
strokeWidth = 0;
}
} else if(subtype == 25 || subtype == 26){
// admin level 5, 6
if(zoom > 10){
pathEffect = subtype == 25 ? dashEffect6_3_2_3_2_3 : dashEffect6_3_2_3;
strokeWidth = 2;
} else {
strokeWidth = 0;
}
} else if(subtype == 24){
// admin level 4
pathEffect = dashEffect4_3;
if(zoom >= 4 && zoom <= 6){
strokeWidth = 0.6f;
} else if(zoom >= 7 && zoom <= 10){
strokeWidth = 2;
} else if(zoom > 10){
strokeWidth = 3;
} else {
strokeWidth = 0;
}
} else if(subtype == 23 || subtype == 22){
// admin level 2, 3
if(zoom >= 4 && zoom <= 6){
strokeWidth = 2;
} else if(zoom >= 7 && zoom <= 9){
strokeWidth = 3;
} else if(zoom > 9){
if(subtype == 22){
strokeWidth = 6;
} else {
strokeWidth = 5;
pathEffect = dashEffect4_2;
}
} else {
strokeWidth = 0;
}
}
} else if(type == MapRenderingTypes.RAILWAY){
strokeWidth = 2;
if(subtype == 6){
color = Color.rgb(153, 153, 153);
if(zoom > 16){
strokeWidth = 3;
}
pathEffect = dashEffect6_3;
} else if(subtype == 2){
color = Color.rgb(62, 62, 62);
} else if(subtype == 1){
color = Color.rgb(153, 153, 153);
if(zoom >= 16){
strokeWidth = 3;
}
pathEffect = dashEffect7_7;
} else {
color = Color.rgb(153, 153, 153);
}
} else if(type == MapRenderingTypes.WATERWAY){
if(subtype >= 1 && subtype <= 6){
strokeWidth = 2;
color = Color.rgb(181, 208, 208);
}
}
rc.color = color;
rc.pathEffect = pathEffect;
rc.shadowColor = shadowColor;
rc.shadowLayer = shadowLayer;
rc.showText = showText;
rc.strokeWidth = strokeWidth;
}
}

View file

@ -288,8 +288,10 @@ public class PointRenderer {
resId = R.drawable.h_pharmacy;
}
} else if (subType == 2) {
if(zoom >= 15){
resId = R.drawable.h_hospital;
}
}
} else if (type == MapRenderingTypes.AMENITY_ENTERTAINMENT) {
if (zoom >= 15) {
if (subType == 3) {

View file

@ -0,0 +1,296 @@
package net.osmand.render;
import net.osmand.R;
import net.osmand.osm.MapRenderingTypes;
import net.osmand.render.OsmandRenderer.RenderingContext;
import android.graphics.Color;
public class PolygonRenderer {
public static void renderPolygon(RenderingContext rc, int zoom, int type, int subtype, OsmandRenderer o) {
if (type == MapRenderingTypes.HIGHWAY) {
if (subtype == MapRenderingTypes.PL_HW_SERVICE || subtype == MapRenderingTypes.PL_HW_UNCLASSIFIED
|| subtype == MapRenderingTypes.PL_HW_RESIDENTIAL) {
rc.colorAround = Color.rgb(194, 194, 194);
rc.color = Color.WHITE;
} else if(subtype == MapRenderingTypes.PL_HW_PEDESTRIAN || subtype == MapRenderingTypes.PL_HW_FOOTWAY){
rc.color = Color.rgb(236, 236, 236);
rc.colorAround = Color.rgb(176, 176, 176);
}
} else if (type == MapRenderingTypes.WATERWAY) {
if(subtype == 3){
rc.showPolygon = zoom >= 7;
rc.color = 0xffb5d0d0;
} else if(subtype == 4 || subtype == 7 || subtype == 13){
rc.showPolygon = zoom >= 10;
rc.color = 0xffb5d0d0;
}
} else if (type == MapRenderingTypes.AEROWAY) {
if(subtype == 1){
rc.showPolygon = zoom >= 12;
rc.color = 0x80cccccc;
} else if(subtype == 9){
// apron
rc.showPolygon = zoom >= 13;
rc.color = 0xffe9d1ff;
}
} else if (type == MapRenderingTypes.POWER) {
if(subtype == 5 || subtype == 6){
rc.showPolygon = zoom >= 13;
rc.color = 0xffbbbbbb;
}
} else if (type == MapRenderingTypes.MAN_MADE) {
rc.showPolygon = zoom > 15;
if (subtype == MapRenderingTypes.SUBTYPE_BUILDING) {
rc.color = Color.rgb(188, 169, 169);
} else if (subtype == MapRenderingTypes.SUBTYPE_GARAGES) {
rc.color = Color.rgb(221, 221, 221);
}
} else if (type == MapRenderingTypes.TOURISM) {
if (subtype == 2 || subtype == 7) {
rc.showPolygon = zoom >= 13;
rc.color = 0xfff2caea;
if(subtype == 7){
rc.colorAround = 0xff734a08;
rc.pathEffect = o.getDashEffect("9_3"); //$NON-NLS-1$
if(zoom <= 15){
rc.strokeWidth = 1;
} else {
rc.strokeWidth = 2;
}
}
} else if(subtype >= 4 && subtype <= 6){
rc.showPolygon = zoom >= 15;
rc.color = 0xa0ccff99;
} else if(subtype == 8){
rc.showPolygon = zoom >= 13;
rc.shader = o.getShader(R.drawable.h_zoo);
}
} else if (type == MapRenderingTypes.NATURAL) {
switch(subtype){
case 2 :
rc.showPolygon = zoom >= 13;
rc.shader = o.getShader(R.drawable.h_beach);
case 5:
// TODO coastline
break;
case 7:
rc.showPolygon = zoom >= 8;
rc.shader = o.getShader(R.drawable.h_glacier);
if(zoom >= 10){
rc.colorAround = 0xff99ccff;
rc.widthAround = 2;
}
break;
case 8:
rc.showPolygon = zoom >= 10;
rc.color = 0xffffffc0;
break;
case 9:
rc.showPolygon = zoom >= 11;
rc.color = 0xfff2efe9;
break;
case 11:
case 22:
rc.showPolygon = zoom >= 13;
rc.shader = o.getShader(R.drawable.h_marsh);
break;
case 12 :
rc.showPolygon = zoom >= 13;
rc.shader = o.getShader(R.drawable.h_mud);
break;
case 16 :
rc.showPolygon = zoom >= 13;
rc.shader = o.getShader(R.drawable.h_scrub);
break;
case 21:
rc.showPolygon = zoom >= 7;
rc.color = 0xffb5d0d0;
break;
case 23 :
rc.showPolygon = zoom >= 8;
rc.color = 0xffaed1a0;
break;
}
} else if (type == MapRenderingTypes.LANDUSE) {
switch (subtype) {
case 1:
rc.showPolygon = zoom >= 13;
rc.color = 0xffc8b084;
break;
case 2:
rc.showPolygon = zoom >= 10;
rc.color = 0xffb5d0d0;
break;
case 4:
rc.showPolygon = zoom >= 12;
if(zoom >= 12 && zoom <= 14){
rc.color = 0xffaacbaf;
} else if (zoom > 14) {
rc.shader = o.getShader(R.drawable.h_grave_yard);
}
break;
case 5:
rc.showPolygon = zoom >= 12;
rc.color = 0xffefc8c8;
break;
case 3:
case 6:
case 13:
case 16:
rc.showPolygon = zoom >= 12;
rc.color = 0xff9d9d6c;
break;
case 7:
rc.showPolygon = zoom >= 11;
rc.color = 0xffead8bd;
break;
case 9:
rc.showPolygon = zoom >= 11;
rc.color = 0xffddbf92;
break;
case 10:
if(zoom < 8){
rc.showPolygon = false;
} else if(zoom <= 13){
rc.color = 0xff8dc56c;
} else {
rc.shader = o.getShader(R.drawable.h_forest);
}
break;
case 11 :
rc.color = Color.rgb(223, 209, 214);
break;
case 12:
case 17:
rc.showPolygon = zoom >= 12;
rc.color = 0xffcfeca8;
break;
case 15:
case 20:
rc.color = 0xffdfd1d6;
rc.showPolygon = zoom >= 12;
break;
case 18:
rc.showPolygon = zoom >= 12;
rc.color = 0xa0ffa8a8;
break;
case 19:
rc.showPolygon = zoom >= 10;
rc.shader = o.getShader(R.drawable.h_orchard);
break;
case 21:
rc.color = 0xffcfeca8;
rc.showPolygon = zoom >= 12;
break;
case 22 :
rc.showPolygon = zoom >= 7;
rc.color = 0xffb5d0d0;
break;
case 23:
rc.showPolygon = zoom >= 12;
rc.color = 0xffdddddd;
break;
case 24:
rc.showPolygon = zoom >= 12;
rc.color = 0xffcfeca8;
if(zoom >= 15){
rc.colorAround = Color.RED;
}
break;
case 26:
rc.showPolygon = zoom >= 13;
rc.shader = o.getShader(R.drawable.h_quarry2);
break;
case 27:
rc.showPolygon = zoom >= 10;
if(zoom < 14){
rc.color = 0xffabdf96;
} else {
rc.shader = o.getShader(R.drawable.h_vineyard);
}
break;
}
} else if (type == MapRenderingTypes.MILITARY) {
if(subtype == 3){
rc.showPolygon = zoom >= 13;
rc.color = 0xffff8f8f;
} else if(subtype == 4){
rc.showPolygon = zoom >= 10;
rc.shader = o.getShader(R.drawable.h_danger);
}
} else if (type == MapRenderingTypes.LEISURE) {
switch (subtype) {
case 2:
case 4:
rc.showPolygon = zoom >= 13;
rc.color = 0xff33cc99;
break;
case 3:
rc.showPolygon = zoom >= 12;
rc.color = 0xffb5e3b5;
break;
case 5:
rc.showPolygon = zoom >= 12;
rc.colorAround = 0xff888888;
rc.widthAround = 1;
rc.color = 0xff74dcba;
break;
case 6:
rc.color = 0xff8ad3af;
rc.showPolygon = zoom >= 13;
rc.colorAround = 0xff888888;
rc.widthAround = 1;
break;
case 11:
if(zoom < 8){
rc.showPolygon = false;
} else if(zoom >= 8 && zoom <= 12){
rc.showPolygon = true;
rc.color = 0xffabdf96;
} else {
rc.showPolygon = true;
rc.shader = o.getShader(R.drawable.h_nr);
}
break;
case 12:
rc.showPolygon = zoom >= 12;
rc.color = 0xb0b6fdb6;
break;
case 13:
rc.color = 0xffccfff1;
rc.showPolygon = zoom >= 15;
break;
case 14:
case 15:
rc.showPolygon = zoom >= 12;
rc.color = 0xffcfeca8;
break;
}
} else if (type == MapRenderingTypes.AMENITY_HEALTHCARE) {
if (subtype == 2) {
rc.showPolygon = zoom >= 15;
rc.color = 0xfff0f0d8;
rc.colorAround = Color.rgb(212, 168, 158);
}
} else if (type == MapRenderingTypes.AMENITY_TRANSPORTATION) {
if (subtype == 1 || subtype == 2) {
rc.color = Color.rgb(246, 238, 183);
}
} else if (type == MapRenderingTypes.AMENITY_ENTERTAINMENT) {
if (subtype == 3) {
rc.color = Color.rgb(204, 153, 153);
}
} else if (type == MapRenderingTypes.AMENITY_EDUCATION) {
if(subtype == 1 || subtype == 2 || subtype == 3 || subtype == 5){
rc.showPolygon = zoom >= 15;
rc.color = 0xfff0f0d8;
rc.colorAround = Color.rgb(212, 168, 158);
} else {
// draw as building education
rc.color = Color.rgb(188, 169, 169);
}
}
}
}

View file

@ -0,0 +1,394 @@
package net.osmand.render;
import net.osmand.osm.MapRenderingTypes;
import net.osmand.render.OsmandRenderer.RenderingContext;
import android.graphics.Color;
import android.graphics.PathEffect;
public class PolylineRenderer {
public static void renderPolyline(int type, int subtype, int objType, RenderingContext rc, OsmandRenderer o){
int zoom = rc.zoom;
int color = Color.BLACK;
boolean showText = true;
PathEffect pathEffect = null;
int shadowLayer = 0;
int shadowColor = 0;
float strokeWidth = zoom >= 15 ? 1 : 0;
if (type == MapRenderingTypes.HIGHWAY) {
int hwType = subtype;
boolean carRoad = true;
if (hwType == MapRenderingTypes.PL_HW_TRUNK) {
color = Color.rgb(168, 218, 168);
} else if (hwType == MapRenderingTypes.PL_HW_MOTORWAY) {
color = Color.rgb(128,155,192);
} else if (hwType == MapRenderingTypes.PL_HW_PRIMARY) {
color = Color.rgb(235, 152, 154);
} else if (hwType == MapRenderingTypes.PL_HW_SECONDARY) {
color = Color.rgb(253, 214, 164);
} else if (hwType == MapRenderingTypes.PL_HW_TERTIARY) {
color = Color.rgb(254, 254, 179);
shadowLayer = 2;
shadowColor = Color.rgb(186, 186, 186);
} else if (hwType == MapRenderingTypes.PL_HW_SERVICE || hwType == MapRenderingTypes.PL_HW_UNCLASSIFIED
|| hwType == MapRenderingTypes.PL_HW_RESIDENTIAL) {
shadowLayer = 1;
shadowColor = Color.rgb(194, 194, 194);
color = Color.WHITE;
} else if (hwType == MapRenderingTypes.PL_HW_PEDESTRIAN) {
shadowLayer = 1;
shadowColor = Color.rgb(176, 176, 176);
color = Color.rgb(236, 236, 236);
} else {
carRoad = false;
strokeWidth = 2;
pathEffect = o.getDashEffect("2_2"); //$NON-NLS-1$
if (hwType == MapRenderingTypes.PL_HW_TRACK || hwType == MapRenderingTypes.PL_HW_PATH) {
color = Color.GRAY;
pathEffect = o.getDashEffect("6_2"); //$NON-NLS-1$
} else if (hwType == MapRenderingTypes.PL_HW_CYCLEWAY || hwType == MapRenderingTypes.PL_HW_BRIDLEWAY) {
color = Color.rgb(20, 20, 250);
} else {
color = Color.rgb(250, 128, 115);
}
}
if (carRoad) {
if (zoom < 10) {
// done
strokeWidth = 0;
if (hwType <= MapRenderingTypes.PL_HW_SECONDARY) {
if (hwType == MapRenderingTypes.PL_HW_SECONDARY) {
strokeWidth = zoom >= 8 ? 1 : 0;
} else if (hwType == MapRenderingTypes.PL_HW_PRIMARY) {
if (zoom < 7) {
strokeWidth = 0;
} else if (zoom == 7) {
strokeWidth = 1.5f;
} else if (zoom == 8 || zoom == 9) {
strokeWidth = 2f;
}
} else if (hwType == MapRenderingTypes.PL_HW_TRUNK || hwType == MapRenderingTypes.PL_HW_MOTORWAY) {
if(zoom >= 7){
strokeWidth = 3.5f;
} else if(zoom == 6){
strokeWidth = 2;
} else if(zoom == 5){
strokeWidth = 1;
} else {
strokeWidth = 0;
}
}
}
} else if (zoom <= 12) {
if (hwType <= MapRenderingTypes.PL_HW_SECONDARY) {
if (zoom < 12) {
strokeWidth = 2;
} else if (zoom == 12) {
strokeWidth = 3;
}
} else {
strokeWidth = 0;
}
} else {
int layer = MapRenderingTypes.getWayLayer(objType);
if(layer == 1){
pathEffect = o.getDashEffect("4_2"); //$NON-NLS-1$
}
if (zoom < 15) {
strokeWidth = 4.5f;
} else if (zoom < 16) {
strokeWidth = 6;
} else if (zoom == 16) {
strokeWidth = 8;
} else if (zoom == 17) {
strokeWidth = 13;
} else if (zoom >= 18) {
strokeWidth = 16;
} else if (zoom >= 19) {
strokeWidth = 20;
}
if (hwType == MapRenderingTypes.PL_HW_SERVICE) {
strokeWidth -= 2;
}
}
}
showText = (carRoad && zoom > 12) || zoom > 16;
} else if(type == MapRenderingTypes.RAILWAY){
if(zoom < 10){
if (subtype == 2) {
color = 0xffaaaaaa;
if (zoom < 7) {
strokeWidth = 0;
} else if (zoom == 7) {
strokeWidth = 1;
} else if (zoom == 8) {
strokeWidth = 1.5f;
} else if (zoom == 9) {
strokeWidth = 2;
}
} else {
strokeWidth = 0;
}
} else {
// TODO tunnel
strokeWidth = 2;
if (subtype == 6) {
color = Color.rgb(153, 153, 153);
if (zoom > 16) {
strokeWidth = 3;
}
pathEffect = o.getDashEffect("6_3"); //$NON-NLS-1$
} else if (subtype == 2) {
color = Color.rgb(62, 62, 62);
} else if (subtype == 1) {
color = Color.rgb(153, 153, 153);
if (zoom >= 16) {
strokeWidth = 3;
}
pathEffect = o.getDashEffect("7_7"); //$NON-NLS-1$
} else {
color = Color.rgb(153, 153, 153);
}
}
} else if(type == MapRenderingTypes.WATERWAY){
if(zoom <= 10){
strokeWidth = 0;
// draw rivers & canals
if (subtype == 2 || subtype == 4) {
color = 0xffb5d0d0;
if (zoom == 10) {
strokeWidth = 2;
} else if (zoom == 9) {
strokeWidth = 1;
}
}
} else {
switch (subtype) {
case 1:
if (zoom >= 15) {
color = 0xffb5d0d0;
strokeWidth = 2;
} else {
strokeWidth = 0;
}
break;
case 2:
case 4:
color = 0xffb5d0d0;
if(zoom < 13){
strokeWidth = 2;
} else {
int layer = MapRenderingTypes.getWayLayer(objType);
if (layer == 1) {
pathEffect = o.getDashEffect("4_2"); //$NON-NLS-1$
}
if (zoom == 13) {
strokeWidth = 3;
} else if (zoom == 14) {
strokeWidth = 5;
} else if (zoom == 15 || zoom == 16) {
strokeWidth = 6;
} else if (zoom == 17) {
strokeWidth = 10;
} else if (zoom == 18) {
strokeWidth = 12;
}
}
break;
case 5:
case 6:
color = 0xffb5d0d0;
if(zoom < 13){
strokeWidth = 0;
} else if(zoom < 15){
strokeWidth = 1;
} else {
int layer = MapRenderingTypes.getWayLayer(objType);
if (layer == 1) {
pathEffect = o.getDashEffect("4_2"); //$NON-NLS-1$
}
strokeWidth = 2;
}
break;
case 11:
if(zoom < 15){
strokeWidth = 0;
} else {
strokeWidth = 2;
color = 0xffaaaaaa;
}
break;
case 12:
if(zoom >= 13){
strokeWidth = 2;
} else {
strokeWidth = 0;
}
color = 0xffb5d0d0;
default:
break;
}
}
} else if(type == MapRenderingTypes.BARRIER){
if(subtype == 5){
color = Color.GRAY;
if(zoom == 14){
strokeWidth = 4;
} else if(zoom == 15){
strokeWidth = 6;
} else if(zoom > 15){
strokeWidth = 9;
} else {
strokeWidth = 0;
}
} else {
strokeWidth = zoom >= 16 ? 1 : 0;
color = Color.BLACK;
}
} else if(type == MapRenderingTypes.POWER){
if (zoom >= 14) {
if (subtype == 3) {
color = Color.rgb(186, 186, 186);
strokeWidth = zoom == 14 ? 1 : 2;
} else if (subtype == 4) {
color = Color.rgb(186, 186, 186);
strokeWidth = 1;
}
} else {
strokeWidth = 0;
}
} else if(type == MapRenderingTypes.AERIALWAY){
// TODO shader on path doesn't work
if(zoom >= 12){
if(subtype == 1 || subtype == 2){
color = Color.rgb(186, 186, 186);
strokeWidth = 2;
//paint.setShader(getShader(R.drawable.h_cable_car));
} else if(subtype == 3 || subtype == 4 || subtype == 5){
color = Color.rgb(186, 186, 186);
strokeWidth = 2;
//paint.setShader(getShader(R.drawable.h_chair_lift));
}
}
} else if(type == MapRenderingTypes.MAN_MADE){
if(subtype == 8){
// breakwater, groyone
color = 0xffaaaaaa;
if(zoom < 12){
strokeWidth = 0;
} else if(zoom < 14){
strokeWidth = 1;
} else if(zoom < 16){
strokeWidth = 2;
} else {
strokeWidth = 4;
}
} else if(subtype == 9){
// pier
color = 0xfff2efe9;
if(zoom < 12){
strokeWidth = 0;
} else if(zoom < 14){
strokeWidth = 1;
} else if(zoom < 16){
strokeWidth = 3;
} else {
strokeWidth = 6;
}
}
} else if(type == MapRenderingTypes.LEISURE){
if(subtype == 8){
if(zoom < 13){
strokeWidth = 0;
} else if(zoom < 16){
color = Color.BLUE;
strokeWidth = 1;
pathEffect = o.getDashEffect("6_2"); //$NON-NLS-1$
} else {
color = Color.BLUE;
strokeWidth = 2;
pathEffect = o.getDashEffect("6_2"); //$NON-NLS-1$
}
} else if(subtype == 5){
if (zoom >= 13) {
color = 0xff888888;
strokeWidth = 1;
} else {
strokeWidth = 0;
}
}
} else if(type == MapRenderingTypes.ADMINISTRATIVE){
color = 0xFF800080;
if(subtype == 29 || subtype == 30){
// admin level 9, 10
if (zoom > 12) {
pathEffect = o.getDashEffect("3_2"); //$NON-NLS-1$
strokeWidth = 1;
if (zoom > 16) {
strokeWidth = 2;
}
} else {
strokeWidth = 0;
}
} else if(subtype == 28 || subtype == 27){
// admin level 7, 8
if(zoom > 11){
pathEffect = o.getDashEffect("5_2"); //$NON-NLS-1$
strokeWidth = 2;
} else {
strokeWidth = 0;
}
} else if(subtype == 25 || subtype == 26){
// admin level 5, 6
if(zoom > 10){
pathEffect = subtype == 25 ? o.getDashEffect("6_3_2_3_2_3") : o.getDashEffect("6_3_2_3"); //$NON-NLS-1$ //$NON-NLS-2$
strokeWidth = 2;
} else {
strokeWidth = 0;
}
} else if(subtype == 24){
// admin level 4
pathEffect = o.getDashEffect("4_3"); //$NON-NLS-1$
if(zoom >= 4 && zoom <= 6){
strokeWidth = 0.6f;
} else if(zoom >= 7 && zoom <= 10){
strokeWidth = 2;
} else if(zoom > 10){
strokeWidth = 3;
} else {
strokeWidth = 0;
}
} else if(subtype == 23 || subtype == 22){
// admin level 2, 3
if(zoom >= 4 && zoom <= 6){
strokeWidth = 2;
} else if(zoom >= 7 && zoom <= 9){
strokeWidth = 3;
} else if(zoom > 9){
if(subtype == 22){
strokeWidth = 6;
} else {
strokeWidth = 5;
pathEffect = o.getDashEffect("4_2"); //$NON-NLS-1$
}
} else {
strokeWidth = 0;
}
}
}
rc.color = color;
rc.pathEffect = pathEffect;
rc.shadowColor = shadowColor;
rc.shadowLayer = shadowLayer;
rc.showText = showText;
rc.strokeWidth = strokeWidth;
}
}

View file

@ -0,0 +1,513 @@
<Style name="leisure">
<Rule>
<Filter>[leisure] = 'playground'</Filter>
&maxscale_zoom13;
<PolygonSymbolizer>
<CssParameter name="fill">#ccfff1</CssParameter>
</PolygonSymbolizer>
<LineSymbolizer>
<CssParameter name="stroke">#666</CssParameter>
<CssParameter name="stroke-width">0.3</CssParameter>
</LineSymbolizer>
</Rule>
<Rule>
<Filter>[tourism] = 'camp_site' or [tourism]='caravan_site' or [tourism] = 'picnic_site'</Filter>
&maxscale_zoom13;
<PolygonSymbolizer>
<CssParameter name="fill">#ccff99</CssParameter>
<CssParameter name="fill-opacity">0.5</CssParameter>
</PolygonSymbolizer>
<LineSymbolizer>
<CssParameter name="stroke">#666</CssParameter>
<CssParameter name="stroke-width">0.3</CssParameter>
</LineSymbolizer>
</Rule>
<Rule>
<Filter>[tourism] = 'attraction'</Filter>
&maxscale_zoom10;
<PolygonSymbolizer>
<CssParameter name="fill">#f2caea</CssParameter>
</PolygonSymbolizer>
</Rule>
<Rule>
<Filter>[landuse] = 'quarry'</Filter>
&maxscale_zoom11;
<PolygonPatternSymbolizer file="&symbols;/quarry2.png" />
<LineSymbolizer>
<CssParameter name="stroke">grey</CssParameter>
<CssParameter name="stroke-width">0.5</CssParameter>
</LineSymbolizer>
</Rule>
<Rule>
<Filter>[leisure] = 'nature_reserve' or [landuse] = 'vineyard'</Filter>
&maxscale_zoom10;
&minscale_zoom12;
<PolygonSymbolizer>
<CssParameter name="fill">#abdf96</CssParameter>
</PolygonSymbolizer>
</Rule>
<Rule>
<Filter>[landuse] = 'orchard'</Filter>
&maxscale_zoom10;
<PolygonPatternSymbolizer file="&symbols;/orchard.png" />
</Rule>
<Rule>
<Filter>[landuse] = 'vineyard'</Filter>
&maxscale_zoom13;
<PolygonPatternSymbolizer file="&symbols;/vineyard.png" />
</Rule>
<Rule>
<Filter>[leisure] = 'nature_reserve'</Filter>
&maxscale_zoom13;
&minscale_zoom13;
<PolygonPatternSymbolizer file="&symbols;/nature_reserve.png" />
</Rule>
<Rule>
<Filter>[leisure] = 'nature_reserve'</Filter>
&maxscale_zoom14;
<PolygonPatternSymbolizer file="&symbols;/nature_reserve2.png" />
</Rule>
<Rule>
&maxscale_zoom10;
&minscale_zoom14;
<Filter>[landuse] = 'cemetery' or [landuse] = 'grave_yard' or [amenity]='grave_yard'</Filter>
<PolygonSymbolizer>
<CssParameter name="fill">#aacbaf</CssParameter>
</PolygonSymbolizer>
</Rule>
<Rule>
&maxscale_zoom10;
&minscale_zoom18;
<Filter>[landuse] = 'residential'</Filter>
<PolygonSymbolizer>
<CssParameter name="fill">#ddd</CssParameter>
</PolygonSymbolizer>
</Rule>
<Rule>
&maxscale_zoom10;
&minscale_zoom18;
<Filter>[military] = 'barracks'</Filter>
<PolygonSymbolizer>
<CssParameter name="fill">#ff8f8f</CssParameter>
</PolygonSymbolizer>
</Rule>
<Rule>
&maxscale_zoom10;
&minscale_zoom18;
<Filter>[landuse]='military'</Filter>
<PolygonSymbolizer>
<CssParameter name="fill">#ffa8a8</CssParameter>
<CssParameter name="fill-opacity">0.4</CssParameter>
</PolygonSymbolizer>
</Rule>
<!-- NOT DONE -->
<Rule>
&maxscale_zoom10;
&minscale_zoom13;
<Filter>[landuse]='field' or [natural]='field'</Filter>
<PolygonSymbolizer>
<CssParameter name="fill">#666600</CssParameter>
<CssParameter name="fill-opacity">0.2</CssParameter>
</PolygonSymbolizer>
</Rule>
<!-- NOT DONE -->
<Rule>
&maxscale_zoom14;
&minscale_zoom18;
<Filter>[landuse]='field' or [natural]='field'</Filter>
<PolygonSymbolizer>
<CssParameter name="fill">#666600</CssParameter>
<CssParameter name="fill-opacity">0.2</CssParameter>
</PolygonSymbolizer>
<LineSymbolizer>
<CssParameter name="stroke">#660</CssParameter>
<CssParameter name="stroke-opacity">0.4</CssParameter>
<CssParameter name="stroke-width">0.3</CssParameter>
</LineSymbolizer>
</Rule>
<Rule>
&maxscale_zoom9;
&minscale_zoom10;
<Filter>[military] = 'danger_area'</Filter>
<PolygonSymbolizer>
<CssParameter name="fill">pink</CssParameter>
<CssParameter name="fill-opacity">0.3</CssParameter>
</PolygonSymbolizer>
</Rule>
<Rule>
&maxscale_zoom11;
&minscale_zoom18;
<Filter>[military] = 'danger_area'</Filter>
<PolygonPatternSymbolizer file="&symbols;/danger.png" />
</Rule>
<Rule>
&maxscale_zoom14;
<Filter>([landuse] = 'cemetery' or [landuse] = 'grave_yard' or [amenity]='grave_yard') and [religion] = 'jewish'</Filter>
<PolygonPatternSymbolizer file="&symbols;/cemetery_jewish.18.png" />
</Rule>
<Rule>
&maxscale_zoom14;
<Filter>([landuse] = 'cemetery' or [landuse] = 'grave_yard' or [amenity]='grave_yard') and [religion] = 'christian'</Filter>
<PolygonPatternSymbolizer file="&symbols;/grave_yard.png" />
</Rule>
<Rule>
&maxscale_zoom14;
<Filter>([landuse] = 'cemetery' or [landuse] = 'grave_yard' or [amenity]='grave_yard') and [religion] = 'INT-generic'</Filter>
<PolygonPatternSymbolizer file="&symbols;/grave_yard_generic.png" />
</Rule>
<Rule>
&maxscale_zoom10;
<Filter>[landuse] = 'meadow' or [landuse] = 'grass'</Filter>
<PolygonSymbolizer>
<CssParameter name="fill">#cfeca8</CssParameter>
</PolygonSymbolizer>
</Rule>
<Rule>
<Filter>[leisure] = 'park' or [leisure] = 'recreation_ground'</Filter>
&maxscale_zoom10;
<PolygonSymbolizer>
<CssParameter name="fill">#b6fdb6</CssParameter>
<CssParameter name="fill-opacity">0.6</CssParameter>
</PolygonSymbolizer>
</Rule>
<Rule>
<Filter>[tourism] = 'zoo'</Filter>
&maxscale_zoom10;
<PolygonPatternSymbolizer file="&symbols;/zoo.png" />
</Rule>
<Rule>
<Filter>[leisure] = 'common'</Filter>
&maxscale_zoom10;
<PolygonSymbolizer>
<CssParameter name="fill">#cfeca8</CssParameter>
</PolygonSymbolizer>
</Rule>
<Rule>
<Filter>[leisure] = 'garden'</Filter>
&maxscale_zoom10;
<PolygonSymbolizer>
<CssParameter name="fill">#cfeca8</CssParameter>
</PolygonSymbolizer>
</Rule>
<Rule>
<Filter>[leisure] = 'golf_course'</Filter>
&maxscale_zoom10;
<PolygonSymbolizer>
<CssParameter name="fill">#b5e3b5</CssParameter>
</PolygonSymbolizer>
</Rule>
<Rule>
<Filter>[landuse] = 'allotments'</Filter>
&maxscale_zoom10;
<PolygonSymbolizer>
<CssParameter name="fill">#c8b084</CssParameter>
</PolygonSymbolizer>
</Rule>
<Rule>
<Filter>[landuse] = 'forest'</Filter>
&maxscale_zoom8;
&minscale_zoom13;
<PolygonSymbolizer>
<CssParameter name="fill">#8dc56c</CssParameter>
</PolygonSymbolizer>
</Rule>
<Rule>
<Filter>[landuse] = 'forest'</Filter>
&maxscale_zoom14;
<PolygonPatternSymbolizer file="&symbols;/forest.png" />
</Rule>
<Rule>
<Filter>[landuse]='farmyard'</Filter>
&maxscale_zoom9;
<PolygonSymbolizer>
<CssParameter name="fill">#ddbf92</CssParameter>
</PolygonSymbolizer>
</Rule>
<Rule>
<Filter>[landuse] = 'farm' or [landuse]='farmland'</Filter>
&maxscale_zoom9;
<PolygonSymbolizer>
<CssParameter name="fill">#ead8bd</CssParameter>
</PolygonSymbolizer>
</Rule>
<Rule>
<Filter>[landuse] = 'recreation_ground' or [landuse] = 'conservation'</Filter>
&maxscale_zoom10;
<PolygonSymbolizer>
<CssParameter name="fill">#cfeca8</CssParameter>
</PolygonSymbolizer>
</Rule>
<Rule>
<Filter>[landuse] = 'village_green'</Filter>
&maxscale_zoom11;
<PolygonSymbolizer>
<CssParameter name="fill">#cfeca8</CssParameter>
</PolygonSymbolizer>
</Rule>
<Rule>
<Filter>[landuse] = 'retail'</Filter>
&maxscale_zoom10;
<PolygonSymbolizer>
<CssParameter name="fill">#f1dada</CssParameter>
</PolygonSymbolizer>
</Rule>
<Rule>
<Filter>[landuse] = 'retail'</Filter>
&maxscale_zoom15;
<LineSymbolizer>
<CssParameter name="stroke">red</CssParameter>
<CssParameter name="stroke-width">0.3</CssParameter>
</LineSymbolizer>
</Rule>
<Rule>
<Filter>[landuse] = 'industrial' or [landuse]='railway'</Filter>
&maxscale_zoom10;
<PolygonSymbolizer>
<CssParameter name="fill">#dfd1d6</CssParameter>
</PolygonSymbolizer>
</Rule>
<Rule>
<Filter>[power] = 'station'</Filter>
&maxscale_zoom10;
&minscale_zoom11;
<PolygonSymbolizer>
<CssParameter name="fill">#bbb</CssParameter>
</PolygonSymbolizer>
</Rule>
<Rule>
<Filter>[power] = 'station'</Filter>
&maxscale_zoom12;
<PolygonSymbolizer>
<CssParameter name="fill">#bbb</CssParameter>
</PolygonSymbolizer>
<LineSymbolizer>
<CssParameter name="stroke">#555</CssParameter>
<CssParameter name="stroke-width">0.4</CssParameter>
</LineSymbolizer>
</Rule>
<Rule>
<Filter>[power] = 'sub_station'</Filter>
&maxscale_zoom13;
<PolygonSymbolizer>
<CssParameter name="fill">#bbb</CssParameter>
</PolygonSymbolizer>
<LineSymbolizer>
<CssParameter name="stroke">#555</CssParameter>
<CssParameter name="stroke-width">0.4</CssParameter>
</LineSymbolizer>
</Rule>
<Rule>
<Filter>[landuse] = 'commercial'</Filter>
&maxscale_zoom10;
<PolygonSymbolizer>
<CssParameter name="fill">#efc8c8</CssParameter>
</PolygonSymbolizer>
</Rule>
<Rule>
<Filter>[landuse] = 'brownfield' or [landuse]='landfill' or [landuse] = 'greenfield' or [landuse]='construction'</Filter>
&maxscale_zoom10;
<PolygonSymbolizer>
<CssParameter name="fill">#9d9d6c</CssParameter>
</PolygonSymbolizer>
</Rule>
<Rule>
<Filter>[natural] = 'wood' or [landuse] = 'wood'</Filter>
&maxscale_zoom8;
<PolygonSymbolizer>
<CssParameter name="fill">#aed1a0</CssParameter>
</PolygonSymbolizer>
</Rule>
<Rule>
<Filter>[natural] = 'heath'</Filter>
&maxscale_zoom10;
<PolygonSymbolizer>
<CssParameter name="fill">#ffffc0</CssParameter>
</PolygonSymbolizer>
</Rule>
<Rule>
<Filter>[amenity] = 'university' or [amenity] = 'college' or [amenity] = 'school' or [amenity]='hospital' or [amenity]='kindergarten'</Filter>
&maxscale_zoom10;
<PolygonSymbolizer>
<CssParameter name="fill">#f0f0d8</CssParameter>
</PolygonSymbolizer>
</Rule>
<Rule>
<Filter>[amenity] = 'university' or [amenity] = 'college' or [amenity] = 'school' or [amenity]='hospital' or [amenity]='kindergarten'</Filter>
&maxscale_zoom12;
<LineSymbolizer>
<CssParameter name="stroke">brown</CssParameter>
<CssParameter name="stroke-width">0.3</CssParameter>
</LineSymbolizer>
</Rule>
<Rule>
<Filter>[amenity] = 'parking'</Filter>
&maxscale_zoom10;
<PolygonSymbolizer>
<CssParameter name="fill">#f7efb7</CssParameter>
</PolygonSymbolizer>
</Rule>
<Rule>
<Filter>[amenity] = 'parking'</Filter>
&maxscale_zoom15;
<LineSymbolizer>
<CssParameter name="stroke">#eeeed1</CssParameter>
<CssParameter name="stroke-width">0.3</CssParameter>
</LineSymbolizer>
</Rule>
<Rule>
<Filter>[aeroway] = 'apron'</Filter>
&maxscale_zoom12;
<PolygonSymbolizer>
<CssParameter name="fill">#e9d1ff</CssParameter>
</PolygonSymbolizer>
</Rule>
<Rule>
<Filter>[aeroway] = 'aerodrome'</Filter>
&maxscale_zoom12;
<PolygonSymbolizer>
<CssParameter name="fill">#ccc</CssParameter>
<CssParameter name="fill-opacity">0.2</CssParameter>
</PolygonSymbolizer>
<LineSymbolizer>
<CssParameter name="stroke">#555</CssParameter>
<CssParameter name="stroke-width">0.2</CssParameter>
</LineSymbolizer>
</Rule>
<Rule>
<Filter>[natural] = 'beach'</Filter>
&maxscale_zoom13;
<PolygonPatternSymbolizer file="&symbols;/beach.png" />
</Rule>
<Rule>
<Filter>[natural] = 'mud'</Filter>
&maxscale_zoom13;
<PolygonPatternSymbolizer file="&symbols;/mud.png" />
</Rule>
<!--Rule>
<ElseFilter/>
&maxscale_zoom10;
<PolygonSymbolizer>
<CssParameter name="fill">lightgrey</CssParameter>
</PolygonSymbolizer>
</Rule-->
</Style>
<Style name="theme_park">
<Rule>
&maxscale_zoom13;
&minscale_zoom14;
<Filter>[tourism]='theme_park'</Filter>
<LineSymbolizer>
<CssParameter name="stroke">#734a08</CssParameter>
<CssParameter name="stroke-width">1.5</CssParameter>
<CssParameter name="stroke-dasharray">9,3</CssParameter>
<CssParameter name="stroke-opacity">0.6</CssParameter>
</LineSymbolizer>
</Rule>
<Rule>
&maxscale_zoom15;
&minscale_zoom18;
<Filter>[tourism]='theme_park'</Filter>
<LineSymbolizer>
<CssParameter name="stroke">#734a08</CssParameter>
<CssParameter name="stroke-width">2.5</CssParameter>
<CssParameter name="stroke-dasharray">9,3</CssParameter>
<CssParameter name="stroke-opacity">0.6</CssParameter>
</LineSymbolizer>
</Rule>
</Style>
<Style name="directions">
<Rule>
<Filter>[oneway] = 'yes'</Filter>
&maxscale_zoom16;
<LineSymbolizer>
<CssParameter name="stroke">#6c70d5</CssParameter>
<CssParameter name="stroke-width">1</CssParameter>
<CssParameter name="stroke-linejoin">bevel</CssParameter>
<CssParameter name="stroke-dasharray">0,12,10,152</CssParameter>
</LineSymbolizer>
<LineSymbolizer>
<CssParameter name="stroke">#6c70d5</CssParameter>
<CssParameter name="stroke-width">2</CssParameter>
<CssParameter name="stroke-linejoin">bevel</CssParameter>
<CssParameter name="stroke-dasharray">0,12,9,153</CssParameter>
</LineSymbolizer>
<LineSymbolizer>
<CssParameter name="stroke">#6c70d5</CssParameter>
<CssParameter name="stroke-width">3</CssParameter>
<CssParameter name="stroke-linejoin">bevel</CssParameter>
<CssParameter name="stroke-dasharray">0,18,2,154</CssParameter>
</LineSymbolizer>
<LineSymbolizer>
<CssParameter name="stroke">#6c70d5</CssParameter>
<CssParameter name="stroke-width">4</CssParameter>
<CssParameter name="stroke-linejoin">bevel</CssParameter>
<CssParameter name="stroke-dasharray">0,18,1,155</CssParameter>
</LineSymbolizer>
</Rule>
<Rule>
<Filter>[oneway] = '-1'</Filter>
&maxscale_zoom16;
<LineSymbolizer>
<CssParameter name="stroke">#6c70d5</CssParameter>
<CssParameter name="stroke-width">1</CssParameter>
<CssParameter name="stroke-linejoin">bevel</CssParameter>
<CssParameter name="stroke-dasharray">0,12,10,152</CssParameter>
</LineSymbolizer>
<LineSymbolizer>
<CssParameter name="stroke">#6c70d5</CssParameter>
<CssParameter name="stroke-width">2</CssParameter>
<CssParameter name="stroke-linejoin">bevel</CssParameter>
<CssParameter name="stroke-dasharray">0,13,9,152</CssParameter>
</LineSymbolizer>
<LineSymbolizer>
<CssParameter name="stroke">#6c70d5</CssParameter>
<CssParameter name="stroke-width">3</CssParameter>
<CssParameter name="stroke-linejoin">bevel</CssParameter>
<CssParameter name="stroke-dasharray">0,14,2,158</CssParameter>
</LineSymbolizer>
<LineSymbolizer>
<CssParameter name="stroke">#6c70d5</CssParameter>
<CssParameter name="stroke-width">4</CssParameter>
<CssParameter name="stroke-linejoin">bevel</CssParameter>
<CssParameter name="stroke-dasharray">0,15,1,158</CssParameter>
</LineSymbolizer>
</Rule>
</Style>
<Style name="sports_grounds">
<Rule>
<Filter>[leisure] = 'sports_centre' or [leisure] = 'stadium'</Filter>
&maxscale_zoom10;
<PolygonSymbolizer>
<CssParameter name="fill">#33cc99</CssParameter>
</PolygonSymbolizer>
</Rule>
<Rule>
<Filter>[leisure]='track'</Filter>
&maxscale_zoom10;
<PolygonSymbolizer>
<CssParameter name="fill">#74dcba</CssParameter>
</PolygonSymbolizer>
<LineSymbolizer>
<CssParameter name="stroke">#888</CssParameter>
<CssParameter name="stroke-width">0.5</CssParameter>
</LineSymbolizer>
</Rule>
<Rule>
<Filter>[leisure] = 'pitch'</Filter>
&maxscale_zoom10;
<PolygonSymbolizer>
<CssParameter name="fill">#8ad3af</CssParameter>
</PolygonSymbolizer>
<LineSymbolizer>
<CssParameter name="stroke">#888</CssParameter>
<CssParameter name="stroke-width">0.5</CssParameter>
</LineSymbolizer>
</Rule>
</Style>

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,774 @@
<Style name="area-text">
<Rule>
<Filter>[way_area] &gt;= 150000</Filter>
&maxscale_zoom14;
<TextSymbolizer name="name" fontset_name="book-fonts" size="10" fill="#000033" halo_radius="1" wrap_width="20"/>
</Rule>
<Rule>
<Filter>[way_area] &gt;= 80000 and [way_area] &lt; 150000</Filter>
&maxscale_zoom15;
<TextSymbolizer name="name" fontset_name="book-fonts" size="10" fill="#000033" halo_radius="1" wrap_width="20"/>
</Rule>
<Rule>
<Filter>[way_area] &gt;= 20000 and [way_area] &lt; 80000</Filter>
&maxscale_zoom16;
<TextSymbolizer name="name" fontset_name="book-fonts" size="10" fill="#000033" halo_radius="1" wrap_width="20"/>
</Rule>
<Rule>
<Filter>[way_area] &lt; 20000</Filter>
&maxscale_zoom17;
<TextSymbolizer name="name" fontset_name="book-fonts" size="10" fill="#000033" halo_radius="1" wrap_width="20"/>
</Rule>
</Style>
<Style name="highway-junctions">
<Rule>
&maxscale_zoom11;
&minscale_zoom11;
<TextSymbolizer name="ref" fontset_name="oblique-fonts" size="9" fill="#6666ff" halo_radius="1" wrap_width="12" min_distance="2" />
</Rule>
<Rule>
&maxscale_zoom12;
&minscale_zoom14;
<TextSymbolizer name="ref" fontset_name="oblique-fonts" size="9" fill="#6666ff" halo_radius="1" wrap_width="12" min_distance="2"/>
<TextSymbolizer name="name" fontset_name="oblique-fonts" size="8" fill="#6666ff" halo_radius="1" wrap_width="2" dy="-8" min_distance="2" wrap_character=";" />
</Rule>
<Rule>
&maxscale_zoom15;
<TextSymbolizer name="ref" fontset_name="oblique-fonts" size="12" fill="#6666ff" halo_radius="1" wrap_width="12" min_distance="2"/>
<TextSymbolizer name="name" fontset_name="oblique-fonts" size="11" fill="#6666ff" halo_radius="1" wrap_width="2" dy="-10" min_distance="2" wrap_character=";" />
</Rule>
</Style>
<Style name="text">
<Rule>
<Filter>[place] = 'island'</Filter>
&maxscale_zoom10;
&minscale_zoom18;
<TextSymbolizer name="name" fontset_name="oblique-fonts" size="9" fill="#000" dy="0" halo_radius="1" wrap_width="0"/>
</Rule>
<Rule>
<Filter>[amenity]='pub' or [amenity]='restaurant' or [amenity]='cafe' or [amenity]='fast_food'</Filter>
&maxscale_zoom17;
<TextSymbolizer name="name" fontset_name="bold-fonts" size="10" fill="#734a08" dy="9" halo_radius="1" wrap_width="34"/>
</Rule>
<Rule>
<Filter>[amenity]='bar'</Filter>
&maxscale_zoom17;
<TextSymbolizer name="name" fontset_name="bold-fonts" size="10" fill="#734a08" dy="11" halo_radius="1" wrap_width="0"/>
</Rule>
<Rule>
<Filter>[amenity]='cinema' or [amenity]='library' or [amenity]='theatre'</Filter>
&maxscale_zoom17;
<TextSymbolizer name="name" fontset_name="bold-fonts" size="10" fill="#734a08" dy="12" halo_radius="1" wrap_width="0"/>
</Rule>
<Rule>
<Filter>[amenity]='parking' and ([access] = 'public' or not [access] &lt;&gt; '')</Filter>
&maxscale_zoom17;
<TextSymbolizer name="name" fontset_name="book-fonts" size="9" fill="#0066ff" dy="9" halo_radius="1" wrap_width="34"/>
</Rule>
<Rule>
<Filter>[amenity]='parking' and ([access] &lt;&gt; '' and not [access] = 'public')</Filter>
&maxscale_zoom17;
<TextSymbolizer name="name" fontset_name="book-fonts" size="9" fill="#66ccaf" dy="9" halo_radius="1" wrap_width="34"/>
</Rule>
<Rule>
<Filter>[amenity] = 'police'</Filter>
&maxscale_zoom17;
<TextSymbolizer name="name" fontset_name="book-fonts" size="10" fill="#734a08" dy="10" halo_radius="1" wrap_width="30"/>
</Rule>
<Rule>
<Filter>[amenity] = 'fire_station'</Filter>
&maxscale_zoom17;
<TextSymbolizer name="name" fontset_name="book-fonts" size="10" fill="#734a08" dy="9" halo_radius="1" wrap_width="30"/>
</Rule>
<Rule>
<Filter>[amenity] = 'place_of_worship'</Filter>
&maxscale_zoom17;
<TextSymbolizer name="name" fontset_name="book-fonts" size="10" fill="#000033" dy="11" halo_radius="1" wrap_width="30"/>
</Rule>
<Rule>
<Filter>[natural] = 'wood'</Filter>
&maxscale_zoom15;
<TextSymbolizer name="name" fontset_name="book-fonts" size="10" fill="#000" halo_radius="2" wrap_width="10"/>
</Rule>
<Rule>
<Filter>[natural] = 'peak'</Filter>
&maxscale_zoom13;
<TextSymbolizer name="name" fontset_name="book-fonts" size="10" fill="brown" dy="5" halo_radius="1"/>
</Rule>
<Rule>
<Filter>[natural] = 'peak' and not [name] != ''</Filter>
&maxscale_zoom14;
<TextSymbolizer name="ele" fontset_name="oblique-fonts" size="9" fill="brown" dy="6" halo_radius="1"/>
</Rule>
<Rule>
<Filter>[natural] = 'peak' and [name] != ''</Filter>
&maxscale_zoom14;
<TextSymbolizer name="ele" fontset_name="oblique-fonts" size="9" fill="brown" dy="16" halo_radius="1"/>
</Rule>
<Rule>
<Filter>[natural] = 'cave_entrance'</Filter>
&maxscale_zoom15;
<TextSymbolizer name="name" fontset_name="book-fonts" size="10" fill="brown" dy="9" halo_radius="1" wrap_width="20" />
</Rule>
<Rule>
<Filter>[historic] = 'memorial'</Filter>
&maxscale_zoom17;
<TextSymbolizer name="name" fontset_name="book-fonts" size="9" fill="brown" dy="12" halo_radius="1" wrap_width="20" />
</Rule>
<Rule>
<Filter>[natural] = 'water' or [natural] = 'lake' or [landuse] = 'reservoir' or [landuse] = 'basin'</Filter>
&maxscale_zoom15;
<TextSymbolizer name="name" fontset_name="book-fonts" size="10" fill="#6699cc" halo_radius="1" wrap_width="20"/>
</Rule>
<Rule>
<Filter>([leisure] &lt;&gt; '' or [landuse] &lt;&gt; '') and [point] = 'yes'</Filter>
&maxscale_zoom15;
<TextSymbolizer name="name" fontset_name="book-fonts" size="9" fill="#000" halo_radius="2" wrap_width="10"/>
</Rule>
<Rule>
<Filter>[natural] = 'bay'</Filter>
&maxscale_zoom14;
<TextSymbolizer name="name" fontset_name="book-fonts" size="10" fill="#6699cc" halo_radius="1" wrap_width="20"/>
</Rule>
<Rule>
<Filter>[natural] = 'spring'</Filter>
&maxscale_zoom16;
<TextSymbolizer name="name" fontset_name="book-fonts" size="8" fill="#6699cc" dy="10" halo_radius="1" wrap_width="20"/>
</Rule>
<Rule>
<Filter>[tourism] = 'alpine_hut' or [amenity]='shelter'</Filter>
&maxscale_zoom15;
<TextSymbolizer name="name" fontset_name="book-fonts" size="9" fill="#6699cc" dy="15" halo_radius="1"/>
</Rule>
<Rule>
<Filter>[tourism] = 'alpine_hut' or [amenity]='shelter'</Filter>
&maxscale_zoom16;
<TextSymbolizer name="ele" fontset_name="oblique-fonts" size="8" fill="#6699cc" dy="25" halo_radius="1"/>
</Rule>
<Rule>
<Filter>[amenity] = 'bank'</Filter>
&maxscale_zoom17;
<TextSymbolizer name="name" fontset_name="book-fonts" size="9" fill="black" dy="9" halo_radius="1" wrap_width="0"/>
</Rule>
<Rule>
<Filter>[tourism] = 'hotel' or [tourism]='hostel'</Filter>
&maxscale_zoom17;
<TextSymbolizer name="name" fontset_name="book-fonts" size="10" fill="#0066ff" dy="11" halo_radius="1" wrap_width="0"/>
</Rule>
<Rule>
<Filter>[amenity] = 'embassy'</Filter>
&maxscale_zoom17;
<TextSymbolizer name="name" fontset_name="book-fonts" size="9" fill="#0066ff" dy="8" halo_radius="1" wrap_width="0"/>
</Rule>
<Rule>
<Filter>[tourism]='guest_house'</Filter>
&maxscale_zoom17;
<TextSymbolizer name="name" fontset_name="book-fonts" size="8" fill="#0066ff" dy="13" halo_radius="1" wrap_width="0"/>
</Rule>
<Rule>
<Filter>[amenity] = 'fuel' or [amenity]='bus_station'</Filter>
&maxscale_zoom17;
<TextSymbolizer name="name" fontset_name="book-fonts" size="9" fill="#0066ff" dy="9" halo_radius="1" wrap_width="0"/>
</Rule>
<Rule>
<Filter>[tourism] = 'camp_site'</Filter>
&maxscale_zoom17;
<TextSymbolizer name="name" fontset_name="book-fonts" size="10" fill="#0066ff" dy="15" halo_radius="1" wrap_width="70"/>
</Rule>
<Rule>
<Filter>[tourism] = 'caravan_site'</Filter>
&maxscale_zoom17;
<TextSymbolizer name="name" fontset_name="book-fonts" size="10" fill="#0066ff" dy="19" halo_radius="1" wrap_width="70"/>
</Rule>
<Rule>
<Filter>[waterway] = 'lock'</Filter>
&maxscale_zoom15;
<TextSymbolizer name="name" fontset_name="book-fonts" size="9" fill="#0066ff" dy="10" halo_radius="1" wrap_width="70"/>
</Rule>
<Rule>
<Filter>[leisure] = 'marina'</Filter>
&maxscale_zoom15;
&minscale_zoom16;
<TextSymbolizer name="name" fontset_name="book-fonts" size="8" fill="blue" halo_radius="1" wrap_width="30"/>
</Rule>
<Rule>
<Filter>[leisure] = 'marina'</Filter>
&maxscale_zoom17;
<TextSymbolizer name="name" fontset_name="book-fonts" size="10" fill="blue" halo_radius="1" wrap_width="30"/>
</Rule>
<Rule>
<Filter>[tourism] = 'theme_park'</Filter>
&maxscale_zoom14;
&minscale_zoom15;
<TextSymbolizer name="name" fontset_name="book-fonts" size="8" fill="#734a08" halo_radius="1" wrap_width="30"/>
</Rule>
<Rule>
<Filter>[tourism] = 'theme_park'</Filter>
&maxscale_zoom16;
<TextSymbolizer name="name" fontset_name="book-fonts" size="10" fill="#734a08" halo_radius="1" wrap_width="30"/>
</Rule>
<Rule>
<Filter>[tourism]='museum'</Filter>
&maxscale_zoom17;
<TextSymbolizer name="name" fontset_name="book-fonts" size="10" fill="#734a08" dy="10" halo_radius="1" wrap_width="0"/>
</Rule>
<Rule>
<Filter>[amenity]='prison'</Filter>
&maxscale_zoom17;
<TextSymbolizer name="name" fontset_name="book-fonts" size="10" fill="#734a08" dy="16" halo_radius="1" wrap_width="0"/>
</Rule>
<Rule>
<Filter>[tourism] = 'attraction'</Filter>
&maxscale_zoom16;
<TextSymbolizer name="name" fontset_name="book-fonts" size="10" fill="#660033" halo_radius="2" wrap_width="10"/>
</Rule>
<Rule>
<Filter>[amenity] = 'university'</Filter>
&maxscale_zoom15;
<TextSymbolizer name="name" fontset_name="bold-fonts" size="9" fill="#000033" halo_radius="1" wrap_width="16"/>
</Rule>
<Rule>
<Filter>[amenity] = 'school' or [amenity] = 'college'</Filter>
&maxscale_zoom15;
<TextSymbolizer name="name" fontset_name="book-fonts" size="9" fill="#000033" halo_radius="1" wrap_width="14"/>
</Rule>
<Rule>
<Filter>[amenity] = 'kindergarten'</Filter>
&maxscale_zoom16;
<TextSymbolizer name="name" fontset_name="book-fonts" size="8" fill="#000033" halo_radius="1" wrap_width="14"/>
</Rule>
<Rule>
<Filter>[man_made] = 'lighthouse'</Filter>
&maxscale_zoom15;
<TextSymbolizer name="name" fontset_name="book-fonts" size="9" fill="#000033" dy="16" halo_radius="2" wrap_width="12"/>
</Rule>
<Rule>
<Filter>[man_made] = 'windmill'</Filter>
&maxscale_zoom17;
<TextSymbolizer name="name" fontset_name="book-fonts" size="9" fill="#734a08" dy="12" halo_radius="1" wrap_width="20"/>
</Rule>
<Rule>
<Filter>[amenity] = 'hospital'</Filter>
&maxscale_zoom16;
<TextSymbolizer name="name" fontset_name="book-fonts" size="8" fill="#da0092" dy="10" halo_radius="2" wrap_width="24"/>
</Rule>
<Rule>
<Filter>[amenity] = 'pharmacy'</Filter>
&maxscale_zoom17;
<TextSymbolizer name="name" fontset_name="book-fonts" size="8" fill="#da0092" dy="9" halo_radius="1" wrap_width="12"/>
</Rule>
<Rule>
<Filter>[shop]='bakery' or [shop]='clothes' or [shop]='fashion' or [shop]='convenience' or [shop]='doityourself' or [shop]='hairdresser' or [shop]='butcher'</Filter>
&maxscale_zoom17;
<TextSymbolizer name="name" fontset_name="book-fonts" size="8" fill="#939" dy="9" halo_radius="1" wrap_width="12"/>
</Rule>
<Rule>
<Filter>[shop]='supermarket' or [shop]='department_store'</Filter>
&maxscale_zoom16;
<TextSymbolizer name="name" fontset_name="book-fonts" size="9" fill="#939" dy="9" halo_radius="1" wrap_width="20"/>
</Rule>
<Rule>
<Filter>[military] = 'danger_area'</Filter>
&maxscale_zoom12;
<TextSymbolizer name="name" fontset_name="bold-fonts" size="9" fill="pink" halo_radius="1" wrap_width="10"/>
</Rule>
<Rule>
<Filter>[aeroway] = 'gate'</Filter>
&maxscale_zoom17;
<TextSymbolizer name="ref" fontset_name="book-fonts" size="10" fill="#aa66cc" halo_radius="1" wrap_width="10"/>
</Rule>
</Style>
<Style name="roads-text-low-zoom">
<Rule>
<Filter>[highway] = 'motorway' and [length] = 1</Filter>
&maxscale_zoom10;
&minscale_zoom12;
<ShieldSymbolizer name="ref" fontset_name="bold-fonts" size="10" fill="#fff" placement="line" file="&symbols;/mot_shield1.png" min_distance="30" spacing="750"/>
</Rule>
<Rule>
<Filter>[highway] = 'motorway' and [length] = 2</Filter>
&maxscale_zoom10;
&minscale_zoom12;
<ShieldSymbolizer name="ref" fontset_name="bold-fonts" size="10" fill="#fff" placement="line" file="&symbols;/mot_shield2.png" min_distance="30" spacing="750"/>
</Rule>
<Rule>
<Filter>[highway] = 'motorway' and [length] = 3</Filter>
&maxscale_zoom10;
&minscale_zoom12;
<ShieldSymbolizer name="ref" fontset_name="bold-fonts" size="10" fill="#fff" placement="line" file="&symbols;/mot_shield3.png" min_distance="30" spacing="750"/>
</Rule>
<Rule>
<Filter>[highway] = 'motorway' and [length] = 4</Filter>
&maxscale_zoom10;
&minscale_zoom12;
<ShieldSymbolizer name="ref" fontset_name="bold-fonts" size="10" fill="#fff" placement="line" file="&symbols;/mot_shield4.png" min_distance="30" spacing="750"/>
</Rule>
<Rule>
<Filter>[highway] = 'motorway' and [length] = 5</Filter>
&maxscale_zoom10;
&minscale_zoom12;
<ShieldSymbolizer name="ref" fontset_name="bold-fonts" size="10" fill="#fff" placement="line" file="&symbols;/mot_shield5.png" min_distance="30" spacing="750"/>
</Rule>
<Rule>
<Filter>[highway] = 'motorway' and [length] = 6</Filter>
&maxscale_zoom10;
&minscale_zoom12;
<ShieldSymbolizer name="ref" fontset_name="bold-fonts" size="10" fill="#fff" placement="line" file="&symbols;/mot_shield6.png" min_distance="30" spacing="750"/>
</Rule>
<Rule>
<Filter>[highway] = 'motorway' and [length] = 7</Filter>
&maxscale_zoom10;
&minscale_zoom12;
<ShieldSymbolizer name="ref" fontset_name="bold-fonts" size="10" fill="#fff" placement="line" file="&symbols;/mot_shield6.png" min_distance="30" spacing="750"/>
</Rule>
<Rule>
<Filter>[highway] = 'motorway' and [length] = 8</Filter>
&maxscale_zoom10;
&minscale_zoom12;
<ShieldSymbolizer name="ref" fontset_name="bold-fonts" size="10" fill="#fff" placement="line" file="&symbols;/mot_shield7.png" min_distance="30" spacing="750"/>
</Rule>
<Rule>
<Filter>[highway] = 'trunk' and [length] = 1</Filter>
&maxscale_zoom11;
&minscale_zoom12;
<ShieldSymbolizer name="ref" fontset_name="bold-fonts" size="10" fill="#fff" placement="line" file="&symbols;/tru_shield1.png" min_distance="30" spacing="750"/>
</Rule>
<Rule>
<Filter>[highway] = 'trunk' and [length] = 2</Filter>
&maxscale_zoom11;
&minscale_zoom12;
<ShieldSymbolizer name="ref" fontset_name="bold-fonts" size="10" fill="#fff" placement="line" file="&symbols;/tru_shield2.png" min_distance="30" spacing="750"/>
</Rule>
<Rule>
<Filter>[highway] = 'trunk' and [length] = 3</Filter>
&maxscale_zoom11;
&minscale_zoom12;
<ShieldSymbolizer name="ref" fontset_name="bold-fonts" size="10" fill="#fff" placement="line" file="&symbols;/tru_shield3.png" min_distance="24" spacing="750"/>
</Rule>
<Rule>
<Filter>[highway] = 'trunk' and [length] = 4</Filter>
&maxscale_zoom11;
&minscale_zoom12;
<ShieldSymbolizer name="ref" fontset_name="bold-fonts" size="10" fill="#fff" placement="line" file="&symbols;/tru_shield4.png" min_distance="30" spacing="750"/>
</Rule>
<Rule>
<Filter>[highway] = 'trunk' and [length] = 5</Filter>
&maxscale_zoom11;
&minscale_zoom12;
<ShieldSymbolizer name="ref" fontset_name="bold-fonts" size="10" fill="#fff" placement="line" file="&symbols;/tru_shield5.png" min_distance="30" spacing="750"/>
</Rule>
<Rule>
<Filter>[highway] = 'trunk' and [length] = 6</Filter>
&maxscale_zoom11;
&minscale_zoom12;
<ShieldSymbolizer name="ref" fontset_name="bold-fonts" size="10" fill="#fff" placement="line" file="&symbols;/tru_shield6.png" min_distance="30" spacing="750"/>
</Rule>
<Rule>
<Filter>[highway] = 'trunk' and [length] = 7</Filter>
&maxscale_zoom11;
&minscale_zoom12;
<ShieldSymbolizer name="ref" fontset_name="bold-fonts" size="10" fill="#fff" placement="line" file="&symbols;/tru_shield7.png" min_distance="30" spacing="750"/>
</Rule>
<Rule>
<Filter>[highway] = 'trunk' and [length] = 8</Filter>
&maxscale_zoom11;
&minscale_zoom12;
<ShieldSymbolizer name="ref" fontset_name="bold-fonts" size="10" fill="#fff" placement="line" file="&symbols;/tru_shield8.png" min_distance="30" spacing="750"/>
</Rule>
<Rule>
<Filter>[highway] = 'primary' and [length] = 1</Filter>
&maxscale_zoom11;
&minscale_zoom12;
<ShieldSymbolizer name="ref" fontset_name="bold-fonts" size="10" fill="#fff" placement="line" file="&symbols;/pri_shield1.png" min_distance="30" spacing="750"/>
</Rule>
<Rule>
<Filter>[highway] = 'primary' and [length] = 2</Filter>
&maxscale_zoom11;
&minscale_zoom12;
<ShieldSymbolizer name="ref" fontset_name="bold-fonts" size="10" fill="#fff" placement="line" file="&symbols;/pri_shield2.png" min_distance="30" spacing="750"/>
</Rule>
<Rule>
<Filter>[highway] = 'primary' and [length] = 3</Filter>
&maxscale_zoom11;
&minscale_zoom12;
<ShieldSymbolizer name="ref" fontset_name="bold-fonts" size="10" fill="#fff" placement="line" file="&symbols;/pri_shield3.png" min_distance="30" spacing="750"/>
</Rule>
<Rule>
<Filter>[highway] = 'primary' and [length] = 4</Filter>
&maxscale_zoom11;
&minscale_zoom12;
<ShieldSymbolizer name="ref" fontset_name="bold-fonts" size="10" fill="#fff" placement="line" file="&symbols;/pri_shield4.png" min_distance="30" spacing="750"/>
</Rule>
<Rule>
<Filter>[highway] = 'primary' and [length] = 5</Filter>
&maxscale_zoom11;
&minscale_zoom12;
<ShieldSymbolizer name="ref" fontset_name="bold-fonts" size="10" fill="#fff" placement="line" file="&symbols;/pri_shield5.png" min_distance="30" spacing="750"/>
</Rule>
<Rule>
<Filter>[highway] = 'primary' and [length] = 6</Filter>
&maxscale_zoom11;
&minscale_zoom12;
<ShieldSymbolizer name="ref" fontset_name="bold-fonts" size="10" fill="#fff" placement="line" file="&symbols;/pri_shield6.png" min_distance="30" spacing="750"/>
</Rule>
<Rule>
<Filter>[highway] = 'primary' and [length] = 7</Filter>
&maxscale_zoom11;
&minscale_zoom12;
<ShieldSymbolizer name="ref" fontset_name="bold-fonts" size="10" fill="#fff" placement="line" file="&symbols;/pri_shield7.png" min_distance="30" spacing="750"/>
</Rule>
<Rule>
<Filter>[highway] = 'primary' and [length] = 8</Filter>
&maxscale_zoom11;
&minscale_zoom12;
<ShieldSymbolizer name="ref" fontset_name="bold-fonts" size="10" fill="#fff" placement="line" file="&symbols;/pri_shield8.png" min_distance="30" spacing="750"/>
</Rule>
</Style>
<Style name="roads-text">
<Rule>
<Filter>[highway] = 'motorway' and [length] = 1</Filter>
&maxscale_zoom13;
&minscale_zoom18;
<ShieldSymbolizer name="ref" fontset_name="bold-fonts" size="10" fill="#fff" placement="line" file="&symbols;/mot_shield1.png" min_distance="30" spacing="750"/>
</Rule>
<Rule>
<Filter>[highway] = 'motorway' and [length] = 2</Filter>
&maxscale_zoom13;
&minscale_zoom18;
<ShieldSymbolizer name="ref" fontset_name="bold-fonts" size="10" fill="#fff" placement="line" file="&symbols;/mot_shield2.png" min_distance="30" spacing="750"/>
</Rule>
<Rule>
<Filter>[highway] = 'motorway' and [length] = 3</Filter>
&maxscale_zoom13;
&minscale_zoom18;
<ShieldSymbolizer name="ref" fontset_name="bold-fonts" size="10" fill="#fff" placement="line" file="&symbols;/mot_shield3.png" min_distance="30" spacing="750"/>
</Rule>
<Rule>
<Filter>[highway] = 'motorway' and [length] = 4</Filter>
&maxscale_zoom13;
&minscale_zoom18;
<ShieldSymbolizer name="ref" fontset_name="bold-fonts" size="10" fill="#fff" placement="line" file="&symbols;/mot_shield4.png" min_distance="30" spacing="750"/>
</Rule>
<Rule>
<Filter>[highway] = 'motorway' and [length] = 5</Filter>
&maxscale_zoom13;
&minscale_zoom18;
<ShieldSymbolizer name="ref" fontset_name="bold-fonts" size="10" fill="#fff" placement="line" file="&symbols;/mot_shield5.png" min_distance="30" spacing="750"/>
</Rule>
<Rule>
<Filter>[highway] = 'motorway' and [length] = 6</Filter>
&maxscale_zoom13;
&minscale_zoom18;
<ShieldSymbolizer name="ref" fontset_name="bold-fonts" size="10" fill="#fff" placement="line" file="&symbols;/mot_shield6.png" min_distance="30" spacing="750"/>
</Rule>
<Rule>
<Filter>[highway] = 'motorway' and [length] = 7</Filter>
&maxscale_zoom13;
&minscale_zoom18;
<ShieldSymbolizer name="ref" fontset_name="bold-fonts" size="10" fill="#fff" placement="line" file="&symbols;/mot_shield6.png" min_distance="30" spacing="750"/>
</Rule>
<Rule>
<Filter>[highway] = 'motorway' and [length] = 8</Filter>
&maxscale_zoom13;
&minscale_zoom18;
<ShieldSymbolizer name="ref" fontset_name="bold-fonts" size="10" fill="#fff" placement="line" file="&symbols;/mot_shield7.png" min_distance="30" spacing="750"/>
</Rule>
<Rule>
<Filter>[highway] = 'trunk' and [length] = 1</Filter>
&maxscale_zoom13;
&minscale_zoom18;
<ShieldSymbolizer name="ref" fontset_name="bold-fonts" size="10" fill="#fff" placement="line" file="&symbols;/tru_shield1.png" min_distance="30" spacing="750"/>
</Rule>
<Rule>
<Filter>[highway] = 'trunk' and [length] = 2</Filter>
&maxscale_zoom13;
&minscale_zoom18;
<ShieldSymbolizer name="ref" fontset_name="bold-fonts" size="10" fill="#fff" placement="line" file="&symbols;/tru_shield2.png" min_distance="30" spacing="750"/>
</Rule>
<Rule>
<Filter>[highway] = 'trunk' and [length] = 3</Filter>
&maxscale_zoom13;
&minscale_zoom18;
<ShieldSymbolizer name="ref" fontset_name="bold-fonts" size="10" fill="#fff" placement="line" file="&symbols;/tru_shield3.png" min_distance="24" spacing="750"/>
</Rule>
<Rule>
<Filter>[highway] = 'trunk' and [length] = 4</Filter>
&maxscale_zoom13;
&minscale_zoom18;
<ShieldSymbolizer name="ref" fontset_name="bold-fonts" size="10" fill="#fff" placement="line" file="&symbols;/tru_shield4.png" min_distance="30" spacing="750"/>
</Rule>
<Rule>
<Filter>[highway] = 'trunk' and [length] = 5</Filter>
&maxscale_zoom13;
&minscale_zoom18;
<ShieldSymbolizer name="ref" fontset_name="bold-fonts" size="10" fill="#fff" placement="line" file="&symbols;/tru_shield5.png" min_distance="30" spacing="750"/>
</Rule>
<Rule>
<Filter>[highway] = 'trunk' and [length] = 6</Filter>
&maxscale_zoom13;
&minscale_zoom18;
<ShieldSymbolizer name="ref" fontset_name="bold-fonts" size="10" fill="#fff" placement="line" file="&symbols;/tru_shield6.png" min_distance="30" spacing="750"/>
</Rule>
<Rule>
<Filter>[highway] = 'trunk' and [length] = 7</Filter>
&maxscale_zoom13;
&minscale_zoom18;
<ShieldSymbolizer name="ref" fontset_name="bold-fonts" size="10" fill="#fff" placement="line" file="&symbols;/tru_shield7.png" min_distance="30" spacing="750"/>
</Rule>
<Rule>
<Filter>[highway] = 'trunk' and [length] = 8</Filter>
&maxscale_zoom13;
&minscale_zoom18;
<ShieldSymbolizer name="ref" fontset_name="bold-fonts" size="10" fill="#fff" placement="line" file="&symbols;/tru_shield8.png" min_distance="30" spacing="750"/>
</Rule>
<Rule>
<Filter>[highway] = 'primary' and [length] = 1</Filter>
&maxscale_zoom13;
&minscale_zoom18;
<ShieldSymbolizer name="ref" fontset_name="bold-fonts" size="10" fill="#fff" placement="line" file="&symbols;/pri_shield1.png" min_distance="30" spacing="750"/>
</Rule>
<Rule>
<Filter>[highway] = 'primary' and [length] = 2</Filter>
&maxscale_zoom13;
&minscale_zoom18;
<ShieldSymbolizer name="ref" fontset_name="bold-fonts" size="10" fill="#fff" placement="line" file="&symbols;/pri_shield2.png" min_distance="30" spacing="750"/>
</Rule>
<Rule>
<Filter>[highway] = 'primary' and [length] = 3</Filter>
&maxscale_zoom13;
&minscale_zoom18;
<ShieldSymbolizer name="ref" fontset_name="bold-fonts" size="10" fill="#fff" placement="line" file="&symbols;/pri_shield3.png" min_distance="30" spacing="750"/>
</Rule>
<Rule>
<Filter>[highway] = 'primary' and [length] = 4</Filter>
&maxscale_zoom13;
&minscale_zoom18;
<ShieldSymbolizer name="ref" fontset_name="bold-fonts" size="10" fill="#fff" placement="line" file="&symbols;/pri_shield4.png" min_distance="30" spacing="750"/>
</Rule>
<Rule>
<Filter>[highway] = 'primary' and [length] = 5</Filter>
&maxscale_zoom13;
&minscale_zoom18;
<ShieldSymbolizer name="ref" fontset_name="bold-fonts" size="10" fill="#fff" placement="line" file="&symbols;/pri_shield5.png" min_distance="30" spacing="750"/>
</Rule>
<Rule>
<Filter>[highway] = 'primary' and [length] = 6</Filter>
&maxscale_zoom13;
&minscale_zoom18;
<ShieldSymbolizer name="ref" fontset_name="bold-fonts" size="10" fill="#fff" placement="line" file="&symbols;/pri_shield6.png" min_distance="30" spacing="750"/>
</Rule>
<Rule>
<Filter>[highway] = 'primary' and [length] = 7</Filter>
&maxscale_zoom13;
&minscale_zoom18;
<ShieldSymbolizer name="ref" fontset_name="bold-fonts" size="10" fill="#fff" placement="line" file="&symbols;/pri_shield7.png" min_distance="30" spacing="750"/>
</Rule>
<Rule>
<Filter>[highway] = 'primary' and [length] = 8</Filter>
&maxscale_zoom13;
&minscale_zoom18;
<ShieldSymbolizer name="ref" fontset_name="bold-fonts" size="10" fill="#fff" placement="line" file="&symbols;/pri_shield8.png" min_distance="30" spacing="750"/>
</Rule>
<Rule>
<Filter>([highway] = 'secondary' and [length] = 1) and not [bridge]='yes'</Filter>
&maxscale_zoom12;
&minscale_zoom18;
<ShieldSymbolizer name="ref" fontset_name="bold-fonts" size="10" fill="#fff" placement="line" file="&symbols;/sec_shield1.png" min_distance="40" spacing="750"/>
</Rule>
<Rule>
<Filter>([highway] = 'secondary' and [length] = 2) and not [bridge]='yes'</Filter>
&maxscale_zoom12;
&minscale_zoom18;
<ShieldSymbolizer name="ref" fontset_name="bold-fonts" size="10" fill="#fff" placement="line" file="&symbols;/sec_shield2.png" min_distance="40" spacing="750"/>
</Rule>
<Rule>
<Filter>([highway] = 'secondary' and [length] = 3) and not [bridge]='yes'</Filter>
&maxscale_zoom12;
&minscale_zoom18;
<ShieldSymbolizer name="ref" fontset_name="bold-fonts" size="10" fill="#fff" placement="line" file="&symbols;/sec_shield3.png" min_distance="40" spacing="750"/>
</Rule>
<Rule>
<Filter>([highway] = 'secondary' and [length] = 4) and not [bridge]='yes'</Filter>
&maxscale_zoom12;
&minscale_zoom18;
<ShieldSymbolizer name="ref" fontset_name="bold-fonts" size="10" fill="#fff" placement="line" file="&symbols;/sec_shield4.png" min_distance="40" spacing="750"/>
</Rule>
<Rule>
<Filter>([highway] = 'secondary' and [length] = 5) and not [bridge]='yes'</Filter>
&maxscale_zoom12;
&minscale_zoom18;
<ShieldSymbolizer name="ref" fontset_name="bold-fonts" size="10" fill="#fff" placement="line" file="&symbols;/sec_shield5.png" min_distance="40" spacing="750"/>
</Rule>
<Rule>
<Filter>([highway] = 'secondary' and [length] = 6) and not [bridge]='yes'</Filter>
&maxscale_zoom12;
&minscale_zoom18;
<ShieldSymbolizer name="ref" fontset_name="bold-fonts" size="10" fill="#fff" placement="line" file="&symbols;/sec_shield6.png" min_distance="40" spacing="750"/>
</Rule>
<Rule>
<Filter>([highway] = 'secondary' and [length] = 7) and not [bridge]='yes'</Filter>
&maxscale_zoom12;
&minscale_zoom18;
<ShieldSymbolizer name="ref" fontset_name="bold-fonts" size="10" fill="#fff" placement="line" file="&symbols;/sec_shield7.png" min_distance="40" spacing="750"/>
</Rule>
<Rule>
<Filter>([highway] = 'secondary' and [length] = 8) and not [bridge]='yes'</Filter>
&maxscale_zoom12;
&minscale_zoom18;
<ShieldSymbolizer name="ref" fontset_name="bold-fonts" size="10" fill="#fff" placement="line" file="&symbols;/sec_shield8.png" min_distance="40" spacing="750"/>
</Rule>
<Rule>
<Filter>([highway] = 'tertiary' and [length] = 1) and not [bridge]='yes'</Filter>
&maxscale_zoom13;
&minscale_zoom18;
<ShieldSymbolizer name="ref" fontset_name="bold-fonts" size="10" fill="#fff" placement="line" file="&symbols;/ter_shield1.png" min_distance="40" spacing="750"/>
</Rule>
<Rule>
<Filter>([highway] = 'tertiary' and [length] = 2) and not [bridge]='yes'</Filter>
&maxscale_zoom13;
&minscale_zoom18;
<ShieldSymbolizer name="ref" fontset_name="bold-fonts" size="10" fill="#fff" placement="line" file="&symbols;/ter_shield2.png" min_distance="40" spacing="750"/>
</Rule>
<Rule>
<Filter>([highway] = 'tertiary' and [length] = 3) and not [bridge]='yes'</Filter>
&maxscale_zoom13;
&minscale_zoom18;
<ShieldSymbolizer name="ref" fontset_name="bold-fonts" size="10" fill="#fff" placement="line" file="&symbols;/ter_shield3.png" min_distance="40" spacing="750"/>
</Rule>
<Rule>
<Filter>([highway] = 'tertiary' and [length] = 4) and not [bridge]='yes'</Filter>
&maxscale_zoom13;
&minscale_zoom18;
<ShieldSymbolizer name="ref" fontset_name="bold-fonts" size="10" fill="#fff" placement="line" file="&symbols;/ter_shield4.png" min_distance="40" spacing="750"/>
</Rule>
<Rule>
<Filter>([highway] = 'tertiary' and [length] = 5) and not [bridge]='yes'</Filter>
&maxscale_zoom13;
&minscale_zoom18;
<ShieldSymbolizer name="ref" fontset_name="bold-fonts" size="10" fill="#fff" placement="line" file="&symbols;/ter_shield5.png" min_distance="40" spacing="750"/>
</Rule>
<Rule>
<Filter>([highway] = 'tertiary' and [length] = 6) and not [bridge]='yes'</Filter>
&maxscale_zoom13;
&minscale_zoom18;
<ShieldSymbolizer name="ref" fontset_name="bold-fonts" size="10" fill="#fff" placement="line" file="&symbols;/ter_shield6.png" min_distance="40" spacing="750"/>
</Rule>
<Rule>
<Filter>([highway] = 'tertiary' and [length] = 7) and not [bridge]='yes'</Filter>
&maxscale_zoom13;
&minscale_zoom18;
<ShieldSymbolizer name="ref" fontset_name="bold-fonts" size="10" fill="#fff" placement="line" file="&symbols;/ter_shield7.png" min_distance="40" spacing="750"/>
</Rule>
<Rule>
<Filter>([highway] = 'tertiary' and [length] = 8) and not [bridge]='yes'</Filter>
&maxscale_zoom13;
&minscale_zoom18;
<ShieldSymbolizer name="ref" fontset_name="bold-fonts" size="10" fill="#fff" placement="line" file="&symbols;/ter_shield8.png" min_distance="40" spacing="750"/>
</Rule>
<Rule>
<Filter>([highway] = 'unclassified' or [highway]='residential') and not [bridge]='yes'</Filter>
&maxscale_zoom15;
<TextSymbolizer name="ref" fontset_name="bold-fonts" size="10" fill="#000" halo_radius="1" min_distance="18" spacing="750"/>
</Rule>
<Rule>
<Filter>([aeroway] = 'runway' or [aeroway]='taxiway') and not [bridge]='yes'</Filter>
&maxscale_zoom15;
<TextSymbolizer name="ref" fontset_name="book-fonts" size="10" fill="#333" halo_radius="1" min_distance="18" spacing="750" placement="line"/>
</Rule>
<Rule>
<Filter>[highway] = 'trunk' or [highway] = 'primary'</Filter>
&maxscale_zoom13;
&minscale_zoom13;
<TextSymbolizer name="name" fontset_name="book-fonts" size="8" fill="black" halo_radius="0" placement="line"/>
</Rule>
<Rule>
<Filter>[highway] = 'secondary'</Filter>
&maxscale_zoom13;
&minscale_zoom13;
<TextSymbolizer name="name" fontset_name="book-fonts" size="8" fill="black" halo_radius="1" halo_fill="#fed7a5" placement="line"/>
</Rule>
<Rule>
<Filter>[highway] = 'trunk' or [highway] = 'primary'</Filter>
&maxscale_zoom14;
&minscale_zoom14;
<TextSymbolizer name="name" fontset_name="book-fonts" size="9" fill="black" halo_radius="0" placement="line"/>
</Rule>
<Rule>
<Filter>[highway] = 'trunk' or [highway] = 'primary'</Filter>
&maxscale_zoom15;
&minscale_zoom18;
<TextSymbolizer name="name" fontset_name="book-fonts" size="10" fill="black" halo_radius="0" placement="line"/>
</Rule>
<Rule>
<Filter>[highway] = 'secondary'</Filter>
&maxscale_zoom14;
&minscale_zoom14;
<TextSymbolizer name="name" fontset_name="book-fonts" size="9" fill="black" halo_radius="1" halo_fill="#fed7a5" placement="line"/>
</Rule><Rule>
<Filter>[highway] = 'secondary'</Filter>
&maxscale_zoom15;
&minscale_zoom18;
<TextSymbolizer name="name" fontset_name="book-fonts" size="10" fill="black" halo_radius="1" halo_fill="#fed7a5" placement="line"/>
</Rule>
<Rule>
<Filter>[highway] = 'tertiary'</Filter>
&maxscale_zoom15;
&minscale_zoom16;
<TextSymbolizer name="name" fontset_name="book-fonts" size="9" fill="#000" halo_radius="1" placement="line" />
</Rule>
<Rule>
<Filter>[highway] = 'tertiary'</Filter>
&maxscale_zoom17;
&minscale_zoom18;
<TextSymbolizer name="name" fontset_name="book-fonts" size="11" fill="#000" halo_radius="1" placement="line" />
</Rule>
<Rule>
&maxscale_zoom13;
&minscale_zoom15;
<Filter>[highway] = 'proposed' or [highway]='construction'</Filter>
<TextSymbolizer name="name" fontset_name="book-fonts" size="9" fill="#000" halo_radius="1" placement="line" />
</Rule>
<Rule>
&maxscale_zoom16;
&minscale_zoom18;
<Filter>[highway] = 'proposed' or [highway]='construction'</Filter>
<TextSymbolizer name="name" fontset_name="book-fonts" size="11" fill="#000" halo_radius="1" placement="line" />
</Rule>
<Rule>
<Filter>[highway] = 'unclassified' or [highway] = 'residential'</Filter>
&maxscale_zoom15;
&minscale_zoom15;
<TextSymbolizer name="name" fontset_name="book-fonts" size="8" fill="#000" halo_radius="1" spacing="300" placement="line" />
</Rule>
<Rule>
<Filter>[highway] = 'unclassified' or [highway] = 'residential'</Filter>
&maxscale_zoom16;
&minscale_zoom16;
<TextSymbolizer name="name" fontset_name="book-fonts" size="9" fill="#000" halo_radius="1" spacing="300" placement="line" />
</Rule>
<Rule>
<Filter>[highway] = 'unclassified' or [highway] = 'residential'</Filter>
&maxscale_zoom17;
&minscale_zoom18;
<TextSymbolizer name="name" fontset_name="book-fonts" size="11" fill="#000" halo_radius="1" spacing="400" placement="line" />
</Rule>
<Rule>
<ElseFilter/>
&maxscale_zoom15;
&minscale_zoom16;
<TextSymbolizer name="name" fontset_name="book-fonts" size="9" fill="#000" halo_radius="1" placement="line" />
</Rule>
<Rule>
<ElseFilter/>
&maxscale_zoom17;
&minscale_zoom18;
<TextSymbolizer name="name" fontset_name="book-fonts" size="11" fill="#000" halo_radius="1" placement="line" />
</Rule>
</Style>

File diff suppressed because it is too large Load diff