Changeset 33936 in osm for applications/editors
- Timestamp:
- 2017-12-07T19:16:59+01:00 (7 years ago)
- Location:
- applications/editors/josm/plugins/seachart
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/seachart/jicons/examples.xml
r30931 r33936 14 14 <tag k="seamark:topmark:shape" v="cone, point up" /> 15 15 </icon> 16 <icon width="100" height="100" scale="1.0" file="notice" format="PNG" > 17 <tag k="seamark:type" v="small_craft_facility" /> 18 <tag k="seamark:small_craft_facility:category" v="fuel_station" /> 16 <icon width="100" height="100" scale="0.5" file="floodlight" format="PNG" > 17 <tag k="seamark:type" v="light_minor" /> 18 <tag k="seamark:light:category" v="floodlight" /> 19 <tag k="seamark:topmark:shape" v="arrow" /> 20 <tag k="seamark:topmark:orientation" v="45" /> 19 21 </icon> 20 22 </icons> -
applications/editors/josm/plugins/seachart/src/render/Rules.java
r33195 r33936 32 32 import s57.S57val.CatHAF; 33 33 import s57.S57val.CatLAM; 34 import s57.S57val.CatLIT; 34 35 import s57.S57val.CatLMK; 35 36 import s57.S57val.CatMOR; … … 1058 1059 case PILPNT: 1059 1060 if (Renderer.zoom >= 14) { 1060 Renderer.symbol(Beacons.LightMinor); 1061 ok = true; 1061 if (hasAttribute(Obj.LIGHTS, Att.CATLIT) && (testAttribute(Obj.LIGHTS, Att.CATLIT, CatLIT.LIT_FLDL))) { 1062 Renderer.symbol(Beacons.Floodlight); 1063 Renderer.symbol(Harbours.SignalStation); 1064 } else { 1065 Renderer.symbol(Beacons.LightMinor); 1066 } 1067 ok = true; 1062 1068 } 1063 1069 break; … … 1066 1072 } 1067 1073 if (ok) { 1074 AffineTransform tr = new AffineTransform(); 1068 1075 if (feature.objs.containsKey(Obj.TOPMAR)) { 1069 1076 AttMap topmap = feature.objs.get(Obj.TOPMAR).get(0); 1070 1077 if (topmap.containsKey(Att.TOPSHP)) { 1071 Renderer.symbol(Topmarks.Shapes.get(((ArrayList<TopSHP>) (topmap.get(Att.TOPSHP).val)).get(0)), 1072 getScheme(Obj.TOPMAR), Topmarks.LightDelta); 1078 if (hasAttribute(Obj.TOPMAR, Att.ORIENT)) { 1079 tr.rotate(Math.toRadians((Double)getAttVal(Obj.TOPMAR, Att.ORIENT))); 1080 } 1081 tr.translate(0, -20); 1082 Renderer.symbol(Topmarks.Shapes.get(((ArrayList<TopSHP>) (topmap.get(Att.TOPSHP).val)).get(0)), 1083 getScheme(Obj.TOPMAR), new Delta(Handle.BC, tr)); 1073 1084 } 1074 1085 } else if (feature.objs.containsKey(Obj.DAYMAR)) { 1075 1086 AttMap topmap = feature.objs.get(Obj.DAYMAR).get(0); 1076 1087 if (topmap.containsKey(Att.TOPSHP)) { 1077 Renderer.symbol(Topmarks.Shapes.get(((ArrayList<TopSHP>) (topmap.get(Att.TOPSHP).val)).get(0)), 1078 getScheme(Obj.DAYMAR), Topmarks.LightDelta); 1088 if (hasAttribute(Obj.DAYMAR, Att.ORIENT)) { 1089 tr.rotate(Math.toRadians((Double)getAttVal(Obj.DAYMAR, Att.ORIENT))); 1090 } 1091 tr.translate(0, -20); 1092 Renderer.symbol(Topmarks.Shapes.get(((ArrayList<TopSHP>) (topmap.get(Att.TOPSHP).val)).get(0)), 1093 getScheme(Obj.DAYMAR), new Delta(Handle.BC, tr)); 1079 1094 } 1080 1095 } -
applications/editors/josm/plugins/seachart/src/render/Signals.java
r33724 r33936 397 397 } 398 398 } 399 Renderer.symbol(Beacons.LightFlare, new Scheme(LightColours.get(col)), 399 if (!(hasAttribute(Obj.LIGHTS, Att.CATLIT) && (testAttribute(Obj.LIGHTS, Att.CATLIT, CatLIT.LIT_FLDL)))) { 400 Renderer.symbol(Beacons.LightFlare, new Scheme(LightColours.get(col)), 400 401 new Delta(Handle.BC, AffineTransform.getRotateInstance(Math.toRadians(120)))); 402 } 401 403 if (Renderer.zoom >= 12) { 402 404 String str = ""; -
applications/editors/josm/plugins/seachart/src/s57/S57val.java
r33724 r33936 986 986 public enum TopSHP { TOP_UNKN, TOP_CONE, TOP_ICONE, TOP_SPHR, TOP_ISD, TOP_CAN, TOP_BORD, TOP_SALT, TOP_CROS, TOP_CUBE, TOP_WEST, TOP_EAST, TOP_RHOM, 987 987 TOP_NORTH, TOP_SOUTH, TOP_BESM, TOP_IBESM, TOP_FLAG, TOP_SPRH, TOP_SQUR, TOP_HRECT, TOP_VRECT, TOP_TRAP, TOP_ITRAP, TOP_TRI, TOP_ITRI, TOP_CIRC, 988 TOP_CRSS, TOP_T, TOP_TRCL, TOP_CRCL, TOP_RHCL, TOP_CLTR, TOP_OTHR, TOP_CYSP, TOP_COSP } 988 TOP_CRSS, TOP_T, TOP_TRCL, TOP_CRCL, TOP_RHCL, TOP_CLTR, TOP_OTHR, TOP_CYSP, TOP_COSP, TOP_ARRW } 989 989 990 990 private static final EnumMap<TopSHP, S57enum> Topshp = new EnumMap<>(TopSHP.class); static { … … 1001 1001 Topshp.put(TopSHP.TOP_T, new S57enum(28, "t-shape")); Topshp.put(TopSHP.TOP_TRCL, new S57enum(29, "triangle, point up over circle")); Topshp.put(TopSHP.TOP_CRCL, new S57enum(30, "upright cross over circle")); 1002 1002 Topshp.put(TopSHP.TOP_RHCL, new S57enum(31, "rhombus over circle")); Topshp.put(TopSHP.TOP_CLTR, new S57enum(32, "circle over triangle, point up")); Topshp.put(TopSHP.TOP_OTHR, new S57enum(33, "other")); 1003 Topshp.put(TopSHP.TOP_CYSP, new S57enum(34, "cylinder over sphere")); Topshp.put(TopSHP.TOP_ COSP, new S57enum(35, "cone, point up over sphere"));1003 Topshp.put(TopSHP.TOP_CYSP, new S57enum(34, "cylinder over sphere")); Topshp.put(TopSHP.TOP_ARRW, new S57enum(99, "arrow")); 1004 1004 } 1005 1005 -
applications/editors/josm/plugins/seachart/src/symbols/Beacons.java
r33199 r33936 61 61 Cairn.add(new Instr(Form.ELPS, new Ellipse2D.Double(-43, -40, 40, 40))); 62 62 Cairn.add(new Instr(Form.ELPS, new Ellipse2D.Double(-18, -70, 36, 36))); 63 } 64 65 public static final Symbol Floodlight = new Symbol(); 66 static { 67 Floodlight.add(new Instr(Form.BBOX, new Rectangle2D.Double(-20, -100, 100, 100))); 68 Floodlight.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND))); 69 Floodlight.add(new Instr(Form.FILL, new Color(0xffa000))); 70 Path2D.Double p = new Path2D.Double(); p.moveTo(0, 0); p.lineTo(-34, -15); p.quadTo(-35, -31, -20, -31); p.lineTo(0, 0); 71 p.moveTo(-20, -31); p.quadTo(-13, -44, 0, -36); p.lineTo(0, 0); 72 p.moveTo(0, -36); p.quadTo(13, -44, 20, -31); p.lineTo(0, 0); 73 p.moveTo(20, -31); p.quadTo(35, -31, 34, -15); p.lineTo(0, 0); 74 Floodlight.add(new Instr(Form.PLIN, p)); 63 75 } 64 76 -
applications/editors/josm/plugins/seachart/src/symbols/Harbours.java
r32907 r33936 231 231 static { 232 232 SignalStation.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 233 SignalStation.add(new Instr(Form.ELPS, new Ellipse2D.Double(-2 5, -25, 50, 50)));233 SignalStation.add(new Instr(Form.ELPS, new Ellipse2D.Double(-20, -20, 40, 40))); 234 234 SignalStation.add(new Instr(Form.RSHP, new Ellipse2D.Double(-4, -4, 8, 8))); 235 235 } -
applications/editors/josm/plugins/seachart/src/symbols/Topmarks.java
r33199 r33936 32 32 public static final Symbol RadarReflector = new Symbol(); 33 33 static { 34 RadarReflector.add(new Instr(Form.BBOX, new Rectangle2D.Double(-50, -40, 100, 40))); 35 RadarReflector.add(new Instr(Form.STRK, new BasicStroke(6, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 36 RadarReflector.add(new Instr(Form.FILL, Color.black)); 37 Path2D.Double p = new Path2D.Double(); p.moveTo(-30, -3); p.quadTo(0, -40, 30, -3); p.moveTo(0, -20); p.lineTo(0, -37); 38 p.moveTo(-30, -3); p.lineTo(-43, -14); p.moveTo(30, -3); p.lineTo(44, -14); p.moveTo(-15, -14); p.lineTo(-25, -30); p.moveTo(15, -14); p.lineTo(25, -30); 39 RadarReflector.add(new Instr(Form.PLIN, p)); 34 RadarReflector.add(new Instr(Form.BBOX, new Rectangle2D.Double(-50, -40, 100, 40))); 35 RadarReflector.add(new Instr(Form.STRK, new BasicStroke(6, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 36 RadarReflector.add(new Instr(Form.FILL, Color.black)); 37 Path2D.Double p = new Path2D.Double(); p.moveTo(-30, -3); p.quadTo(0, -40, 30, -3); p.moveTo(0, -20); p.lineTo(0, -37); 38 p.moveTo(-30, -3); p.lineTo(-43, -14); p.moveTo(30, -3); p.lineTo(44, -14); p.moveTo(-15, -14); p.lineTo(-25, -30); p.moveTo(15, -14); p.lineTo(25, -30); 39 RadarReflector.add(new Instr(Form.PLIN, p)); 40 } 41 42 public static final Symbol TopArrow = new Symbol(); 43 static { 44 TopArrow.add(new Instr(Form.BBOX, new Rectangle2D.Double(-20, -80, 40, 80))); 45 TopArrow.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 46 TopArrow.add(new Instr(Form.FILL, Color.black)); 47 Path2D.Double p = new Path2D.Double(); p.moveTo(0, 0); p.lineTo(0, -25); p.lineTo(-10, -25); p.lineTo(-10, -43); 48 p.lineTo(0, -50); p.lineTo(10, -43); p.lineTo(10, -25); p.lineTo(0, -25); 49 TopArrow.add(new Instr(Form.PLIN, p)); 40 50 } 41 51 … … 527 537 Shapes.put(TopSHP.TOP_CIRC, TopCircle); Shapes.put(TopSHP.TOP_CRSS, TopCrosses); Shapes.put(TopSHP.TOP_T, TopT); Shapes.put(TopSHP.TOP_TRCL, TopTriangleCircle); 528 538 Shapes.put(TopSHP.TOP_CRCL, TopCrossCircle); Shapes.put(TopSHP.TOP_RHCL, TopRhombusCircle); Shapes.put(TopSHP.TOP_CLTR, TopCircleTriangle); 529 Shapes.put(TopSHP.TOP_CYSP, TopCanSphere); Shapes.put(TopSHP.TOP_OTHR, TopOther); 539 Shapes.put(TopSHP.TOP_CYSP, TopCanSphere); Shapes.put(TopSHP.TOP_OTHR, TopOther); Shapes.put(TopSHP.TOP_ARRW, TopArrow); 530 540 } 531 541 … … 545 555 public static final Delta FloatDelta = new Delta(Handle.BC, AffineTransform.getTranslateInstance(0.0, -42.0)); 546 556 public static final Delta BeaconDelta = new Delta(Handle.BC, AffineTransform.getTranslateInstance(0.0, -70.0)); 547 public static final Delta LightDelta = new Delta(Handle.BC, AffineTransform.getTranslateInstance(0.0, -20.0));548 557 // CHECKSTYLE.ON: SingleSpaceSeparator 549 558 }
Note:
See TracChangeset
for help on using the changeset viewer.