Ignore:
Timestamp:
2015-02-20T12:34:09+01:00 (10 years ago)
Author:
malcolmh
Message:

cope with missing nodes

File:
1 edited

Legend:

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

    r31028 r31031  
    942942                                while (git.hasNode()) {
    943943                                        node = git.next();
    944                                         if (node != null) {
    945                                                 llon = lon;
    946                                                 llat = lat;
    947                                                 lat = node.lat;
    948                                                 lon = node.lon;
    949                                                 sigma += (lon * Math.sin(llat)) - (llon * Math.sin(lat));
    950                                         }
     944                                        if (node == null) continue;
     945                                        llon = lon;
     946                                        llat = lat;
     947                                        lat = node.lat;
     948                                        lon = node.lon;
     949                                        sigma += (lon * Math.sin(llat)) - (llon * Math.sin(lat));
    951950                                }
    952951                        }
     
    10091008                                        while (git.hasNode()) {
    10101009                                                Snode node = git.next();
     1010                                                if (node == null) continue;
    10111011                                                lat = node.lat;
    10121012                                                lon = node.lon;
     
    10311031                                        while (git.hasNode()) {
    10321032                                                Snode node = git.next();
     1033                                                if (node == null) continue;
    10331034                                                lat = node.lat;
    10341035                                                lon = node.lon;
Note: See TracChangeset for help on using the changeset viewer.