implement rendering

git-svn-id: https://osmand.googlecode.com/svn/trunk@515 e29c36b1-1cfa-d876-8d93-3434fc2bb7b8
This commit is contained in:
Victor Shcherb 2010-09-21 20:59:57 +00:00
parent 56e60979b0
commit a9ac742588
50 changed files with 853 additions and 568 deletions

View file

@ -16,15 +16,20 @@ public class ToDoConstants {
// 87. Use network availability for defining loading tiles from internet.
// 89. Transport redesign UI (enable run from context menu, switch go to goal/not) !
// 90. Use Junidecode library on the client for fast english translation
// outside base 0.4 release
// 90. Use Junidecode library on the client for english translation (for map rendering and other save disk space)
// 91. Invent binary format (minimize disk space, maximize speed)
// 92. Replace poi index with standard map index and unify POI categories
// 93. Implement multytype vector objects (?) - building with fence, road & tram ... (binary format)
// 94. Revise index to decrease their size (especially address) - replace to float lat/lon
// TODO small improvements for release :
// 1. If select vector map, notice if there are no loaded maps.
// 1. If select vector map, notice if there are no loaded maps.
// 2. Fix bug with regenerating map when it is rotated
// 3. Do not write for area last point as it is first poitn
// 4. FIX park cheluskincev - forest
// 5. FIX subway tunnel
// TODO Improvements :
// 1! VELCOM
@ -33,16 +38,16 @@ public class ToDoConstants {
// 5. keyboard (issue 43 )?
// +6. Do not upload empty files (transport, poi... ).
// +7. Implement auto-delete from site
// 8. In all places verify to use float lat/lon improve disk space for indexes !!!
// +13! Support multiple database for map rendering
// 16. Internet access bits
// 17. Implement multipolygons to polygons (!?) + coastline
// 17. Implement multipolygons to polygons (!?) + coastline - (todo indexCreator)
// 18. Fix loading map data in rotated mode (check properly boundaries)
// +- 20. Add text to rendering (area, point, polyline) (BUILDINGS,
// features_text.xml (+-), main_text.xml(+), layer-placenames.xml.inc(+)
// 21. Shield, ref.
// 22. Verify all POI has a point_type (in order to search them)
// 19. colors for road trunk and motorway
// 12. Fix : find proper location for streets ! centralize them (when create index)?

View file

@ -78,9 +78,10 @@ public class IndexCreator {
public static final int BATCH_SIZE = 5000;
public static final String TEMP_NODES_DB = "nodes.tmp.odb";
public static final int STEP_MAIN = 1;
public static final int STEP_ADDRESS_RELATIONS = 2;
public static final int STEP_CITY_NODES = 3;
public static final int STEP_CITY_NODES = 1;
public static final int STEP_ADDRESS_RELATIONS_AND_MULTYPOLYGONS = 2;
public static final int STEP_MAIN = 3;
private File workingDir = null;
@ -138,6 +139,8 @@ public class IndexCreator {
private PreparedStatement mapLocsStatLevel2;
// private RTree mapTree;
// save it in memory while that is allowed
private Set<Long> multiPolygonsWays = new LinkedHashSet<Long>();
private Map<Long, List<Way>> lowLevelWaysSt = new LinkedHashMap<Long, List<Way>>();
private Map<Long, List<Way>> lowLevelWaysEnd = new LinkedHashMap<Long, List<Way>>();
@ -945,13 +948,16 @@ public class IndexCreator {
}
if(indexMap && (e instanceof Way || e instanceof Node)){
// manipulate what kind of way to load
loadEntityData(e, true);
boolean inverse = "-1".equals(e.getTag(OSMTagKey.ONEWAY));
// check that's not multipolygon
if (e instanceof Node || !multiPolygonsWays.contains(e.getId())) {
// manipulate what kind of way to load
loadEntityData(e, true);
boolean inverse = "-1".equals(e.getTag(OSMTagKey.ONEWAY));
writeEntityToMapDatabase(e, e.getId(), inverse, 0);
indexLowLevelMap(e, 1);
indexLowLevelMap(e, 2);
writeEntityToMapDatabase(e, e.getId(), inverse, 0);
indexLowLevelMap(e, 1);
indexLowLevelMap(e, 2);
}
}
if (indexAddress) {
@ -1013,17 +1019,36 @@ public class IndexCreator {
}
}
}
} else if (step == STEP_ADDRESS_RELATIONS) {
} else if (step == STEP_ADDRESS_RELATIONS_AND_MULTYPOLYGONS) {
if (e instanceof Relation && "address".equals(e.getTag(OSMTagKey.TYPE))) {
indexAddressRelation((Relation) e);
}
if(e instanceof Relation && "multipolygon".equals(e.getTag(OSMTagKey.TYPE))){
loadEntityData(e, true);
Map<Entity, String> entities = ((Relation) e).getMemberEntities();
for(Entity es : entities.keySet()){
if(es instanceof Way){
boolean inner = "inner".equals(entities.get(es));
// TODO determine clockwise
boolean clockwise = true;
// TODO add tags from relation to outer ways!
boolean inverse = !clockwise == inner;
writeEntityToMapDatabase(es, es.getId(), inverse, 0);
indexLowLevelMap(es, 1);
indexLowLevelMap(es, 2);
multiPolygonsWays.add(es.getId());
}
}
}
} else if (step == STEP_CITY_NODES) {
registerCityIfNeeded(e);
}
}
private void registerCityIfNeeded(Entity e) {
if (e instanceof Node && e.getTag(OSMTagKey.PLACE) != null) {
City city = new City((Node) e);
@ -1438,10 +1463,10 @@ public class IndexCreator {
}
// 2. index address relations
if(indexAddress){
if(indexAddress || indexMap){
progress.setGeneralProgress("[55 of 100]");
progress.startTask("Preindexing address...", -1);
allRelations = iterateOverEntities(progress, EntityType.RELATION, allRelations, STEP_ADDRESS_RELATIONS);
allRelations = iterateOverEntities(progress, EntityType.RELATION, allRelations, STEP_ADDRESS_RELATIONS_AND_MULTYPOLYGONS);
// commit to put all cities
if(pStatements.get(addressBuildingStat) > 0){
addressBuildingStat.executeBatch();
@ -1580,12 +1605,15 @@ public class IndexCreator {
// 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);
// 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);
// creator.setNodesDBFile(new File("e:/Information/OSM maps/osmand/ams.tmp.odb"));
// creator.generateIndexes(new File("e:/Information/OSM maps/osm_map/ams_part_map.osm"), new ConsoleProgressImplementation(3), null);
// creator.setNodesDBFile(new File("e:/Information/OSM maps/osmand/netherlands.tmp.odb"));
// creator.generateIndexes(new File("e:/Information/OSM maps/osm_map/netherlands.osm.bz2"), new ConsoleProgressImplementation(1), null);
/*try {
// RTree rtree = new RTree("e:/Information/OSM maps/osmand/Belarus_2010_09_03.map.odb_ind");
// new Pack().packTree(rtree, "e:/Information/OSM maps/osmand/pack.ind");

View file

@ -18,9 +18,10 @@ import net.osmand.osm.OSMSettings.OSMTagKey;
public class MapRenderingTypes {
/** standard schema :
/** standard schema :
polygon : ssssssss ttttt aaaaa ttttt 011 : 26 bits + 6 bits for special info
t - object type, a - area subtype, p - point object type, s - point object subtype
multi :
polyline : ppppp ttttt 010 : 13 bits + 19 bits for special info
t - object type, p - polyline object type,
point : ssssssss ttttt 010 : 16 bits + 16 bits for special info
@ -29,10 +30,12 @@ public class MapRenderingTypes {
public final static int TYPE_MASK_LEN = 3;
public final static int TYPE_MASK = (1 << TYPE_MASK_LEN) - 1;
public final static int MULTY_POLYGON_TYPE = 0;
public final static int POLYGON_TYPE = 3;
public final static int POLYLINE_TYPE = 2;
public final static int POINT_TYPE = 1;
public final static int PG_SUBTYPE_MASK_LEN = 5;
public final static int PG_SUBTYPE_MASK = (1 << PG_SUBTYPE_MASK_LEN) -1;
public final static int PO_SUBTYPE_MASK_LEN = 8;
@ -47,13 +50,10 @@ public class MapRenderingTypes {
public final static int MASK_4 = (1 << 4) - 1;
public final static int MASK_10 = (1 << 10) - 1;
public final static String REF_CHAR = ((char)0x0019)+""; //$NON-NLS-1$
public final static char REF_CHAR = ((char)0x0019);
// TODO !!! add others facilities to all types
// TODO Internet access bits for point
// TODO Find TextSymbolizer rules and write text for points and others
// TODO place text : (ref - shield)
// TODO coastline
public final static int HIGHWAY = 1;
@ -246,11 +246,6 @@ public class MapRenderingTypes {
init();
}
int type = 0;
if (e instanceof Relation) {
// TODO change in future (?)
// multypoligon, forest ...
return type;
}
boolean point = e instanceof Node;
boolean polygon = false;

Binary file not shown.

After

Width:  |  Height:  |  Size: 412 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 439 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 441 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 445 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 446 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 447 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 447 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 450 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 422 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 431 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 433 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 437 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 439 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 440 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 440 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 442 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 422 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 431 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 433 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 437 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 439 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 440 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 440 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 442 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 422 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 431 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 433 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 437 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 439 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 440 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 440 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 442 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 422 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 431 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 433 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 437 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 441 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 440 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 440 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 442 B

View file

@ -269,6 +269,7 @@ public class MapRenderRepositories {
cObjects = new ArrayList<MapRenderObject>();
System.gc(); // to clear previous objects
Set<Long> ids = new LinkedHashSet<Long>();
Map<Integer, List<MapRenderObject>> multiPolygons = new LinkedHashMap<Integer, List<MapRenderObject>>();
for (Connection c : connections.keySet()) {
RectF r = connections.get(c);
boolean intersects = r.top >= cBottomLatitude && r.left <= cRightLongitude && r.right >= cLeftLongitude &&
@ -302,18 +303,32 @@ public class MapRenderRepositories {
}
ids.add(id);
}
int type = result.getInt(4);
MapRenderObject obj = new MapRenderObject(id);
obj.setData(result.getBytes(2));
obj.setName(result.getString(3));
obj.setType(result.getInt(4));
obj.setType(type);
count++;
cObjects.add(obj);
if((type & 0x3) == 0){
// multy polygon
if(!multiPolygons.containsKey(type)){
multiPolygons.put(type, new ArrayList<MapRenderObject>());
}
multiPolygons.get(type).add(obj);
} else {
cObjects.add(obj);
}
}
} finally {
result.close();
}
}
int leftX = MapUtils.get31TileNumberX(cLeftLongitude);
int rightX = MapUtils.get31TileNumberX(cRightLongitude);
int bottomY = MapUtils.get31TileNumberY(cBottomLatitude);
int topY = MapUtils.get31TileNumberY(cTopLatitude);
proccessMultiPolygons(multiPolygons, leftX, rightX, bottomY, topY);
log.info(String
.format("Search has been done in %s ms. %s results were found.", System.currentTimeMillis() - now, count)); //$NON-NLS-1$
} catch (java.sql.SQLException e) {
@ -337,6 +352,132 @@ public class MapRenderRepositories {
}
}
public void proccessMultiPolygons(Map<Integer, List<MapRenderObject>> multyPolygons, int leftX, int rightX, int bottomY, int topY){
for (Integer type : multyPolygons.keySet()) {
List<MapRenderObject> list = multyPolygons.get(type);
List<List<Long>> completedRings = new ArrayList<List<Long>>();
List<List<Long>> incompletedRings = new ArrayList<List<Long>>();
for (MapRenderObject o : list) {
int len = o.getPointsLength();
if(len < 2){
continue;
}
List<Long> coordinates = new ArrayList<Long>(len/2);
int px = o.getPoint31XTile(0);
int py = o.getPoint31YTile(0);
int x = px;
int y = py;
boolean inside = leftX <= x && x <= rightX && y >= topY && y <= bottomY;
if(inside){
coordinates.add((((long) x) << 32) | ((long) y));
}
for (int i = 1; i < len; i++) {
x = o.getPoint31XTile(i);
y = o.getPoint31YTile(i);
boolean tinside = leftX <= x && x <= rightX && y >= topY && y <= bottomY;
if(inside){
if(tinside){
coordinates.add((((long) x) << 32) | ((long) y));
} else {
int by = -1;
int bx = -1;
if(by == -1 && y < topY && py >= topY){
int tx = (int) (px + ((double) (x - px) * (topY - py)) / (y - py));
if(leftX <= tx && tx <= rightX){
bx = tx;
by = topY;
}
}
if(by == -1 && y > bottomY && py <= bottomY){
int tx = (int) (px + ((double) (x - px) * (py - bottomY)) / (py - y));
if(leftX <= tx && tx <= rightX){
bx = tx;
by = bottomY;
}
}
if(by == -1 && x < leftX && px >= leftX){
by = (int) (py + ((double) (y - py) * (leftX - px)) / (x - px));
bx = leftX;
}
if(by == -1 && x > rightX && px <= rightX){
by = (int) (py + ((double) (y - py) * (px - rightX)) / (px - x));
bx = rightX;
}
coordinates.add((((long) bx) << 32) | ((long) by));
}
} else if(tinside){
int by = -1;
int bx = -1;
if(by == -1 && py < topY && y >= topY){
int tx = (int) (px + ((double)(x-px)*(topY - py))/(y-py));
if(leftX <= tx && tx <= rightX){
bx = tx;
by = topY;
}
}
if(by == -1 && py > bottomY && y <= bottomY){
int tx = (int) (px + ((double) (x - px) * (py - bottomY)) / (py - y));
if(leftX <= tx && tx <= rightX){
bx = tx;
by = bottomY;
}
}
if(by == -1 && px < leftX && x >= leftX){
by = (int) (py + ((double)(y-py)*(leftX - px))/(x-px));
bx = leftX;
}
if(by == -1 && px > rightX && x <= rightX){
by = (int) (py + ((double)(y-py)*(px - rightX))/(px - x));
bx = rightX;
}
coordinates.add((((long) bx) << 32) | ((long) by));
}
px = x;
py = y;
inside = tinside;
}
if(coordinates.size() > 0){
if(coordinates.get(0) == coordinates.get(coordinates.size() - 1)){
completedRings.add(coordinates);
} else {
boolean add = true;
for (int k = 0; k < incompletedRings.size(); ) {
boolean remove = false;
List<Long> i = incompletedRings.get(k);
if(coordinates.get(0) == i.get(i.size() - 1)){
i.addAll(coordinates.subList(1, coordinates.size()));
remove = true;
coordinates = i;
} else if(coordinates.get(coordinates.size() - 1) == i.get(0)){
coordinates.addAll(i.subList(1, i.size()));
remove = true;
}
if(remove){
incompletedRings.remove(k);
} else {
k++;
}
if(coordinates.get(0) == coordinates.get(coordinates.size() - 1)){
completedRings.add(coordinates);
add = false;
break;
}
}
if(add){
incompletedRings.add(coordinates);
}
}
}
}
if(incompletedRings.size() > 0){
// something wrong or start to unify by borders
// TODO
}
}
}
public Bitmap getBitmap() {
return bmp;

View file

@ -9,6 +9,7 @@ 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;
@ -42,11 +43,8 @@ public class OsmandRenderer implements Comparator<MapRenderObject> {
private TextPaint paintText;
private Paint paint;
private Paint paintShield;
private Paint paintFillEmpty;
private Paint paintIcon;
private float[] hsv = new float[3];
public static final int TILE_SIZE = 256;
@ -72,7 +70,7 @@ public class OsmandRenderer implements Comparator<MapRenderObject> {
int textShadow = 0;
int textWrap = 0;
boolean bold = false;
boolean shield = false;
int shieldRes = 0;
}
private static class IconDrawInfo {
@ -105,7 +103,6 @@ public class OsmandRenderer implements Comparator<MapRenderObject> {
// These properties are used for rendering one object
// polyline props
boolean showText = true;
boolean showTextOnPath = false;
float textSize = 0;
int textColor = 0;
@ -115,6 +112,7 @@ public class OsmandRenderer implements Comparator<MapRenderObject> {
float textDy = 0;
float textHaloRadius = 0;
boolean textBold;
int textShield = 0;
RenderingPaintProperties main = new RenderingPaintProperties();
@ -123,7 +121,6 @@ public class OsmandRenderer implements Comparator<MapRenderObject> {
RenderingPaintProperties[] adds = null;
public void clearText() {
showText = true;
showTextOnPath = false;
textSize = 0;
textColor = 0;
@ -133,6 +130,7 @@ public class OsmandRenderer implements Comparator<MapRenderObject> {
textDy = 0;
textHaloRadius = 0;
textBold = false;
textShield = 0;
}
@ -199,10 +197,6 @@ public class OsmandRenderer implements Comparator<MapRenderObject> {
paint = new Paint();
paint.setAntiAlias(true);
paintShield = new Paint();
paintShield.setAntiAlias(true);
paintFillEmpty = new Paint();
paintFillEmpty.setStyle(Style.FILL);
paintFillEmpty.setColor(clFillScreen);
@ -357,42 +351,36 @@ public class OsmandRenderer implements Comparator<MapRenderObject> {
}
// Shadow layer
// paintText.setShadowLayer(text.textShadow, 0, 0, Color.WHITE);
if(text.textShadow > 0 && text.shield){
paintText.setColor(Color.WHITE);
paintText.setTextSize(text.textSize + text.textShadow * 2);
if(text.drawOnPath != null){
cv.drawTextOnPath(text.text, text.drawOnPath, 0, text.vOffset, paintText);
} else {
cv.drawText(text.text, text.centerX, text.centerY, paintText);
}
paintText.setTextSize(text.textSize);
}
// if(text.textShadow > 0){
// paintText.setColor(Color.WHITE);
// paintText.setTextSize(text.textSize + text.textShadow * 2);
// if(text.drawOnPath != null){
// cv.drawTextOnPath(text.text, text.drawOnPath, 0, text.vOffset, paintText);
// } else {
// cv.drawText(text.text, text.centerX, text.centerY, paintText);
// }
// paintText.setTextSize(text.textSize);
// }
paintText.setColor(text.textColor);
if(text.drawOnPath != null){
cv.drawTextOnPath(text.text, text.drawOnPath, 0, text.vOffset, paintText);
} else if(text.shield){
bounds.set(text.centerX - mes / 2 - 4, text.centerY - text.textSize,
text.centerX + mes / 2 + 4, text.centerY + text.textSize / 2);
paintShield.setStyle(Style.STROKE);
paintShield.setColor(Color.WHITE);
paintShield.setStrokeWidth(3);
cv.drawOval(bounds, paintShield);
paintShield.setStyle(Style.FILL);
Color.colorToHSV(paintText.getColor(), hsv);
hsv[2] *= 0.85;
paintShield.setColor(Color.HSVToColor(hsv));
cv.drawOval(bounds, paintShield);
paintText.setFakeBoldText(true);
paintText.setColor(Color.WHITE);
cv.drawText(text.text, text.centerX, text.centerY + 3, paintText);
} else {
if(text.textWrap == 0){
// set maximum for all text
text.textWrap = 40;
}
if(text.shieldRes != 0){
if(cachedIcons.get(text.shieldRes) == null){
cachedIcons.put(text.shieldRes, BitmapFactory.decodeResource(context.getResources(), text.shieldRes));
}
Bitmap ico = cachedIcons.get(text.shieldRes);
if (ico != null) {
cv.drawBitmap(ico, text.centerX - ico.getWidth() / 2 - 1, text.centerY - text.textSize - 2, paintIcon);
}
}
if(text.text.length() > text.textWrap){
int start = 0;
int end = text.text.length();
@ -529,10 +517,17 @@ public class OsmandRenderer implements Comparator<MapRenderObject> {
path.lineTo(p.x, p.y);
}
}
if (path != null) {
xText /= obj.getPointsLength();
yText /= obj.getPointsLength();
// test hole
// path.moveTo(xText - 2, yText - 2);
// path.lineTo(xText + 2, yText + 2);
// path.lineTo(xText + 2, yText - 2);
// path.lineTo(xText - 2, yText + 2);
// path.lineTo(xText - 2, yText - 2);
rc.main.updatePaint(paint);
canvas.drawPath(path, paint);
if(rc.second.strokeWidth != 0){
@ -599,8 +594,7 @@ public class OsmandRenderer implements Comparator<MapRenderObject> {
rc.second.emptyLine();
rc.third.emptyLine();
rc.adds = null;
rc.showText = false;
rc.clearText();
PolylineRenderer.renderPolyline(type, subtype, obj.getType(), rc, this);
@ -667,72 +661,237 @@ public class OsmandRenderer implements Comparator<MapRenderObject> {
canvas.drawPath(path, paint);
}
}
if (obj.getName() != null && rc.showText) {
if(!rc.showTextOnPath){
TextDrawInfo text = new TextDrawInfo();
text.text = obj.getName();
text.centerX = xMid /2;
text.centerY = yMid /2;
text.textColor = rc.textColor;
text.textSize = rc.textSize;
text.vOffset = rc.textDy;
text.textShadow = (int) rc.textHaloRadius;
rc.textToDraw.add(text);
} else if (paintText.measureText(obj.getName()) < Math.max(Math.abs(xLength), Math.abs(yLength))) {
if (inverse) {
path.rewind();
boolean st = true;
for (int i = obj.getPointsLength() - 1; i >= 0; i--) {
PointF p = calcPoint(obj, i, rc);
if (st) {
st = false;
path.moveTo(p.x, p.y);
} else {
path.lineTo(p.x, p.y);
if (obj.getName() != null) {
String name = obj.getName();
rc.clearText();
name = renderObjectText(name, subtype, type, rc.zoom, false, rc);
if (name != null && rc.textSize > 0) {
if (!rc.showTextOnPath) {
TextDrawInfo text = new TextDrawInfo();
text.text = name;
text.bold = rc.textBold;
text.centerX = xMid / 2;
text.centerY = yMid / 2;
text.shieldRes = rc.textShield;
text.textColor = rc.textColor;
text.textSize = rc.textSize;
text.vOffset = rc.textDy;
text.textShadow = (int) rc.textHaloRadius;
rc.textToDraw.add(text);
} else /*if (paintText.measureText(obj.getName()) < Math.max(Math.abs(xLength), Math.abs(yLength)))*/ {
if (inverse) {
path.rewind();
boolean st = true;
for (int i = obj.getPointsLength() - 1; i >= 0; i--) {
PointF p = calcPoint(obj, i, rc);
if (st) {
st = false;
path.moveTo(p.x, p.y);
} else {
path.lineTo(p.x, p.y);
}
}
}
}
TextDrawInfo text = new TextDrawInfo();
text.text = obj.getName();
text.centerX = xMid /2;
text.centerY = yMid /2;
text.pathRotate = pathRotate;
text.drawOnPath = path;
text.textColor = rc.textColor;
text.textShadow = (int) rc.textHaloRadius;
text.textSize = rc.textSize;
text.vOffset = rc.main.strokeWidth / 2 - 1;
rc.textToDraw.add(text);
if(text.text.startsWith(MapRenderingTypes.REF_CHAR)){
if(text.text.length() > 5){
text.text = text.text.substring(1, 5);
} else {
text.text = text.text.substring(1);
}
text.textColor = rc.second.strokeWidth != 0 ? rc.second.color : rc.main.color;
text.shield = true;
text.drawOnPath = null;
}
TextDrawInfo text = new TextDrawInfo();
text.text = name;
text.shieldRes = rc.textShield;
text.centerX = xMid / 2;
text.centerY = yMid / 2;
text.pathRotate = pathRotate;
text.bold = rc.textBold;
text.drawOnPath = path;
text.textColor = rc.textColor;
text.textShadow = (int) rc.textHaloRadius;
text.textSize = rc.textSize;
text.vOffset = rc.main.strokeWidth / 2 - 1;
rc.textToDraw.add(text);
}
}
}
}
}
private static int[] trunkShields = new int[]{R.drawable.tru_shield1, R.drawable.tru_shield2, R.drawable.tru_shield3,
R.drawable.tru_shield4, R.drawable.tru_shield5, R.drawable.tru_shield6, R.drawable.tru_shield7,};
private static int[] motorShields = new int[]{R.drawable.mot_shield1, R.drawable.mot_shield2, R.drawable.mot_shield3,
R.drawable.mot_shield4, R.drawable.mot_shield5, R.drawable.mot_shield6, R.drawable.mot_shield7,};
private static int[] primaryShields = new int[]{R.drawable.pri_shield1, R.drawable.pri_shield2, R.drawable.pri_shield3,
R.drawable.pri_shield4, R.drawable.pri_shield5, R.drawable.pri_shield6, R.drawable.pri_shield7,};
private static int[] secondaryShields = new int[]{R.drawable.sec_shield1, R.drawable.sec_shield2, R.drawable.sec_shield3,
R.drawable.sec_shield4, R.drawable.sec_shield5, R.drawable.sec_shield6, R.drawable.sec_shield7,};
private static int[] tertiaryShields = new int[]{R.drawable.ter_shield1, R.drawable.ter_shield2, R.drawable.ter_shield3,
R.drawable.ter_shield4, R.drawable.ter_shield5, R.drawable.ter_shield6, R.drawable.ter_shield7,};
public static String renderObjectText(String name, int subType, int type, int zoom, boolean point, RenderingContext rc) {
if(name == null || name.length() == 0){
return null;
}
int textSize = 0;
int textColor = 0;
int wrapWidth = 0;
int shadowRadius = 0;
int textMinDistance = 0;
int textShield = 0;
int dy = 0;
boolean bold = false;
boolean showTextOnPath = false;
switch (type) {
case MapRenderingTypes.HIGHWAY : {
if(name.charAt(0) == MapRenderingTypes.REF_CHAR){
name = name.substring(1);
if(name.length() > 6){
name = name.substring(0, 6);
}
int len = name.length();
if(len == 0){
// skip it
} else {
textSize = 10;
textColor = Color.WHITE;
bold = true;
textMinDistance = 50;
// spacing = 750
if (subType == MapRenderingTypes.PL_HW_TRUNK) {
textShield = trunkShields[len - 1];
if(zoom < 10){
textSize = 0;
}
} else if (subType == MapRenderingTypes.PL_HW_MOTORWAY) {
textShield = motorShields[len - 1];
if(zoom < 10){
textSize = 0;
}
} else if (subType == MapRenderingTypes.PL_HW_PRIMARY) {
textShield = primaryShields[len - 1];
if(zoom < 11){
textSize = 0;
}
} else if (subType == MapRenderingTypes.PL_HW_SECONDARY) {
if(zoom < 14){
textSize = 0;
}
textShield = secondaryShields[len - 1];
} else if (subType == MapRenderingTypes.PL_HW_TERTIARY) {
if(zoom < 15){
textSize = 0;
}
textShield = tertiaryShields[len - 1];
} else {
if(zoom < 16){
textSize = 0;
} else {
showTextOnPath = true;
textColor = Color.BLACK;
textSize = 10;
textMinDistance = 20;
shadowRadius = 1;
// spacing = 750;
}
}
}
} else {
if(subType == MapRenderingTypes.PL_HW_TRUNK || subType == MapRenderingTypes.PL_HW_PRIMARY
|| subType == MapRenderingTypes.PL_HW_SECONDARY){
textColor = Color.BLACK;
showTextOnPath = true;
if(zoom == 13 && type != MapRenderingTypes.PL_HW_SECONDARY){
textSize = 8;
} else if(zoom == 14){
textSize = 9;
} else if(zoom > 14 && zoom < 17){
textSize = 10;
} else if(zoom > 16){
textSize = 12;
}
} else if(subType == MapRenderingTypes.PL_HW_TERTIARY || subType == MapRenderingTypes.PL_HW_RESIDENTIAL
|| subType == MapRenderingTypes.PL_HW_UNCLASSIFIED || subType == MapRenderingTypes.PL_HW_SERVICE){
textColor = Color.BLACK;
showTextOnPath = true;
if(zoom < 15){
textSize = 0;
} else if(zoom < 17){
textSize = 9;
} else {
textSize = 11;
}
} else if(subType < 32){
// highway subtype
if(zoom >= 16){
textColor = Color.BLACK;
showTextOnPath = true;
textSize = 9;
}
} else if(subType == 40){
// bus stop
if(zoom >= 17){
textColor = Color.BLACK;
textSize = 9;
wrapWidth = 25;
dy = 11;
}
}
}
} break;
case MapRenderingTypes.WATERWAY : {
if (subType == 1) {
if (zoom >= 15 /* && !tunnel */) {
showTextOnPath = true;
textSize = 8;
shadowRadius = 1;
textColor = 0xff6699cc;
}
} else if (subType == 2 || subType == 4) {
if (zoom > 13 /* && !tunnel */) {
textSize = 9;
showTextOnPath = true;
shadowRadius = 1;
textColor = 0xff6699cc;
textMinDistance = 200;
}
} else if (subType == 5 || subType == 6) {
if (zoom >= 15 /* && !tunnel */) {
textSize = 8;
showTextOnPath = true;
shadowRadius = 1;
textColor = 0xff6699cc;
}
} else if (subType == 12) {
if(zoom >= 15){
textColor = Color.BLACK;
textSize = 8;
shadowRadius = 1;
}
} else if (subType == 8) {
if (zoom >= 15) {
shadowRadius = 1;
textSize = 9;
textColor = 0xff0066ff;
wrapWidth = 70;
dy = 10;
}
}
}
break;
case MapRenderingTypes.AEROWAY: {
textColor = 0xff6692da;
shadowRadius = 1;
if (subType == 10) {
if(name.charAt(0) == MapRenderingTypes.REF_CHAR){
name = name.substring(1);
}
if (subType == 7 || subType == 8) {
if (zoom >= 15) {
showTextOnPath = true;
textSize = 10;
textColor = 0xff333333;
textMinDistance = 20;
shadowRadius = 1;
// spacing = 750;
}
} else if (subType == 10) {
// airport
if (zoom >= 10 && zoom <= 12) {
textSize = 9;
@ -874,18 +1033,6 @@ public class OsmandRenderer implements Comparator<MapRenderObject> {
}
}
break;
case MapRenderingTypes.WATERWAY: {
if (subType == 8) {
if (zoom >= 15) {
shadowRadius = 1;
textSize = 9;
textColor = 0xff0066ff;
wrapWidth = 70;
dy = 10;
}
}
}
break;
case MapRenderingTypes.TOURISM: {
if (subType == 9) {
if (zoom >= 16) {
@ -979,11 +1126,10 @@ public class OsmandRenderer implements Comparator<MapRenderObject> {
} else if (subType == 4 || subType == 18) {
textColor = 0xff0066ff;
shadowRadius = 1;
dy = 9;
dy = 13;
textSize = 9;
}
}
}
break;
case MapRenderingTypes.AMENITY_EDUCATION: {
@ -1004,6 +1150,9 @@ public class OsmandRenderer implements Comparator<MapRenderObject> {
} else if (subType == 1 || subType == 2 || subType == 3) {
if (zoom >= 16) {
textColor = 0xff000033;
if(subType != 1){
dy = 11;
}
textSize = 9;
wrapWidth = 16;
}
@ -1161,7 +1310,7 @@ public class OsmandRenderer implements Comparator<MapRenderObject> {
shadowRadius = 1;
textColor = 0xff734a08;
wrapWidth = 34;
dy = 9;
dy = 11;
textSize = 10;
} else if (subType >= 4 && subType <= 6) {
shadowRadius = 1;
@ -1274,6 +1423,9 @@ public class OsmandRenderer implements Comparator<MapRenderObject> {
}
rc.textColor = textColor;
rc.textSize = textSize;
rc.textMinDistance = textMinDistance;
rc.showTextOnPath = showTextOnPath;
rc.textShield = textShield;
rc.textWrapWidth = wrapWidth;
rc.textHaloRadius = shadowRadius;
rc.textBold = bold;

View file

@ -272,7 +272,7 @@ public class PointRenderer {
break;
case MapRenderingTypes.AMENITY_EDUCATION: {
if (zoom > 15) {
if (subType == 2) {
if (subType == 2 || subType == 3) {
resId = R.drawable.h_school;
} else if (subType == 4) {
resId = R.drawable.h_library;

View file

@ -161,9 +161,8 @@ public class PolygonRenderer {
rc.main.color = 0xffddbf92;
break;
case 10:
if(zoom < 8){
rc.main.fillArea = false;
} else if(zoom <= 13){
rc.main.fillArea = zoom >= 8;
if(zoom <= 13){
rc.main.color = 0xff8dc56c;
} else {
rc.main.shader = o.getShader(R.drawable.h_forest);

View file

@ -12,8 +12,6 @@ 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;
PathEffect pathEffect = null;
float strokeWidth = zoom >= 15 ? 1 : 0;
@ -145,17 +143,6 @@ public class PolylineRenderer {
}
}
}
if((carRoad && zoom > 12) || zoom > 16){
rc.showText = true;
float w = rc.main.strokeWidth + 3;
if(w < 10){
w = 10;
}
rc.textSize = w;
rc.textColor = Color.BLACK;
rc.showTextOnPath = true;
}
if (carRoad) {
if (zoom >= 15) {
@ -349,20 +336,11 @@ public class PolylineRenderer {
}
}
} else {
int layer = MapRenderingTypes.getWayLayer(objType);
boolean tunnel = layer == 1;
switch (subtype) {
case 1:
if (zoom >= 15) {
color = 0xffb5d0d0;
strokeWidth = 2;
if(!tunnel){
rc.showText = true;
rc.showTextOnPath = true;
rc.textSize = 8;
rc.textHaloRadius = 1;
rc.textColor = 0xff6699cc;
}
} else {
strokeWidth = 0;
}
@ -377,14 +355,6 @@ public class PolylineRenderer {
if (zoom == 13) {
strokeWidth = 3;
} else {
if(!tunnel){
rc.showText = true;
rc.textSize = 9;
rc.showTextOnPath = true;
rc.textHaloRadius = 1;
rc.textColor = 0xff6699cc;
rc.textMinDistance = 200;
}
if (zoom == 14) {
strokeWidth = 5;
} else if (zoom == 15 || zoom == 16) {
@ -405,13 +375,6 @@ public class PolylineRenderer {
} else if (zoom < 15) {
strokeWidth = 1;
} else {
if(!tunnel){
rc.showText = true;
rc.textSize = 8;
rc.showTextOnPath = true;
rc.textHaloRadius = 1;
rc.textColor = 0xff6699cc;
}
strokeWidth = 2;
}
break;
@ -427,12 +390,6 @@ public class PolylineRenderer {
case 12:
if (zoom >= 13) {
strokeWidth = 2;
if(zoom >= 15){
rc.showText = true;
rc.showTextOnPath = false;
rc.textSize = 8;
rc.textHaloRadius = 1;
}
} else {
strokeWidth = 0;
}

View file

@ -297,397 +297,10 @@
</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>
<Style>
<Rule>
<Filter>([highway] = 'unclassified' or [highway]='residential') and not [bridge]='yes'</Filter>
&maxscale_zoom15;
@ -698,6 +311,8 @@
&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;

View file

@ -0,0 +1,393 @@
<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-shield">
<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>
</Style>