Ignore:
Timestamp:
2013-01-29T21:49:08+01:00 (13 years ago)
Author:
malcolmh
Message:

save

Location:
applications/editors/josm/plugins/smed2/src/seamap
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/smed2/src/seamap/Renderer.java

    r29207 r29215  
    7171        }
    7272
    73         public static double calcArea(Feature feature) {
     73        public static double signedArea(Feature feature) {
    7474          if (feature.flag == Fflag.AREA) {
    7575                        ArrayList<Long> way;
     
    9191                                llat = lat;
    9292            }
    93             return Math.abs(sigma) * 3444 * 3444 / 2.0;
     93            return sigma;
    9494          }
    95           return 0.0;
     95          return 0;
     96        }
     97
     98        public boolean handOfArea(Feature feature) {
     99                return (signedArea(feature) < 0);
     100        }
     101       
     102        public static double calcArea(Feature feature) {
     103          return Math.abs(signedArea(feature)) * 3444 * 3444 / 2.0;
    96104        }
    97105
  • applications/editors/josm/plugins/smed2/src/seamap/SeaMap.java

    r29206 r29215  
    2626                UNKN, NODE, LINE, AREA
    2727        }
     28       
     29        public enum Nflag {
     30                ANON, ISOL, CONN
     31        }
     32
     33        public class Coord {
     34                public double lat;
     35                public double lon;
     36                public Nflag flg;
     37
     38                public Coord(double ilat, double ilon) {
     39                        lat = ilat;
     40                        lon = ilon;
     41                        flg = Nflag.ANON;
     42                }
     43                public Coord(double ilat, double ilon, Nflag iflg) {
     44                        lat = ilat;
     45                        lon = ilon;
     46                        flg = iflg;
     47                }
     48        }
    2849
    2950        public class AttItem {
     
    98119                        atts = new AttMap();
    99120                        objs = new ObjMap();
    100                 }
    101         }
    102 
    103         public class Coord {
    104                 public double lat;
    105                 public double lon;
    106 
    107                 public Coord(double ilat, double ilon) {
    108                         lat = ilat;
    109                         lon = ilon;
    110121                }
    111122        }
Note: See TracChangeset for help on using the changeset viewer.