Changeset 31735 in osm for applications/editors/josm/plugins/seachart/src/s57/S57map.java
- Timestamp:
- 2015-11-08T09:49:14+01:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/seachart/src/s57/S57map.java
r31734 r31735 219 219 } 220 220 221 public MapBounds bounds; 221 222 public NodeTab nodes; 222 223 public EdgeTab edges; 223 224 224 public FtrMap features; 225 225 public FtrTab index; 226 227 public MapBounds bounds;228 229 public long cref;230 226 public long xref; 227 228 private long cref; 231 229 private Feature feature; 232 230 private Edge edge; 233 231 private KeyVal<?> osm = S57osm.OSMtag("", ""); 234 boolean sea; 232 private boolean sea; 235 233 236 234 public S57map(boolean s) { … … 367 365 368 366 // OSM map building methods 369 367 370 368 public void addNode(long id, double lat, double lon) { 371 Snode node = new Snode(Math.toRadians(lat), Math.toRadians(lon)); 372 nodes.put(id, node); 369 nodes.put(id, new Snode(Math.toRadians(lat), Math.toRadians(lon))); 373 370 feature = new Feature(); 374 371 feature.id = id; … … 555 552 556 553 enum Ext {I, N, W, S, E } 554 557 555 public void mapDone() { 558 556 class Land { … … 579 577 for (Feature feature : features.get(Obj.COALNE)) { 580 578 Feature land = new Feature(); 579 land.id = ++xref; 581 580 land.type = Obj.LNDARE; 582 581 land.reln = Rflag.MASTER; 583 582 land.objs.put(Obj.LNDARE, new ObjTab()); 583 land.objs.get(Obj.LNDARE).put(0, new AttMap()); 584 584 if (feature.geom.prim == Pflag.AREA) { 585 585 land.geom = feature.geom; … … 587 587 } else if (feature.geom.prim == Pflag.LINE) { 588 588 land.geom.prim = Pflag.LINE; 589 for (int i = 0; i < feature.geom.elems.size(); i++) { 590 land.geom.elems.add(feature.geom.elems.get(i)); 591 } 589 land.geom.elems.addAll(feature.geom.elems); 592 590 coasts.add(land); 593 591 }
Note:
See TracChangeset
for help on using the changeset viewer.
