Changeset 35835 in osm for applications/editors
- Timestamp:
- 2021-10-30T10:14:20+02:00 (3 years ago)
- Location:
- applications/editors/josm/plugins/seachart
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/seachart/jrender/src/jrender/Jrender.java
r35404 r35835 87 87 return RuleSet.SEAMARK; 88 88 } 89 90 @Override 91 public Chart chart() { 92 // TODO Auto-generated method stub 93 return null; 94 } 89 95 } 90 96 -
applications/editors/josm/plugins/seachart/src/render/ChartContext.java
r35391 r35835 14 14 public interface ChartContext { 15 15 enum RuleSet { ALL, BASE, SEAMARK } 16 class Chart { 17 public int zoom; 18 public double scale; 19 public int grid; 20 public boolean rose; 21 public double roseLat; 22 public double roseLon; 23 public Chart() { 24 zoom = 15; 25 scale = 1.0; 26 grid = 0; 27 rose = false; 28 roseLat = roseLon = 0; 29 } 30 } 16 31 17 32 Point2D getPoint(Snode coord); … … 22 37 23 38 int grid(); 39 40 Chart chart(); 24 41 25 42 Color background(S57map map); -
applications/editors/josm/plugins/seachart/src/render/Rules.java
r35788 r35835 56 56 import s57.S57val.FncFNC; 57 57 import s57.S57val.MarSYS; 58 import s57.S57val.NatSUR; 59 import s57.S57val.NatQUA; 58 60 import s57.S57val.StsSTS; 59 61 import s57.S57val.TecSOU; … … 308 310 if (testObject(Obj.TSSBND)) for (Feature f : objects) if (testFeature(f)) separation(); 309 311 if (testObject(Obj.ISTZNE)) for (Feature f : objects) if (testFeature(f)) separation(); 312 if (testObject(Obj.SBDARE)) for (Feature f : objects) if (testFeature(f)) areas(); 310 313 if (testObject(Obj.SNDWAV)) for (Feature f : objects) if (testFeature(f)) areas(); 311 314 if (testObject(Obj.WEDKLP)) for (Feature f : objects) if (testFeature(f)) areas(); … … 548 551 Renderer.fillPattern(Areas.Sandwaves); 549 552 break; 553 case SBDARE: 554 if (Renderer.zoom >= 12) { 555 String str = ""; 556 if (hasAttribute(feature.type, Att.NATSUR)) { 557 ArrayList<NatSUR> surs = (ArrayList<NatSUR>) getAttList(feature.type, Att.NATSUR); 558 ArrayList<NatQUA> quas = new ArrayList<NatQUA>(); 559 if (hasAttribute(feature.type, Att.NATQUA)) { 560 quas = (ArrayList<NatQUA>) getAttList(feature.type, Att.NATQUA); 561 } 562 for (int i = 0; i < surs.size(); i++) { 563 if (!str.isEmpty()) { 564 str += "."; 565 } 566 if (quas.size() > i) { 567 switch (quas.get(i)) { 568 case QUA_FINE: 569 str += "f"; 570 break; 571 case QUA_MEDM: 572 str += "m"; 573 break; 574 case QUA_CORS: 575 str += "c"; 576 break; 577 case QUA_BRKN: 578 str += "bk"; 579 break; 580 case QUA_STKY: 581 str += "sy"; 582 break; 583 case QUA_SOFT: 584 str += "so"; 585 break; 586 case QUA_STIF: 587 str += "sf"; 588 break; 589 case QUA_VCNC: 590 str += "v"; 591 break; 592 case QUA_CALC: 593 str += "ca"; 594 break; 595 case QUA_HARD: 596 str += "h"; 597 break; 598 default: 599 break; 600 } 601 } 602 switch (surs.get(i)) { 603 case SUR_MUD: 604 str += "M"; 605 break; 606 case SUR_CLAY: 607 str += "Cy"; 608 break; 609 case SUR_SILT: 610 str += "Si"; 611 break; 612 case SUR_SAND: 613 str += "S"; 614 break; 615 case SUR_STON: 616 str += "St"; 617 break; 618 case SUR_GRVL: 619 str += "G"; 620 break; 621 case SUR_PBBL: 622 str += "P"; 623 break; 624 case SUR_CBBL: 625 str += "Cb"; 626 break; 627 case SUR_ROCK: 628 str += "R"; 629 break; 630 case SUR_LAVA: 631 str += "Lv"; 632 break; 633 case SUR_CORL: 634 str += "Co"; 635 break; 636 case SUR_SHEL: 637 str += "Sh"; 638 break; 639 case SUR_BLDR: 640 str += "Bo"; 641 break; 642 default: 643 break; 644 } 645 } 646 if (!str.isEmpty()) { 647 Renderer.labelText(str, new Font("Arial", Font.ITALIC, 60), Color.black, new Delta(Handle.CC)); 648 } 649 } 650 } 651 break; 550 652 case WEDKLP: 551 653 if (Renderer.zoom >= 12) { -
applications/editors/josm/plugins/seachart/src/seachart/ChartImage.java
r35460 r35835 160 160 return RuleSet.ALL; 161 161 } 162 163 @Override 164 public Chart chart() { 165 // TODO Auto-generated method stub 166 return null; 167 } 162 168 }
Note:
See TracChangeset
for help on using the changeset viewer.