Changeset 32909 in osm for applications/editors/josm/plugins/seachart
- Timestamp:
- 2016-09-03T16:52:05+02:00 (8 years ago)
- Location:
- applications/editors/josm/plugins/seachart/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/seachart/src/render/Renderer.java
r32907 r32909 68 68 if (map != null) { 69 69 if (context.clip()) { 70 Point2D tl = context.getPoint( map.new Snode(map.bounds.maxlat, map.bounds.minlon));71 Point2D br = context.getPoint( map.new Snode(map.bounds.minlat, map.bounds.maxlon));70 Point2D tl = context.getPoint(new Snode(map.bounds.maxlat, map.bounds.minlon)); 71 Point2D br = context.getPoint(new Snode(map.bounds.minlat, map.bounds.maxlon)); 72 72 g2.clip(new Rectangle2D.Double(tl.getX(), tl.getY(), (br.getX() - tl.getX()), (br.getY() - tl.getY()))); 73 73 } -
applications/editors/josm/plugins/seachart/src/render/Signals.java
r32907 r32909 365 365 } 366 366 367 class Sect {367 static class Sect { 368 368 int dir; 369 369 LitCHR chr; -
applications/editors/josm/plugins/seachart/src/s57/S57box.java
r32907 r32909 4 4 import java.util.ArrayList; 5 5 6 import s57.S57map.AttMap; 6 7 import s57.S57map.Edge; 7 8 import s57.S57map.Feature; 9 import s57.S57map.ObjTab; 8 10 import s57.S57map.Pflag; 11 import s57.S57map.Prim; 9 12 import s57.S57map.Rflag; 10 13 import s57.S57map.Snode; … … 67 70 } 68 71 for (Feature feature : map.features.get(Obj.COALNE)) { 69 Feature land = map.new Feature();72 Feature land = new Feature(); 70 73 land.id = ++map.xref; 71 74 land.type = Obj.LNDARE; 72 75 land.reln = Rflag.MASTER; 73 land.objs.put(Obj.LNDARE, map.new ObjTab());74 land.objs.get(Obj.LNDARE).put(0, map.new AttMap());76 land.objs.put(Obj.LNDARE, new ObjTab()); 77 land.objs.get(Obj.LNDARE).put(0, new AttMap()); 75 78 if (feature.geom.prim == Pflag.AREA) { 76 79 land.geom = feature.geom; … … 139 142 } 140 143 for (Land land : lands) { 141 Edge nedge = map.new Edge();144 Edge nedge = new Edge(); 142 145 nedge.first = land.last; 143 146 nedge.last = land.first; … … 166 169 } 167 170 map.edges.put(++map.xref, nedge); 168 land.land.geom.elems.add( map.new Prim(map.xref));171 land.land.geom.elems.add(new Prim(map.xref)); 169 172 land.land.geom.comps.get(0).size++; 170 173 land.land.geom.prim = Pflag.AREA; … … 173 176 } 174 177 return; 175 176 178 } 177 178 179 } -
applications/editors/josm/plugins/seachart/src/s57/S57dat.java
r32907 r32909 3 3 4 4 import java.io.UnsupportedEncodingException; 5 import java.nio.charset.StandardCharsets; 5 6 import java.util.ArrayList; 6 7 import java.util.Arrays; … … 378 379 buf[buf.length-1] = 0x1e; 379 380 int flen = buf.length - offset; 380 index.add(new Index(sfparams.field.toString().getBytes( ), flen, offset));381 index.add(new Index(sfparams.field.toString().getBytes(StandardCharsets.UTF_8), flen, offset)); 381 382 maxlen = (flen > maxlen) ? flen : maxlen; 382 383 offset += flen; -
applications/editors/josm/plugins/seachart/src/s57/S57enc.java
r32907 r32909 315 315 Object[] attf = new Object[0]; 316 316 Object[] natf = new Object[0]; 317 AttMap atts = map.new AttMap();317 AttMap atts = new AttMap(); 318 318 atts.putAll(object.getValue()); 319 319 if (master) { -
applications/editors/josm/plugins/seachart/src/s57/S57map.java
r32907 r32909 18 18 // CHECKSTYLE.OFF: LineLength 19 19 20 public class MapBounds {20 public static class MapBounds { 21 21 public double minlat; 22 22 public double minlon; … … 39 39 } 40 40 41 public class Snode { // All coordinates in map41 public static class Snode { // All coordinates in map 42 42 public double lat; // Latitude in radians 43 43 public double lon; // Longitude in radians … … 74 74 } 75 75 76 public class Edge { // A polyline segment76 public static class Edge { // A polyline segment 77 77 public long first; // First CONN node 78 78 public long last; // Last CONN node … … 90 90 } 91 91 92 public class Reln {92 public static class Reln { 93 93 public long id; 94 94 public Rflag reln; … … 99 99 } 100 100 101 public class RelTab extends ArrayList<Reln> {101 public static class RelTab extends ArrayList<Reln> { 102 102 public RelTab() { 103 103 super(); … … 105 105 } 106 106 107 public class ObjTab extends HashMap<Integer, AttMap> {107 public static class ObjTab extends HashMap<Integer, AttMap> { 108 108 public ObjTab() { 109 109 super(); … … 111 111 } 112 112 113 public class ObjMap extends EnumMap<Obj, ObjTab> {113 public static class ObjMap extends EnumMap<Obj, ObjTab> { 114 114 public ObjMap() { 115 115 super(Obj.class); … … 117 117 } 118 118 119 public class AttMap extends HashMap<Att, AttVal<?>> {119 public static class AttMap extends HashMap<Att, AttVal<?>> { 120 120 public AttMap() { 121 121 super(); … … 123 123 } 124 124 125 public class NodeTab extends HashMap<Long, Snode> {125 public static class NodeTab extends HashMap<Long, Snode> { 126 126 public NodeTab() { 127 127 super(); … … 129 129 } 130 130 131 public class EdgeTab extends HashMap<Long, Edge> {131 public static class EdgeTab extends HashMap<Long, Edge> { 132 132 public EdgeTab() { 133 133 super(); … … 135 135 } 136 136 137 public class FtrMap extends EnumMap<Obj, ArrayList<Feature>> {137 public static class FtrMap extends EnumMap<Obj, ArrayList<Feature>> { 138 138 public FtrMap() { 139 139 super(Obj.class); … … 141 141 } 142 142 143 public class FtrTab extends HashMap<Long, Feature> {143 public static class FtrTab extends HashMap<Long, Feature> { 144 144 public FtrTab() { 145 145 super(); … … 147 147 } 148 148 149 public class Prim { // Spatial element149 public static class Prim { // Spatial element 150 150 public long id; // Snode ID for POINTs, Edge ID for LINEs & AREAs) 151 151 public boolean forward; // Direction of vector used (LINEs & AREAs) … … 173 173 } 174 174 175 public class Comp { // Composite spatial element175 public static class Comp { // Composite spatial element 176 176 public long ref; // ID of Comp 177 177 public int size; // Number of Prims in this Comp … … 186 186 } 187 187 188 public class Geom { // Geometric structure of feature188 public static class Geom { // Geometric structure of feature 189 189 public Pflag prim; // Geometry type 190 190 public ArrayList<Prim> elems; // Ordered list of elements … … 206 206 } 207 207 208 public class Feature {208 public static class Feature { 209 209 public long id; // Ref for this feature 210 210 public Rflag reln; // Relationship status -
applications/editors/josm/plugins/seachart/src/s57/S57osm.java
r32907 r32909 7 7 8 8 import s57.S57att.Att; 9 import s57.S57map.Snode; 9 10 import s57.S57obj.Obj; 10 11 import s57.S57val.CatBUA; … … 103 104 boolean inWay = false; 104 105 boolean inRel = false; 105 map.nodes.put(1L, map.new Snode());106 map.nodes.put(2L, map.new Snode());107 map.nodes.put(3L, map.new Snode());108 map.nodes.put(4L, map.new Snode());106 map.nodes.put(1L, new Snode()); 107 map.nodes.put(2L, new Snode()); 108 map.nodes.put(3L, new Snode()); 109 map.nodes.put(4L, new Snode()); 109 110 110 111 String ln;
Note:
See TracChangeset
for help on using the changeset viewer.