Changeset 30025 in osm for applications/editors/josm/plugins/smed2/src/seamap/Rules.java
- Timestamp:
- 2013-10-18T11:30:13+02:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/smed2/src/seamap/Rules.java
r30024 r30025 34 34 ArrayList<Feature> objects; 35 35 if ((objects = map.features.get(Obj.SLCONS)) != null) for (Feature feature : objects) shoreline(feature); 36 if ((objects = map.features.get(Obj.SLCONS)) != null) for (Feature feature : objects) shoreline(feature);;37 36 if ((objects = map.features.get(Obj.PIPSOL)) != null) for (Feature feature : objects) pipelines(feature); 38 37 if ((objects = map.features.get(Obj.CBLSUB)) != null) for (Feature feature : objects) cables(feature); … … 62 61 if ((objects = map.features.get(Obj.ACHARE)) != null) for (Feature feature : objects) harbours(feature); 63 62 if ((objects = map.features.get(Obj.ACHBRT)) != null) for (Feature feature : objects) harbours(feature); 63 if ((objects = map.features.get(Obj.BERTHS)) != null) for (Feature feature : objects) harbours(feature); 64 64 if ((objects = map.features.get(Obj.LOKBSN)) != null) for (Feature feature : objects) locks(feature); 65 65 if ((objects = map.features.get(Obj.LKBSPT)) != null) for (Feature feature : objects) locks(feature); … … 245 245 246 246 } 247 /* Att_t *attv = getAtt(getObj(item, BRIDGE, 0), VERCLR); 247 /* case BRIDGE: { 248 Att_t *attv = getAtt(getObj(item, BRIDGE, 0), VERCLR); 248 249 if (attv == NULL) attv = getAtt(getObj(item, BRIDGE, 0), VERCSA); 249 250 Att_t *attc = getAtt(getObj(item, BRIDGE, 0), VERCCL); … … 254 255 } 255 256 else if ((attc != NULL) && (atto == NULL)) { 257 char *string=strdup(stringValue(attc->val)); 258 string = realloc(string, strlen(string) + 3); strcat(string, "/-"); 256 259 renderSymbol(item, obja, "clear_v", "", "", CC, 0, 0, 0); 257 drawText(item, stringValue(attc->val), "font-family:Arial; font-weight:normal; font-size:70; text-anchor:middle", 0, 12); 260 drawText(item, string, "font-family:Arial; font-weight:normal; font-size:70; text-anchor:middle", 0, 12); 261 free(string); 258 262 } 259 263 else if ((attc != NULL) && (atto != NULL)) { 260 renderSymbol(item, obja, "clear_v", "", "", RC, 5, 0, 0); 261 drawText(item, stringValue(attc->val), "font-family:Arial; font-weight:normal; font-size:70; text-anchor:middle", -35, 12); 262 renderSymbol(item, obja, "clear_v", "", "", LC, -5, 0, 0); 263 drawText(item, stringValue(atto->val), "font-family:Arial; font-weight:normal; font-size:70; text-anchor:middle", 35, 12); 264 char *string=strdup(stringValue(attc->val)); 265 string = realloc(string, strlen(string) + 2); strcat(string, "/"); 266 string = realloc(string, strlen(string) + strlen(stringValue(atto->val)) + 1); strcat(string, stringValue(atto->val)); 267 renderSymbol(item, obja, "clear_v", "", "", CC, 0, 0, 0); 268 drawText(item, string, "font-family:Arial; font-weight:normal; font-size:60; text-anchor:middle", 0, 10); 269 free(string); 264 270 } 265 271 } … … 318 324 if (radius != 0) { 319 325 UniHLU units = (UniHLU)Renderer.getAttVal(feature, Obj.ACHBRT, 0, Att.HUNITS); 320 Renderer.lineCircle (feature, new LineStyle(new Color(0xc480ff), 10, new float[] { 25, 25}, null), radius, units);326 Renderer.lineCircle (feature, new LineStyle(new Color(0xc480ff), 4, new float[] { 10, 10 }, null), radius, units); 321 327 } 322 328 break; … … 366 372 break; 367 373 } 374 } 375 break; 376 case BERTHS: 377 if (zoom >= 14) { 378 Renderer.labelText(feature, name == null ? " " : (String) name.val, new Font("Arial", Font.PLAIN, 40), LabelStyle.RRCT, new Color(0xc480ff), Color.white, null); 368 379 } 369 380 break; … … 895 906 break; 896 907 case ROS_VAIS: 897 Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 80)));908 Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 70))); 898 909 break; 899 910 case ROS_VANC: 900 Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 80)));911 Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 70))); 901 912 Renderer.symbol(feature, Topmarks.TopNorth, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25)), null); 902 913 break; 903 914 case ROS_VASC: 904 Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 80)));915 Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 70))); 905 916 Renderer.symbol(feature, Topmarks.TopSouth, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25)), null); 906 917 break; 907 918 case ROS_VAEC: 908 Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 80)));919 Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 70))); 909 920 Renderer.symbol(feature, Topmarks.TopEast, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25)), null); 910 921 break; 911 922 case ROS_VAWC: 912 Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 80)));923 Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 70))); 913 924 Renderer.symbol(feature, Topmarks.TopWest, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25)), null); 914 925 break; 915 926 case ROS_VAPL: 916 Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 80)));927 Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 70))); 917 928 Renderer.symbol(feature, Topmarks.TopCan, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25)), null); 918 929 break; 919 930 case ROS_VASL: 920 Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 80)));931 Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 70))); 921 932 Renderer.symbol(feature, Topmarks.TopCone, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25)), null); 922 933 break; 923 934 case ROS_VAID: 924 Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 80)));935 Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 70))); 925 936 Renderer.symbol(feature, Topmarks.TopIsol, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25)), null); 926 937 break; 927 938 case ROS_VASW: 928 Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 80)));939 Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 70))); 929 940 Renderer.symbol(feature, Topmarks.TopSphere, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25)), null); 930 941 break; 931 942 case ROS_VASP: 932 Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 80)));943 Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 70))); 933 944 Renderer.symbol(feature, Topmarks.TopX, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25)), null); 934 945 break; 935 946 case ROS_VAWK: 936 Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 80)));947 Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 70))); 937 948 Renderer.symbol(feature, Topmarks.TopCross, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25)), null); 938 949 break; 939 950 } 940 951 } 941 if (!str.isEmpty()) Renderer.labelText(feature, str, new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BR, AffineTransform.getTranslateInstance(-30, - 80)));952 if (!str.isEmpty()) Renderer.labelText(feature, str, new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BR, AffineTransform.getTranslateInstance(-30, -70))); 942 953 break; 943 954 case RADSTA:
Note:
See TracChangeset
for help on using the changeset viewer.