Ignore:
Timestamp:
2015-11-08T09:49:14+01:00 (10 years ago)
Author:
malcolmh
Message:

[seachart] update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/seachart/src/s57/S57map.java

    r31734 r31735  
    219219        }
    220220       
     221        public MapBounds bounds;
    221222        public NodeTab nodes;
    222223        public EdgeTab edges;
    223 
    224224        public FtrMap features;
    225225        public FtrTab index;
    226        
    227         public MapBounds bounds;
    228 
    229         public long cref;
    230226        public long xref;
     227
     228        private long cref;
    231229        private Feature feature;
    232230        private Edge edge;
    233231        private KeyVal<?> osm = S57osm.OSMtag("", "");
    234         boolean sea;
     232        private boolean sea;
    235233
    236234        public S57map(boolean s) {
     
    367365
    368366        // OSM map building methods
    369        
     367
    370368        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)));
    373370                feature = new Feature();
    374371                feature.id = id;
     
    555552       
    556553        enum Ext {I, N, W, S, E }
     554       
    557555        public void mapDone() {
    558556                class Land {
     
    579577                        for (Feature feature : features.get(Obj.COALNE)) {
    580578                                Feature land = new Feature();
     579                                land.id = ++xref;
    581580                                land.type = Obj.LNDARE;
    582581                                land.reln = Rflag.MASTER;
    583582                                land.objs.put(Obj.LNDARE, new ObjTab());
     583                                land.objs.get(Obj.LNDARE).put(0, new AttMap());
    584584                                if (feature.geom.prim == Pflag.AREA) {
    585585                                        land.geom = feature.geom;
     
    587587                                } else if (feature.geom.prim == Pflag.LINE) {
    588588                                        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);
    592590                                        coasts.add(land);
    593591                                }
Note: See TracChangeset for help on using the changeset viewer.