Changeset 30388 in osm for applications
- Timestamp:
- 2014-04-09T19:28:00+02:00 (11 years ago)
- Location:
- applications/editors/josm/plugins/smed2/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/smed2/src/render/Rules.java
r30339 r30388 335 335 BcnSHP shape = (BcnSHP) getAttVal(feature, feature.type, 0, 336 336 Att.BCNSHP); 337 if (((shape == BcnSHP.BCN_PRCH) || (shape == BcnSHP.BCN_WTHY)) 338 && (feature.type == Obj.BCNLAT)) { 339 CatLAM cat = (CatLAM) getAttVal(feature, feature.type, 0, 340 Att.CATLAM); 337 if ((shape == BcnSHP.BCN_WTHY) && (feature.type == Obj.BCNLAT)) { 338 CatLAM cat = (CatLAM) getAttVal(feature, feature.type, 0, Att.CATLAM); 341 339 switch (cat) { 342 340 case LAM_PORT: 343 if (shape == BcnSHP.BCN_PRCH) 344 Renderer.symbol(feature, Beacons.PerchPort); 345 else 346 Renderer.symbol(feature, Beacons.WithyPort); 341 Renderer.symbol(feature, Beacons.WithyPort); 347 342 break; 348 343 case LAM_STBD: 349 if (shape == BcnSHP.BCN_PRCH) 350 Renderer.symbol(feature, Beacons.PerchStarboard); 351 else 352 Renderer.symbol(feature, Beacons.WithyStarboard); 344 Renderer.symbol(feature, Beacons.WithyStarboard); 353 345 break; 354 346 default: 355 Renderer.symbol(feature, Beacons.Stake, 356 getScheme(feature, feature.type)); 347 Renderer.symbol(feature, Beacons.Stake, getScheme(feature, feature.type)); 348 } 349 } else if ((shape == BcnSHP.BCN_PRCH) && (feature.type == Obj.BCNLAT) && !(feature.objs.containsKey(Obj.TOPMAR))) { 350 CatLAM cat = (CatLAM) getAttVal(feature, feature.type, 0, Att.CATLAM); 351 switch (cat) { 352 case LAM_PORT: 353 Renderer.symbol(feature, Beacons.PerchPort); 354 break; 355 case LAM_STBD: 356 Renderer.symbol(feature, Beacons.PerchStarboard); 357 break; 358 default: 359 Renderer.symbol(feature, Beacons.Stake, getScheme(feature, feature.type)); 357 360 } 358 361 } else { … … 665 668 default: 666 669 break; 670 } 671 if (feature.objs.containsKey(Obj.TOPMAR)) { 672 Symbol topmark = Topmarks.Shapes.get(feature.objs.get(Obj.TOPMAR).get(0).get(Att.TOPSHP).val); 673 if (topmark != null) 674 Renderer.symbol(feature, Topmarks.Shapes.get(feature.objs.get(Obj.TOPMAR).get(0).get(Att.TOPSHP).val), getScheme(feature, Obj.TOPMAR), Topmarks.LightDelta); 675 } else if (feature.objs.containsKey(Obj.DAYMAR)) { 676 Symbol topmark = Topmarks.Shapes.get(feature.objs.get(Obj.DAYMAR).get(0).get(Att.TOPSHP).val); 677 if (topmark != null) 678 Renderer.symbol(feature, Topmarks.Shapes.get(feature.objs.get(Obj.DAYMAR).get(0).get(Att.TOPSHP).val), getScheme(feature, Obj.DAYMAR), Topmarks.LightDelta); 667 679 } 668 680 Signals.addSignals(feature); -
applications/editors/josm/plugins/smed2/src/s57/S57att.java
r30285 r30388 134 134 AttStr.put(Att.NATCON, "construction"); AttStr.put(Att.NATSUR, "surface"); AttStr.put(Att.NATQUA, "surface_qualification"); AttStr.put(Att.NMDATE, "nm_date"); 135 135 AttStr.put(Att.OBJNAM, "name"); AttStr.put(Att.ORIENT, "orientation"); AttStr.put(Att.PEREND, "end_date"); AttStr.put(Att.PERSTA, "start_date"); 136 AttStr.put(Att.PICREP, " representation"); AttStr.put(Att.PILDST, "pilot_district"); AttStr.put(Att.PRCTRY, "producing_country"); AttStr.put(Att.PRODCT, "product");136 AttStr.put(Att.PICREP, ""); AttStr.put(Att.PILDST, "pilot_district"); AttStr.put(Att.PRCTRY, "producing_country"); AttStr.put(Att.PRODCT, "product"); 137 137 AttStr.put(Att.PUBREF, "reference"); AttStr.put(Att.QUASOU, "quality"); AttStr.put(Att.RADWAL, "wavelength"); AttStr.put(Att.RADIUS, "radius"); 138 138 AttStr.put(Att.RECDAT, "date"); AttStr.put(Att.RECIND, "indication"); AttStr.put(Att.RYRMGV, "year"); AttStr.put(Att.RESTRN, "restriction"); 139 139 AttStr.put(Att.SECTR1, "sector_start"); AttStr.put(Att.SECTR2, "sector_end"); AttStr.put(Att.SHIPAM, "shift"); AttStr.put(Att.SIGFRQ, "frequency"); 140 140 AttStr.put(Att.SIGGEN, "generation"); AttStr.put(Att.SIGGRP, "group"); AttStr.put(Att.SIGPER, "period"); AttStr.put(Att.SIGSEQ, "sequence"); 141 AttStr.put(Att.SOUACC, "accuracy"); AttStr.put(Att.SDISMX, "maximum_sounding"); AttStr.put(Att.SDISMN, "minimum_sounding"); AttStr.put(Att.SORDAT, " source_date");142 AttStr.put(Att.SORIND, " source"); AttStr.put(Att.STATUS, "status"); AttStr.put(Att.SURATH, "authority"); AttStr.put(Att.SUREND, "end_date");141 AttStr.put(Att.SOUACC, "accuracy"); AttStr.put(Att.SDISMX, "maximum_sounding"); AttStr.put(Att.SDISMN, "minimum_sounding"); AttStr.put(Att.SORDAT, ""); 142 AttStr.put(Att.SORIND, ""); AttStr.put(Att.STATUS, "status"); AttStr.put(Att.SURATH, "authority"); AttStr.put(Att.SUREND, "end_date"); 143 143 AttStr.put(Att.SURSTA, "start_date"); AttStr.put(Att.SURTYP, "survey"); AttStr.put(Att.TECSOU, "technique"); AttStr.put(Att.TXTDSC, "description"); 144 144 AttStr.put(Att.TIMEND, "end_time"); AttStr.put(Att.TIMSTA, "start_time"); AttStr.put(Att.TOPSHP, "shape"); AttStr.put(Att.TRAFIC, "traffic_flow"); -
applications/editors/josm/plugins/smed2/src/symbols/Beacons.java
r30323 r30388 187 187 Shapes.put(BcnSHP.BCN_LATT, Beacons.Beacon); Shapes.put(BcnSHP.BCN_PILE, Beacons.Beacon); Shapes.put(BcnSHP.BCN_POLE, Beacons.Stake); 188 188 Shapes.put(BcnSHP.BCN_CARN, Beacons.Cairn); Shapes.put(BcnSHP.BCN_BUOY, Beacons.Beacon); Shapes.put(BcnSHP.BCN_POST, Beacons.Stake); 189 Shapes.put(BcnSHP.BCN_PRCH, Beacons.Stake); 189 190 } 190 191 } -
applications/editors/josm/plugins/smed2/src/symbols/Topmarks.java
r30339 r30388 20 20 public class Topmarks { 21 21 22 public static final Symbol TopBesom = new Symbol(); 23 static { 24 TopBesom.add(new Instr(Form.BBOX, new Rectangle2D.Double(-20,-80,40,80))); 25 TopBesom.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 26 TopBesom.add(new Instr(Form.FILL, Color.black)); 27 Path2D.Double p = new Path2D.Double(); p.moveTo(-15.0,0.0); p.lineTo(0.0,-30.0); p.lineTo(15.0,0.0); p.moveTo(0.0,0.0); p.lineTo(0.0,-28.0); 28 TopBesom.add(new Instr(Form.PLIN, p)); 29 } 30 public static final Symbol TopIBesom = new Symbol(); 31 static { 32 TopIBesom.add(new Instr(Form.BBOX, new Rectangle2D.Double(-20,-80,40,80))); 33 TopIBesom.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 34 TopIBesom.add(new Instr(Form.FILL, Color.black)); 35 Path2D.Double p = new Path2D.Double(); p.moveTo(-15.0,-30.0); p.lineTo(0.0,0.0); p.lineTo(15.0,-30.0); 36 TopIBesom.add(new Instr(Form.PLIN, p)); 37 } 22 38 public static final Symbol TopBoard = new Symbol(); 23 39 static { … … 230 246 Path2D.Double p = new Path2D.Double(); p.moveTo(-15.0,-1.0); p.lineTo(0.0,-29.0); p.lineTo(15.0,-1.0); p.closePath(); 231 247 colours.add(new Instr(Form.P1, p)); 248 p = new Path2D.Double(); p.setWindingRule(GeneralPath.WIND_EVEN_ODD); 249 p.moveTo(-15.0,-1.0); p.lineTo(0.0,-29.0); p.lineTo(15.0,-1.0); p.closePath(); 250 p.moveTo(-10.0,-6.0); p.lineTo(0.0,-24.0); p.lineTo(10.0,-6.0); p.closePath(); 251 colours.add(new Instr(Form.B1, p)); 232 252 TopTriangle.add(new Instr(Form.COLR, colours)); 233 253 TopTriangle.add(new Instr(Form.STRK, new BasicStroke(2, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); … … 242 262 Path2D.Double p = new Path2D.Double(); p.moveTo(-15.0,-29.0); p.lineTo(0.0,-1.0); p.lineTo(15.0,-29.0); p.closePath(); 243 263 colours.add(new Instr(Form.P1, p)); 264 p = new Path2D.Double(); p.setWindingRule(GeneralPath.WIND_EVEN_ODD); 265 p.moveTo(-15.0,-29.0); p.lineTo(0.0,-1.0); p.lineTo(15.0,-29.0); p.closePath(); 266 p.moveTo(-10.0,-24.0); p.lineTo(0.0,-6.0); p.lineTo(10.0,-24.0); p.closePath(); 267 colours.add(new Instr(Form.B1, p)); 244 268 TopItriangle.add(new Instr(Form.COLR, colours)); 245 269 TopItriangle.add(new Instr(Form.STRK, new BasicStroke(2, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); … … 284 308 public static final EnumMap<TopSHP, Symbol> Shapes = new EnumMap<TopSHP, Symbol>(TopSHP.class); 285 309 static { 286 Shapes.put(TopSHP.TOP_BORD, TopBoard); Shapes.put(TopSHP.TOP_CAN, TopCan); Shapes.put(TopSHP.TOP_CONE, TopCone); Shapes.put(TopSHP.TOP_CROS, TopCross); 287 Shapes.put(TopSHP.TOP_EAST, TopEast); Shapes.put(TopSHP.TOP_ICONE, TopIcone); Shapes.put(TopSHP.TOP_ISD, TopIsol); Shapes.put(TopSHP.TOP_NORTH, TopNorth); 288 Shapes.put(TopSHP.TOP_SOUTH, TopSouth); Shapes.put(TopSHP.TOP_SPHR, TopSphere); Shapes.put(TopSHP.TOP_SQUR, TopSquare); Shapes.put(TopSHP.TOP_TRI, TopTriangle); 289 Shapes.put(TopSHP.TOP_ITRI, TopItriangle); Shapes.put(TopSHP.TOP_WEST, TopWest); Shapes.put(TopSHP.TOP_SALT, TopX); Shapes.put(TopSHP.TOP_RHOM, TopRhombus); 310 Shapes.put(TopSHP.TOP_BESM, TopBesom); Shapes.put(TopSHP.TOP_IBESM, TopIBesom); Shapes.put(TopSHP.TOP_BORD, TopBoard); Shapes.put(TopSHP.TOP_CAN, TopCan); 311 Shapes.put(TopSHP.TOP_CONE, TopCone); Shapes.put(TopSHP.TOP_CROS, TopCross); Shapes.put(TopSHP.TOP_EAST, TopEast); Shapes.put(TopSHP.TOP_ICONE, TopIcone); 312 Shapes.put(TopSHP.TOP_ISD, TopIsol); Shapes.put(TopSHP.TOP_NORTH, TopNorth); Shapes.put(TopSHP.TOP_SOUTH, TopSouth); Shapes.put(TopSHP.TOP_SPHR, TopSphere); 313 Shapes.put(TopSHP.TOP_SQUR, TopSquare); Shapes.put(TopSHP.TOP_TRI, TopTriangle); Shapes.put(TopSHP.TOP_ITRI, TopItriangle); Shapes.put(TopSHP.TOP_WEST, TopWest); 314 Shapes.put(TopSHP.TOP_SALT, TopX); Shapes.put(TopSHP.TOP_RHOM, TopRhombus); 290 315 } 291 316 public static final EnumMap<BoySHP, Delta> BuoyDeltas = new EnumMap<BoySHP, Delta>(BoySHP.class); … … 302 327 public static final Delta FloatDelta = new Delta(Handle.BC, AffineTransform.getTranslateInstance(0.0, -42.0)); 303 328 public static final Delta BeaconDelta = new Delta(Handle.BC, AffineTransform.getTranslateInstance(0.0, -70.0)); 329 public static final Delta LightDelta = new Delta(Handle.BC, AffineTransform.getTranslateInstance(0.0, -20.0)); 304 330 305 331 }
Note:
See TracChangeset
for help on using the changeset viewer.