Changeset 33949 in osm


Ignore:
Timestamp:
2017-12-10T13:59:43+01:00 (7 years ago)
Author:
malcolmh
Message:

arrow topmark

Location:
applications/editors/josm
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/seachart/jicons/examples.xml

    r33947 r33949  
    2323    <tag k="seamark:type" v="light" />
    2424    <tag k="seamark:light:category" v="floodlight" />
     25  </icon>
     26  <icon width="100" height="150" scale="0.5" file="beacon" format="PNG" >
     27    <tag k="seamark:type" v="beacon_lateral" />
     28    <tag k="seamark:beacon_lateral:shape" v="stake" />
     29    <tag k="seamark:light:category" v="floodlight" />
    2530    <tag k="seamark:topmark:shape" v="arrow" />
     31    <tag k="seamark:topmark:status" v="illuminated" />
    2632    <tag k="seamark:topmark:orientation" v="45" />
    2733  </icon>
  • applications/editors/josm/plugins/seachart/src/render/Rules.java

    r33947 r33949  
    555555                        } else {
    556556                                Renderer.symbol(Beacons.Shapes.get(shape), getScheme(feature.type));
    557                                 AffineTransform tr = new AffineTransform(Topmarks.BeaconDelta.t);
    558557                                if (feature.objs.containsKey(Obj.TOPMAR)) {
    559558                                        AttMap topmap = feature.objs.get(Obj.TOPMAR).get(0);
     
    563562                                        if (topmap.containsKey(Att.TOPSHP)) {
    564563                                                if (topmap.containsKey(Att.ORIENT)) {
    565                                                         tr.rotate(Math.toRadians((Double)topmap.get(Att.ORIENT).val));
     564//                                                      tr.rotate(Math.toRadians((Double)topmap.get(Att.ORIENT).val));
    566565                                                }
    567                                                 Renderer.symbol(Topmarks.Shapes.get(((ArrayList<TopSHP>) (topmap.get(Att.TOPSHP).val)).get(0)), getScheme(Obj.TOPMAR), new Delta(Handle.BC, tr));
     566                                                Renderer.symbol(Topmarks.Shapes.get(((ArrayList<TopSHP>) (topmap.get(Att.TOPSHP).val)).get(0)), getScheme(Obj.TOPMAR), Topmarks.BeaconDelta);
    568567                                        }
    569568                                } else if (feature.objs.containsKey(Obj.DAYMAR)) {
    570569                                        AttMap topmap = feature.objs.get(Obj.DAYMAR).get(0);
    571                                         if (topmap.containsKey(Att.STATUS) && (testAttribute(Obj.DAYMAR, Att.STATUS, StsSTS.STS_ILLD))) {
    572                                                 Renderer.symbol(Beacons.Floodlight);
    573                                         }
    574570                                        if (topmap.containsKey(Att.TOPSHP)) {
    575                                                 if (topmap.containsKey(Att.ORIENT)) {
    576                                                         tr.rotate(Math.toRadians((Double)topmap.get(Att.ORIENT).val));
    577                                                 }
    578                                                 Renderer.symbol(Topmarks.Shapes.get(((ArrayList<TopSHP>) (topmap.get(Att.TOPSHP).val)).get(0)), getScheme(Obj.DAYMAR), new Delta(Handle.BC, tr));
     571                                                Renderer.symbol(Topmarks.Shapes.get(((ArrayList<TopSHP>) (topmap.get(Att.TOPSHP).val)).get(0)), getScheme(Obj.DAYMAR), Topmarks.BeaconDelta);
    579572                                        }
    580573                                }
     
    1006999                        if (Renderer.zoom >= 14) {
    10071000                                if (hasAttribute(Obj.LIGHTS, Att.CATLIT) && (testAttribute(Obj.LIGHTS, Att.CATLIT, CatLIT.LIT_FLDL))) {
    1008                                         Renderer.symbol(Beacons.Floodlight);
     1001                                        Renderer.symbol(Beacons.Floodlight, new Delta(Handle.CC, AffineTransform.getRotateInstance(Math.toRadians(180))));
    10091002                                        Renderer.symbol(Harbours.SignalStation);
    10101003                                } else {
     
    10181011                }
    10191012                if (ok) {
    1020                         AffineTransform tr = new AffineTransform();
    10211013                        if (feature.objs.containsKey(Obj.TOPMAR)) {
    10221014                                if (hasAttribute(Obj.TOPMAR, Att.STATUS) && (testAttribute(Obj.TOPMAR, Att.STATUS, StsSTS.STS_ILLD))) {
     
    10251017                                AttMap topmap = feature.objs.get(Obj.TOPMAR).get(0);
    10261018                                if (topmap.containsKey(Att.TOPSHP)) {
    1027                                         if (topmap.containsKey(Att.ORIENT)) {
    1028                                                 tr.rotate(Math.toRadians((Double)topmap.get(Att.ORIENT).val));
    1029                                         }
    1030                                         tr.concatenate(Topmarks.LightDelta.t);
    1031                                         Renderer.symbol(Topmarks.Shapes.get(((ArrayList<TopSHP>) (topmap.get(Att.TOPSHP).val)).get(0)), getScheme(Obj.TOPMAR), new Delta(Handle.BC, tr));
     1019                                        Renderer.symbol(Topmarks.Shapes.get(((ArrayList<TopSHP>) (topmap.get(Att.TOPSHP).val)).get(0)), getScheme(Obj.TOPMAR), Topmarks.LightDelta);
    10321020                                }
    10331021                        } else if (feature.objs.containsKey(Obj.DAYMAR)) {
    1034                                 if (hasAttribute(Obj.DAYMAR, Att.STATUS) && (testAttribute(Obj.DAYMAR, Att.STATUS, StsSTS.STS_ILLD))) {
    1035                                         Renderer.symbol(Beacons.Floodlight);
    1036                                 }
    10371022                                AttMap topmap = feature.objs.get(Obj.DAYMAR).get(0);
    10381023                                if (topmap.containsKey(Att.TOPSHP)) {
    1039                                         if (topmap.containsKey(Att.ORIENT)) {
    1040                                                 tr.rotate(Math.toRadians((Double)topmap.get(Att.ORIENT).val));
    1041                                         }
    1042                                         tr.concatenate(Topmarks.LightDelta.t);
    1043                                         Renderer.symbol(Topmarks.Shapes.get(((ArrayList<TopSHP>) (topmap.get(Att.TOPSHP).val)).get(0)), getScheme(Obj.DAYMAR), new Delta(Handle.BC, tr));
     1024                                        Renderer.symbol(Topmarks.Shapes.get(((ArrayList<TopSHP>) (topmap.get(Att.TOPSHP).val)).get(0)), getScheme(Obj.DAYMAR), Topmarks.LightDelta);
    10441025                                }
    10451026                        }
  • applications/editors/josm/plugins/seachart/src/symbols/Beacons.java

    r33936 r33949  
    6565    public static final Symbol Floodlight = new Symbol();
    6666    static {
    67         Floodlight.add(new Instr(Form.BBOX, new Rectangle2D.Double(-20, -100, 100, 100)));
     67        Floodlight.add(new Instr(Form.BBOX, new Rectangle2D.Double(-50, -50, 100, 100)));
    6868        Floodlight.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND)));
    6969        Floodlight.add(new Instr(Form.FILL, new Color(0xffa000)));
  • applications/editors/josm/plugins/seachart/src/symbols/Topmarks.java

    r33943 r33949  
    4545        TopArrow.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
    4646        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);
     47      Path2D.Double p = new Path2D.Double(); p.moveTo(0, 0); p.lineTo(0, -30); p.lineTo(-25, -30); p.lineTo(-30, -20); p.lineTo(-25, -10); p.lineTo(0, -10);
    4948        TopArrow.add(new Instr(Form.PLIN, p));
    5049    }
Note: See TracChangeset for help on using the changeset viewer.