Changeset 29787 in osm for applications


Ignore:
Timestamp:
2013-07-29T13:53:22+02:00 (11 years ago)
Author:
malcolmh
Message:

save

Location:
applications/editors/josm/plugins/smed2/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/smed2/src/s57/S57att.java

    r29266 r29787  
    2424          APTREF, SHPTYP, UPDMSG, ADDMRK, CATBNK, CATNMK, CATBRT, CATBUN, CATCCL, CATCOM, CATHBR, CATRFD, CATTML, CATGAG, CATVTR, CATTAB, CATEXS, CATWWM, LG_SPD, LG_SPR,
    2525          LG_BME, LG_LGS, LG_DRT, LG_WDP, LG_WDU, LG_REL, LG_FNC, LG_DES, LG_PBR, LC_CSI, LC_CSE, LC_ASI, LC_ASE, LC_CCI, LC_CCE, LC_BM1, LC_BM2, LC_LG1, LC_LG2, LC_DR1,
    26           LC_DR2, LC_SP1, LC_SP2, LC_WD1, LC_WD2, LITRAD
     26          LC_DR2, LC_SP1, LC_SP2, LC_WD1, LC_WD2, LITRAD, AISCLS
    2727        }
    2828
  • applications/editors/josm/plugins/smed2/src/s57/S57val.java

    r29266 r29787  
    170170                Catgat.put(CatGAT.GAT_LOCK, new S57enum(4, "lock")); Catgat.put(CatGAT.GAT_DYKE, new S57enum(5, "dyke")); Catgat.put(CatGAT.GAT_SLUC, new S57enum(6, "sluice"));
    171171        }
    172         public enum CatHAF { HAF_UNKN, HAF_RORO, HAF_TMBR, HAF_FERY, HAF_FISH, HAF_YCHT, HAF_NAVL, HAF_TNKR, HAF_PSGR, HAF_YARD, HAF_CNTR, HAF_BULK, HAF_SYNC, HAF_STCR, HAF_MRNA, HAF_REPR, HAF_QUAR }
     172        public enum CatHAF { HAF_UNKN, HAF_RORO, HAF_TMBR, HAF_FERY, HAF_FISH, HAF_MRNA, HAF_NAVL, HAF_TNKR, HAF_PSGR, HAF_YARD, HAF_CNTR, HAF_BULK, HAF_SYNC, HAF_STCR, HAF_LUVB,
     173                HAF_REPR, HAF_QUAR, HAF_SPLN, HAF_CARG, HAF_OFFS, HAF_SSUP, HAF_MANF }
    173174        private static final EnumMap<CatHAF, S57enum> Cathaf = new EnumMap<CatHAF, S57enum>(CatHAF.class); static { Cathaf.put(CatHAF.HAF_UNKN, new S57enum(0, ""));
    174                 Cathaf.put(CatHAF.HAF_RORO, new S57enum(1, "roro")); Cathaf.put(CatHAF.HAF_TMBR, new S57enum(2, "timber")); Cathaf.put(CatHAF.HAF_FERY, new S57enum(3, "ferry"));
    175                 Cathaf.put(CatHAF.HAF_FISH, new S57enum(4, "fishing")); Cathaf.put(CatHAF.HAF_YCHT, new S57enum(5, "yacht")); Cathaf.put(CatHAF.HAF_NAVL, new S57enum(6, "naval"));
    176                 Cathaf.put(CatHAF.HAF_TNKR, new S57enum(7, "tanker")); Cathaf.put(CatHAF.HAF_PSGR, new S57enum(8, "passenger")); Cathaf.put(CatHAF.HAF_YARD, new S57enum(9, "shipyard"));
    177                 Cathaf.put(CatHAF.HAF_CNTR, new S57enum(10, "container")); Cathaf.put(CatHAF.HAF_BULK, new S57enum(11, "bulk")); Cathaf.put(CatHAF.HAF_SYNC, new S57enum(12, "syncrolift"));
    178                 Cathaf.put(CatHAF.HAF_STCR, new S57enum(13, "straddle_carrier")); Cathaf.put(CatHAF.HAF_MRNA, new S57enum(14, "marina")); Cathaf.put(CatHAF.HAF_REPR, new S57enum(16, "service_repair"));
    179                 Cathaf.put(CatHAF.HAF_QUAR, new S57enum(17, "quarantine"));
     175                Cathaf.put(CatHAF.HAF_RORO, new S57enum(1, "roro")); Cathaf.put(CatHAF.HAF_FERY, new S57enum(3, "ferry")); Cathaf.put(CatHAF.HAF_FISH, new S57enum(4, "fishing"));
     176                Cathaf.put(CatHAF.HAF_MRNA, new S57enum(5, "marina")); Cathaf.put(CatHAF.HAF_NAVL, new S57enum(6, "naval")); Cathaf.put(CatHAF.HAF_TNKR, new S57enum(7, "tanker"));
     177                Cathaf.put(CatHAF.HAF_PSGR, new S57enum(8, "passenger")); Cathaf.put(CatHAF.HAF_YARD, new S57enum(9, "shipyard")); Cathaf.put(CatHAF.HAF_CNTR, new S57enum(10, "container"));
     178                Cathaf.put(CatHAF.HAF_BULK, new S57enum(11, "bulk")); Cathaf.put(CatHAF.HAF_SYNC, new S57enum(12, "syncrolift")); Cathaf.put(CatHAF.HAF_STCR, new S57enum(13, "straddle_carrier"));
     179                Cathaf.put(CatHAF.HAF_LUVB, new S57enum(14, "lay_up")); Cathaf.put(CatHAF.HAF_TMBR, new S57enum(15, "timber")); Cathaf.put(CatHAF.HAF_REPR, new S57enum(16, "service_repair"));
     180                Cathaf.put(CatHAF.HAF_QUAR, new S57enum(17, "quarantine")); Cathaf.put(CatHAF.HAF_SPLN, new S57enum(18, "seaplane")); Cathaf.put(CatHAF.HAF_CARG, new S57enum(19, "cargo"));
     181                Cathaf.put(CatHAF.HAF_OFFS, new S57enum(20, "offshore_support"));  Cathaf.put(CatHAF.HAF_OFFS, new S57enum(21, "port_support_base"));
     182                Cathaf.put(CatHAF.HAF_MANF, new S57enum(22, "marina_no_facilities"));
    180183        }
    181184        public enum CatHLK { HLK_UNKN, HLK_REST, HLK_HIST, HLK_MUSM, HLK_ACCM, HLK_BWTR, HLK_CSNO }
     
    312315                Catrtb.put(CatRTB.RTB_RAMK, new S57enum(1, "ramark")); Catrtb.put(CatRTB.RTB_RACN, new S57enum(2, "racon")); Catrtb.put(CatRTB.RTB_LDG, new S57enum(3, "leading"));
    313316        }
    314         public enum CatROS { ROS_UNKN, ROS_OMNI, ROS_DIRL, ROS_ROTP, ROS_CNSL, ROS_RDF, ROS_QTA, ROS_AERO, ROS_DECA, ROS_LORN, ROS_DAPS, ROS_TORN, ROS_OMGA, ROS_SYLD, ROS_CHKA }
     317        public enum CatROS { ROS_UNKN, ROS_OMNI, ROS_DIRL, ROS_ROTP, ROS_CNSL, ROS_RDF, ROS_QTA, ROS_AERO, ROS_DECA, ROS_LORN, ROS_DGPS, ROS_TORN, ROS_OMGA, ROS_SYLD, ROS_CHKA,
     318                ROS_PCOM, ROS_COMB, ROS_FACS, ROS_TIME, ROS_PAIS, ROS_SAIS, ROS_VAIS, ROS_VANC, ROS_VASC, ROS_VAEC, ROS_VAWC, ROS_VAPL, ROS_VASL, ROS_VAID, ROS_VASW, ROS_VASP, ROS_VAWK }
    315319        private static final EnumMap<CatROS, S57enum> Catros = new EnumMap<CatROS, S57enum>(CatROS.class); static { Catros.put(CatROS.ROS_UNKN, new S57enum(0, ""));
    316320                Catros.put(CatROS.ROS_OMNI, new S57enum(1, "omnidirectional")); Catros.put(CatROS.ROS_DIRL, new S57enum(2, "directional"));     Catros.put(CatROS.ROS_ROTP, new S57enum(3, "rotating_pattern"));
    317321                Catros.put(CatROS.ROS_CNSL, new S57enum(4, "consol")); Catros.put(CatROS.ROS_RDF, new S57enum(5, "rdf")); Catros.put(CatROS.ROS_QTA, new S57enum(6, "qtg"));
    318322                Catros.put(CatROS.ROS_AERO, new S57enum(7, "aeronautical")); Catros.put(CatROS.ROS_DECA, new S57enum(8, "decca")); Catros.put(CatROS.ROS_LORN, new S57enum(9, "loran"));
    319                 Catros.put(CatROS.ROS_DAPS, new S57enum(10, "dgps")); Catros.put(CatROS.ROS_TORN, new S57enum(11, "toran")); Catros.put(CatROS.ROS_OMGA, new S57enum(12, "omega"));
    320                 Catros.put(CatROS.ROS_SYLD, new S57enum(13, "syledis")); Catros.put(CatROS.ROS_CHKA, new S57enum(14, "chaika"));
     323                Catros.put(CatROS.ROS_DGPS, new S57enum(10, "dgps")); Catros.put(CatROS.ROS_TORN, new S57enum(11, "toran")); Catros.put(CatROS.ROS_OMGA, new S57enum(12, "omega"));
     324                Catros.put(CatROS.ROS_SYLD, new S57enum(13, "syledis")); Catros.put(CatROS.ROS_CHKA, new S57enum(14, "chiaka")); Catros.put(CatROS.ROS_PCOM, new S57enum(15, "public_communication"));
     325                Catros.put(CatROS.ROS_COMB, new S57enum(16, "commercial_broadcast")); Catros.put(CatROS.ROS_FACS, new S57enum(17, "facsimile")); Catros.put(CatROS.ROS_TIME, new S57enum(18, "time_signal"));
     326                Catros.put(CatROS.ROS_PAIS, new S57enum(19, "ais")); Catros.put(CatROS.ROS_SAIS, new S57enum(20, "s-ais")); Catros.put(CatROS.ROS_VAIS, new S57enum(21, "v-ais"));
     327                Catros.put(CatROS.ROS_VANC, new S57enum(22, "v-ais_north_cardinal")); Catros.put(CatROS.ROS_VASC, new S57enum(23, "v-ais_south_cardinal"));
     328                Catros.put(CatROS.ROS_VAEC, new S57enum(24, "v-ais_east_cardinal")); Catros.put(CatROS.ROS_VAWC, new S57enum(25, "v-ais_west_cardinal"));
     329                Catros.put(CatROS.ROS_VAPL, new S57enum(26, "v-ais_port_lateral")); Catros.put(CatROS.ROS_VASL, new S57enum(27, "v-ais_starboard_lateral"));
     330                Catros.put(CatROS.ROS_VAID, new S57enum(28, "v-ais_isolated_danger")); Catros.put(CatROS.ROS_VASW, new S57enum(29, "v-ais_safe_water"));
     331                Catros.put(CatROS.ROS_VASP, new S57enum(30, "v-ais_special_purpose")); Catros.put(CatROS.ROS_VAWK, new S57enum(31, "v-ais_wreck"));
    321332        }
    322333        public enum CatTRK { TRK_UNKN, TRK_FIXM, TRK_NFXM }
     
    537548                FNC_LOOK, FNC_COMM, FNC_TV, FNC_RADO, FNC_RADR, FNC_LGHT, FNC_MCWV, FNC_COOL, FNC_OBS, FNC_TMBL, FNC_CLOK, FNC_CTRL, FNC_ASHM, FNC_STAD, FNC_BUSS }
    538549        private static final EnumMap<FncFNC, S57enum> Functn = new EnumMap<FncFNC, S57enum>(FncFNC.class); static {Functn.put(FncFNC.FNC_UNKN, new S57enum(0, ""));
    539                 Functn.put(FncFNC.FNC_HBRM, new S57enum(2, "harbour-master")); Functn.put(FncFNC.FNC_CSTM, new S57enum(3, "customs")); Functn.put(FncFNC.FNC_HLTH, new S57enum(4, "health"));
     550                Functn.put(FncFNC.FNC_HBRM, new S57enum(2, "harbour_master")); Functn.put(FncFNC.FNC_CSTM, new S57enum(3, "customs")); Functn.put(FncFNC.FNC_HLTH, new S57enum(4, "health"));
    540551                Functn.put(FncFNC.FNC_HOSP, new S57enum(5, "hospital")); Functn.put(FncFNC.FNC_POST, new S57enum(6, "post_office")); Functn.put(FncFNC.FNC_HOTL, new S57enum(7, "hotel"));
    541552          Functn.put(FncFNC.FNC_RAIL, new S57enum(8, "railway_station")); Functn.put(FncFNC.FNC_POLC, new S57enum(9, "police_station")); Functn.put(FncFNC.FNC_WPOL, new S57enum(10, "water-police_station"));
     
    585596                Marsys.put(MarSYS.SYS_BWR2, new S57enum(13, "bniwr2")); Marsys.put(MarSYS.SYS_BNWR, new S57enum(14, "bniwr")); Marsys.put(MarSYS.SYS_PPWB, new S57enum(15, "ppwbc"));
    586597        }
    587         public enum NatCON { CON_UNKN, CON_MSNY, CON_CONC, CON_BDRS, CON_HSRF, CON_USRF, CON_WOOD, CON_METL, CON_GRP, CON_PNTD }
     598        public enum NatCON { CON_UNKN, CON_MSNY, CON_CONC, CON_BDRS, CON_HSRF, CON_USRF, CON_WOOD, CON_METL, CON_GRP, CON_PNTD, CON_FMWK }
    588599        private static final EnumMap<NatCON, S57enum> Natcon = new EnumMap<NatCON, S57enum>(NatCON.class); static { Natcon.put(NatCON.CON_UNKN, new S57enum(0, ""));
    589600                Natcon.put(NatCON.CON_MSNY, new S57enum(1, "masonry")); Natcon.put(NatCON.CON_CONC, new S57enum(2, "concreted")); Natcon.put(NatCON.CON_BDRS, new S57enum(3, "loose_boulders"));
    590601                Natcon.put(NatCON.CON_HSRF, new S57enum(4, "hard-surfaced")); Natcon.put(NatCON.CON_USRF, new S57enum(5, "unsurfaced")); Natcon.put(NatCON.CON_WOOD, new S57enum(6, "wooden"));
    591602                Natcon.put(NatCON.CON_METL, new S57enum(7, "metal")); Natcon.put(NatCON.CON_GRP, new S57enum(8, "grp")); Natcon.put(NatCON.CON_PNTD, new S57enum(9, "painted"));
     603                Natcon.put(NatCON.CON_FMWK, new S57enum(9, "framework"));
    592604        }
    593605        public enum NatSUR { SUR_UNKN, SUR_MUD, SUR_CLAY, SUR_SILT, SUR_SAND, SUR_STON, SUR_GRVL, SUR_PBBL, SUR_CBBL, SUR_ROCK, SUR_LAVA, SUR_CORL, SUR_SHEL, SUR_BLDR }
     
    972984                Lc_cce.put(Lc_CCX.CCX_LQDC, new S57enum(8, "liquid_c")); Lc_cce.put(Lc_CCX.CCX_GAS, new S57enum(9, "gas"));
    973985        }
    974         public enum ShpTYP { TYP_UNKN, TYP_CRGO, TYP_CONT, TYP_TNKR, TYP_SAIL, TYP_FISH, TYP_SPPS, TYP_MOWR, TYP_SUBM, TYP_HSPD, TYP_BCAR, TYP_SPLN, TYP_TUGB, TYP_PSGR, TYP_FERY, TYP_BOAT }
     986
     987        public enum ShpTYP { TYP_UNKN, TYP_CRGO, TYP_CONT, TYP_TNKR, TYP_SAIL, TYP_FISH, TYP_SPPS, TYP_MOWR, TYP_SUBM, TYP_HSPD, TYP_BCAR, TYP_SPLN, TYP_TUGB, TYP_PSGR, TYP_FERY, TYP_BOAT }
    975988        private static final EnumMap<ShpTYP, S57enum> Shptyp = new EnumMap<ShpTYP, S57enum>(ShpTYP.class); static { Shptyp.put(ShpTYP.TYP_UNKN, new S57enum(0, ""));
    976989                Shptyp.put(ShpTYP.TYP_CRGO, new S57enum(1, "cargo")); Shptyp.put(ShpTYP.TYP_CONT, new S57enum(2, "container")); Shptyp.put(ShpTYP.TYP_TNKR, new S57enum(3, "tanker"));
     
    979992                Shptyp.put(ShpTYP.TYP_BCAR, new S57enum(10, "bulk_carrier")); Shptyp.put(ShpTYP.TYP_SPLN, new S57enum(11, "seaplane")); Shptyp.put(ShpTYP.TYP_TUGB, new S57enum(12, "tugboat"));
    980993                Shptyp.put(ShpTYP.TYP_PSGR, new S57enum(13, "passenger")); Shptyp.put(ShpTYP.TYP_FERY, new S57enum(14, "ferry")); Shptyp.put(ShpTYP.TYP_BOAT, new S57enum(15, "boat"));
     994        }
     995        public enum AisCLS { AIS_UNKN, AIS_CAMN, AIS_CAMS, AIS_CAME, AIS_CAMW, AIS_LAMP, AIS_LAMS, AIS_SAWM, AIS_ISDM, AIS_SPPM, AIS_WRKM       }
     996        private static final EnumMap<AisCLS, S57enum> Aiscls = new EnumMap<AisCLS, S57enum>(AisCLS.class); static { Aiscls.put(AisCLS.AIS_UNKN, new S57enum(0, ""));
     997                Aiscls.put(AisCLS.AIS_CAMN, new S57enum(1, "cardinal_north")); Aiscls.put(AisCLS.AIS_CAMS, new S57enum(2, "cardinal_south")); Aiscls.put(AisCLS.AIS_CAME, new S57enum(3, "cardinal_east"));
     998                Aiscls.put(AisCLS.AIS_CAMN, new S57enum(4, "cardinal_north")); Aiscls.put(AisCLS.AIS_LAMP, new S57enum(5, "lateral_port")); Aiscls.put(AisCLS.AIS_LAMS, new S57enum(6, "lateral_starboard"));
     999                Aiscls.put(AisCLS.AIS_SAWM, new S57enum(7, "safe_water")); Aiscls.put(AisCLS.AIS_ISDM, new S57enum(8, "isolated_danger")); Aiscls.put(AisCLS.AIS_SPPM, new S57enum(9, "special_purpose"));
     1000                Aiscls.put(AisCLS.AIS_WRKM, new S57enum(10, "wreck"));
    9811001        }
    9821002
  • applications/editors/josm/plugins/smed2/src/seamap/Lights.java

    r29340 r29787  
    1010package seamap;
    1111
     12import java.awt.geom.*;
     13
     14import seamap.SeaMap.*;
     15
    1216public class Lights {
    1317
     18        private static Point2D.Double radial(Snode centre, double radius, double angle) {
     19                Point2D origin = Renderer.helper.getPoint(centre);
     20                double mile = Renderer.helper.getPoint(Renderer.map.new Snode((centre.lat + Math.toRadians(1/60)), centre.lon)).getY() - origin.getY();
     21                return new Point2D.Double(origin.getX() - (radius * mile * Math.sin(angle)), origin.getY() - (radius * mile * Math.cos(angle)));
     22        }
    1423/*
    15 XY_t radial(XY_t centre, double radius, double angle) {
    16   XY_t position;
    17   position.x = centre.x - (radius * mile * sin(d2r(angle)));
    18   position.y = centre.y - (radius * mile * cos(d2r(angle)));
    19   return position;
    20 }
    21 
    2224void renderFlare(Item_t *item) {
    2325  char *col = light_colours[COL_MAG];
  • applications/editors/josm/plugins/smed2/src/seamap/Rules.java

    r29340 r29787  
    1515import java.util.ArrayList;
    1616
    17 import s57.S57val;
    1817import s57.S57val.*;
    1918import s57.S57att.*;
     
    4544                if ((objects = map.features.get(Obj.TSSLPT)) != null) for (Feature feature : objects) separation(feature);
    4645                if ((objects = map.features.get(Obj.TSSBND)) != null) for (Feature feature : objects) separation(feature);
     46                if ((objects = map.features.get(Obj.ISTZNE)) != null) for (Feature feature : objects) separation(feature);
    4747                if ((objects = map.features.get(Obj.SNDWAV)) != null) for (Feature feature : objects) areas(feature);
    4848                if ((objects = map.features.get(Obj.OSPARE)) != null) for (Feature feature : objects) areas(feature);
     
    766766                        Renderer.lineVector(feature, new LineStyle(new Color(0x80c480ff, true), 20, new float[] { 40, 40 }, null));
    767767                        break;
     768                case ISTZNE:
     769                        Renderer.lineSymbols(feature, Areas.Restricted, 1.0, null, 0);
     770                        break;
    768771                }
    769772        }
     
    786789        }
    787790        private static void signals(Feature feature) {
    788                 switch (feature.type) {
    789                 case SISTAT:
    790                 case SISTAW:
    791                         Renderer.symbol(feature, Harbours.SignalStation, null, null);
    792                         break;
    793                 case RDOSTA:
    794                         Renderer.symbol(feature, Harbours.SignalStation, null, null);
    795                         break;
    796                 case RADSTA:
    797                         Renderer.symbol(feature, Harbours.SignalStation, null, null);
    798                         Renderer.symbol(feature, Beacons.RadarStation, null, null);
    799                         break;
    800                 case PILBOP:
    801                         Renderer.symbol(feature, Harbours.Pilot, null, null);
    802                         break;
    803                 case CGUSTA:
    804                         Renderer.symbol(feature, Harbours.SignalStation, null, null);
    805                         break;
    806                 case RSCSTA:
    807                         Renderer.symbol(feature, Harbours.Rescue, null, null);
    808                         break;
    809                 }
    810 /*  if (has_object("fog_signal")) object(fogs);
     791                if (zoom >= 14) {
     792                        switch (feature.type) {
     793                        case SISTAT:
     794                        case SISTAW:
     795                                Renderer.symbol(feature, Harbours.SignalStation, null, null);
     796                                break;
     797                        case RDOSTA:
     798                                Renderer.symbol(feature, Harbours.SignalStation, null, null);
     799                                Renderer.symbol(feature, Beacons.RadarStation, null, null);
     800                                ArrayList<CatROS> cats = (ArrayList<CatROS>)Renderer.getAttVal(feature, Obj.RDOSTA, 0, Att.CATROS);
     801                                for (CatROS ros : cats) {
     802                                        switch (ros) {
     803                                        case ROS_OMNI:
     804                                                Renderer.labelText(feature, " RC", new Font("Arial", Font.PLAIN, 70), Color.black, new Delta(Handle.BR, AffineTransform.getTranslateInstance(-30, -180)));
     805                                                break;
     806                                        case ROS_DIRL:
     807                                                Renderer.labelText(feature, " RD", new Font("Arial", Font.PLAIN, 70), Color.black, new Delta(Handle.BR, AffineTransform.getTranslateInstance(-30, -180)));
     808                                                break;
     809                                        case ROS_ROTP:
     810                                                Renderer.labelText(feature, " RW", new Font("Arial", Font.PLAIN, 70), Color.black, new Delta(Handle.BR, AffineTransform.getTranslateInstance(-30, -180)));
     811                                                break;
     812                                        case ROS_CNSL:
     813                                                Renderer.labelText(feature, " Consol", new Font("Arial", Font.PLAIN, 70), Color.black, new Delta(Handle.BR, AffineTransform.getTranslateInstance(-30, -180)));
     814                                                break;
     815                                        case ROS_RDF:
     816                                                Renderer.labelText(feature, " RG", new Font("Arial", Font.PLAIN, 70), Color.black, new Delta(Handle.BR, AffineTransform.getTranslateInstance(-30, -180)));
     817                                                break;
     818                                        case ROS_QTA:
     819                                                Renderer.labelText(feature, " R", new Font("Arial", Font.PLAIN, 70), Color.black, new Delta(Handle.BR, AffineTransform.getTranslateInstance(-30, -180)));
     820                                                break;
     821                                        case ROS_AERO:
     822                                                Renderer.labelText(feature, " AeroRC", new Font("Arial", Font.PLAIN, 70), Color.black, new Delta(Handle.BR, AffineTransform.getTranslateInstance(-30, -180)));
     823                                                break;
     824                                        case ROS_DECA:
     825                                                Renderer.labelText(feature, " Decca", new Font("Arial", Font.PLAIN, 70), Color.black, new Delta(Handle.BR, AffineTransform.getTranslateInstance(-30, -180)));
     826                                                break;
     827                                        case ROS_LORN:
     828                                                Renderer.labelText(feature, " Loran", new Font("Arial", Font.PLAIN, 70), Color.black, new Delta(Handle.BR, AffineTransform.getTranslateInstance(-30, -180)));
     829                                                break;
     830                                        case ROS_DGPS:
     831                                                Renderer.labelText(feature, " DGPS", new Font("Arial", Font.PLAIN, 70), Color.black, new Delta(Handle.BR, AffineTransform.getTranslateInstance(-30, -180)));
     832                                                break;
     833                                        case ROS_TORN:
     834                                                Renderer.labelText(feature, " Toran", new Font("Arial", Font.PLAIN, 70), Color.black, new Delta(Handle.BR, AffineTransform.getTranslateInstance(-30, -180)));
     835                                                break;
     836                                        case ROS_OMGA:
     837                                                Renderer.labelText(feature, " Omega", new Font("Arial", Font.PLAIN, 70), Color.black, new Delta(Handle.BR, AffineTransform.getTranslateInstance(-30, -180)));
     838                                                break;
     839                                        case ROS_SYLD:
     840                                                Renderer.labelText(feature, " Syledis", new Font("Arial", Font.PLAIN, 70), Color.black, new Delta(Handle.BR, AffineTransform.getTranslateInstance(-30, -180)));
     841                                                break;
     842                                        case ROS_CHKA:
     843                                                Renderer.labelText(feature, " Chiaka", new Font("Arial", Font.PLAIN, 70), Color.black, new Delta(Handle.BR, AffineTransform.getTranslateInstance(-30, -180)));
     844                                                break;
     845                                        case ROS_PCOM:
     846                                        case ROS_COMB:
     847                                        case ROS_FACS:
     848                                        case ROS_TIME:
     849                                                break;
     850                                        case ROS_PAIS:
     851                                        case ROS_SAIS:
     852                                                Renderer.labelText(feature, " AIS", new Font("Arial", Font.PLAIN, 70), Color.black, new Delta(Handle.BR, AffineTransform.getTranslateInstance(-30, -180)));
     853                                                break;
     854                                        case ROS_VAIS:
     855                                                Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 70), Color.black, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 180)));
     856                                                break;
     857                                        case ROS_VANC:
     858                                                Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 70), Color.black, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 180)));
     859                                                Renderer.symbol(feature, Topmarks.TopNorth, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25)));
     860                                                break;
     861                                        case ROS_VASC:
     862                                                Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 70), Color.black, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 180)));
     863                                                Renderer.symbol(feature, Topmarks.TopSouth, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25)));
     864                                                break;
     865                                        case ROS_VAEC:
     866                                                Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 70), Color.black, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 180)));
     867                                                Renderer.symbol(feature, Topmarks.TopEast, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25)));
     868                                                break;
     869                                        case ROS_VAWC:
     870                                                Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 70), Color.black, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 180)));
     871                                                Renderer.symbol(feature, Topmarks.TopWest, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25)));
     872                                                break;
     873                                        case ROS_VAPL:
     874                                                Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 70), Color.black, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 180)));
     875                                                Renderer.symbol(feature, Topmarks.TopCan, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25)));
     876                                                break;
     877                                        case ROS_VASL:
     878                                                Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 70), Color.black, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 180)));
     879                                                Renderer.symbol(feature, Topmarks.TopCone, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25)));
     880                                                break;
     881                                        case ROS_VAID:
     882                                                Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 70), Color.black, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 180)));
     883                                                Renderer.symbol(feature, Topmarks.TopIsol, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25)));
     884                                                break;
     885                                        case ROS_VASW:
     886                                                Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 70), Color.black, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 180)));
     887                                                Renderer.symbol(feature, Topmarks.TopSphere, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25)));
     888                                                break;
     889                                        case ROS_VASP:
     890                                                Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 70), Color.black, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 180)));
     891                                                Renderer.symbol(feature, Topmarks.TopX, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25)));
     892                                                break;
     893                                        case ROS_VAWK:
     894                                                Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 70), Color.black, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 180)));
     895                                                Renderer.symbol(feature, Topmarks.TopCross, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25)));
     896                                                break;
     897                                        }
     898                                }
     899                                break;
     900                        case RADSTA:
     901                                Renderer.symbol(feature, Harbours.SignalStation, null, null);
     902                                Renderer.symbol(feature, Beacons.RadarStation, null, null);
     903                                break;
     904                        case PILBOP:
     905                                Renderer.symbol(feature, Harbours.Pilot, null, null);
     906                                break;
     907                        case CGUSTA:
     908                                Renderer.symbol(feature, Harbours.SignalStation, null, null);
     909                                break;
     910                        case RSCSTA:
     911                                Renderer.symbol(feature, Harbours.Rescue, null, null);
     912                                break;
     913                        }
     914                }
     915                /*  if (has_object("fog_signal")) object(fogs);
    811916  if (has_object("radar_transponder")) object(rtbs);
    812917  if (has_object("light")) object(lights);
  • applications/editors/josm/plugins/smed2/src/smed2/Smed2Action.java

    r29340 r29787  
    172172        @Override
    173173        public void selectionChanged(Collection<? extends OsmPrimitive> selection) {
    174                 Node nextNode = null;
    175                 Node node = null;
    176                 Way nextWay = null;
    177                 Way way = null;
     174                OsmPrimitive nextFeature = null;
     175                OsmPrimitive feature = null;
    178176
    179177                if (selection.size() == 0) showFrame.setVisible(false);
    180178                for (OsmPrimitive osm : selection) {
    181                         if (osm instanceof Node) {
    182                                 nextNode = (Node) osm;
     179                                nextFeature = osm;
    183180                                if (selection.size() == 1) {
    184                                         if (nextNode.compareTo(node) != 0) {
    185                                                 node = nextNode;
     181                                        if (nextFeature.compareTo(feature) != 0) {
     182                                                feature = nextFeature;
    186183//                                              showFrame.setVisible(true);
    187                                                 showFrame.showFeature(node, map);
     184                                                showFrame.showFeature(feature, map);
    188185                                        }
    189186                                } else {
     
    191188                                }
    192189                        }
    193                         else if (osm instanceof Way) {
    194                                 nextWay = (Way) osm;
    195                                 if (selection.size() == 1) {
    196                                         if (nextWay.compareTo(way) != 0) {
    197                                                 way = nextWay;
    198 //                                              showFrame.setVisible(true);
    199                                                 showFrame.showFeature(way, map);
    200                                         }
    201                                 } else {
    202                                         showFrame.setVisible(false);
    203                                 }
    204                         }
    205                 }
    206                 if (nextNode == null) {
    207                         node = null;
     190                if (nextFeature == null) {
     191                        feature = null;
    208192                }
    209193        }
Note: See TracChangeset for help on using the changeset viewer.