Changeset 31028 in osm for applications/editors/josm/plugins/seachart/src
- Timestamp:
- 2015-02-20T01:43:42+01:00 (10 years ago)
- Location:
- applications/editors/josm/plugins/seachart/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/seachart/src/render/Renderer.java
r31027 r31028 19 19 import s57.S57val.*; 20 20 import s57.S57map; 21 import s57.S57obj.Obj;22 21 import s57.S57map.*; 23 22 import symbols.Areas; … … 37 36 static int zoom; 38 37 39 public static void reRender(Graphics2D g, int z, double factor, S57map m, ChartContext c) { 38 public static void reRender(Graphics2D g, Rectangle rect, int z, double factor, S57map m, ChartContext c) { 40 39 g2 = g; 41 40 zoom = z; … … 44 43 sScale = symbolScale[zoom] * factor; 45 44 if (map != null) { 45 g2.setBackground(Rules.Bwater); 46 g2.clearRect(rect.x, rect.y, rect.width, rect.height); 46 47 g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); 47 48 g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_GASP); -
applications/editors/josm/plugins/seachart/src/render/Rules.java
r31027 r31028 282 282 switch (feature.type) { 283 283 case BUAARE: 284 Renderer.lineVector(feature, new LineStyle(new Color(0x 40000000, true)));284 Renderer.lineVector(feature, new LineStyle(new Color(0x20000000, true))); 285 285 break; 286 286 case COALNE: … … 289 289 case DEPARE: 290 290 Double depmax = 0.0; 291 if (((depmax = (Double) getAttVal(feature, feature.type, 0, Att.DRVAL2)) != null) && (depmax <= 0.0)) {291 if (((depmax = (Double) getAttVal(feature, Obj.DEPARE, 0, Att.DRVAL2)) != null) && (depmax <= 0.0)) { 292 292 Renderer.lineVector(feature, new LineStyle(Gdries)); 293 293 } -
applications/editors/josm/plugins/seachart/src/s57/S57map.java
r31027 r31028 233 233 } 234 234 235 ArrayList<OSMtag> osmtags;236 237 235 public NodeTab nodes; 238 236 public EdgeTab edges; … … 389 387 feature.geom.prim = Pflag.POINT; 390 388 feature.geom.elems.add(new Prim(id)); 391 osmtags = new ArrayList<OSMtag>();392 389 edge = null; 393 390 } … … 398 395 feature.geom.prim = Pflag.LINE; 399 396 feature.geom.elems.add(new Prim(id)); 400 osmtags = new ArrayList<OSMtag>();401 397 edge = new Edge(); 402 398 } … … 418 414 feature.reln = Rflag.UNKN; 419 415 feature.geom.prim = Pflag.AREA; 420 osmtags = new ArrayList<OSMtag>();421 416 edge = null; 422 417 } … … 479 474 } 480 475 } else { 481 osmtags.add(new OSMtag(key, val)); 482 } 483 } 484 485 public void tagsDone(long id) { 486 for (OSMtag tag : osmtags) { 487 KeyVal kv = S57osm.OSMtag(tag.key, tag.val); 476 KeyVal kv = S57osm.OSMtag(key, val); 488 477 if (kv.obj != Obj.UNKOBJ) { 489 478 if (feature.type == Obj.UNKOBJ) { … … 503 492 atts.put(kv.att, new AttVal(kv.att, kv.conv, kv.val)); 504 493 } 505 break; 506 } 507 } 494 } 495 } 496 } 497 498 public void tagsDone(long id) { 508 499 switch (feature.geom.prim) { 509 500 case POINT: -
applications/editors/josm/plugins/seachart/src/s57/S57osm.java
r31027 r31028 38 38 OSMtags.put("waterway=canal", new KeyVal<>(Obj.CANALS, Att.UNKATT, null, null)); OSMtags.put("waterway=dock", new KeyVal<>(Obj.HRBBSN, Att.UNKATT, null, null)); 39 39 OSMtags.put("waterway=lock", new KeyVal<>(Obj.HRBBSN, Att.UNKATT, null, null)); 40 OSMtags.put("wetland=tidalflat", new KeyVal<Double>(Obj.DEPARE, Att.DRVAL2, Conv.F, (double)0)); OSMtags.put("tidal=yes", new KeyVal<Double>(Obj.DEPARE, Att.DRVAL2, Conv.F, ( double)0));40 OSMtags.put("wetland=tidalflat", new KeyVal<Double>(Obj.DEPARE, Att.DRVAL2, Conv.F, (double)0)); OSMtags.put("tidal=yes", new KeyVal<Double>(Obj.DEPARE, Att.DRVAL2, Conv.F, (Double)0.0)); 41 41 OSMtags.put("natural=mud", new KeyVal<>(Obj.DEPARE, Att.UNKATT, null, null)); OSMtags.put("natural=sand", new KeyVal<>(Obj.DEPARE, Att.UNKATT, null, null)); 42 42 OSMtags.put("highway=motorway", new KeyVal<>(Obj.ROADWY, Att.CATROD, Conv.E, CatROD.ROD_MWAY)); OSMtags.put("highway=trunk", new KeyVal<>(Obj.ROADWY, Att.CATROD, Conv.E, CatROD.ROD_MAJR)); -
applications/editors/josm/plugins/seachart/src/seachart/ChartImage.java
r31027 r31028 66 66 public void paint(Graphics2D g2, MapView mv, Bounds bb) { 67 67 Rectangle rect = Main.map.mapView.getBounds(); 68 g2.setBackground(Rules.Bwater); 69 g2.clearRect(rect.x, rect.y, rect.width, rect.height); 70 Renderer.reRender(g2, zoom, Math.pow(2, (zoom-12)), SeachartAction.map, this); 68 Renderer.reRender(g2, rect, zoom, Math.pow(2, (zoom-12)), SeachartAction.map, this); 71 69 g2.setPaint(Color.black); 72 70 g2.setFont(new Font("Arial", Font.BOLD, 20));
Note:
See TracChangeset
for help on using the changeset viewer.