Ignore:
Timestamp:
2009-06-26T21:45:10+02:00 (15 years ago)
Author:
jttt
Message:

Use getter for Node.coor and Node.latLon, fix warnings

Location:
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/GridLayer.java

    r14406 r16159  
    160160        public void visit(Node n)
    161161        {
    162             double x = n.eastNorth.east() * gridDetail;
    163             double y = n.eastNorth.north()* gridDetail + 1;
     162            double x = n.getEastNorth().east() * gridDetail;
     163            double y = n.getEastNorth().north()* gridDetail + 1;
    164164
    165165            drawCell( Math.floor(x), Math.floor(y) );
  • applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/TestError.java

    r14406 r16159  
    280280         */
    281281        public void drawNode(Node n, Color color) {
    282             Point p = mv.getPoint(n.eastNorth);
     282            Point p = mv.getPoint(n.getEastNorth());
    283283            g.setColor(color);
    284284            if (selected) {
     
    295295         */
    296296        public void drawSegment(Node n1, Node n2, Color color) {
    297             Point p1 = mv.getPoint(n1.eastNorth);
    298             Point p2 = mv.getPoint(n2.eastNorth);
     297            Point p1 = mv.getPoint(n1.getEastNorth());
     298            Point p2 = mv.getPoint(n2.getEastNorth());
    299299            g.setColor(color);
    300300
     
    365365         */
    366366        protected boolean isNodeVisible(Node n) {
    367             Point p = mv.getPoint(n.eastNorth);
     367            Point p = mv.getPoint(n.getEastNorth());
    368368            return !((p.x < 0) || (p.y < 0) || (p.x > mv.getWidth()) || (p.y > mv.getHeight()));
    369369        }
     
    377377         */
    378378        protected boolean isSegmentVisible(Node n1, Node n2) {
    379             Point p1 = mv.getPoint(n1.eastNorth);
    380             Point p2 = mv.getPoint(n2.eastNorth);
     379            Point p1 = mv.getPoint(n1.getEastNorth());
     380            Point p2 = mv.getPoint(n2.getEastNorth());
    381381            if ((p1.x < 0) && (p2.x < 0))
    382382                return false;
  • applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/CrossingWays.java

    r13497 r16159  
    203203
    204204            return Line2D.linesIntersect(
    205                 n1.eastNorth.east(), n1.eastNorth.north(),
    206                 n2.eastNorth.east(), n2.eastNorth.north(),
    207                 s2.n1.eastNorth.east(), s2.n1.eastNorth.north(),
    208                 s2.n2.eastNorth.east(), s2.n2.eastNorth.north());
     205                n1.getEastNorth().east(), n1.getEastNorth().north(),
     206                n2.getEastNorth().east(), n2.getEastNorth().north(),
     207                s2.n1.getEastNorth().east(), s2.n1.getEastNorth().north(),
     208                s2.n2.getEastNorth().east(), s2.n2.getEastNorth().north());
    209209        }
    210210    }
  • applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/DuplicateNode.java

    r13497 r16159  
    5959    {
    6060        if(!n.deleted && !n.incomplete)
    61             nodes.add(n.coor, n);
     61            nodes.add(n.getCoor(), n);
    6262    }
    6363
  • applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/UnclosedWays.java

    r13598 r16159  
    107107            Node f = w.nodes.get(0);
    108108            Node l = w.nodes.get(w.nodes.size() - 1);
    109             if(force || f.coor.greatCircleDistance(l.coor) < 10000)
     109            if(force || f.getCoor().greatCircleDistance(l.getCoor()) < 10000)
    110110            {
    111111                List<OsmPrimitive> primitives = new ArrayList<OsmPrimitive>();
  • applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/UnconnectedWays.java

    r14015 r16159  
    6767            for(MyWaySegment s : ways)
    6868            {
    69                 if(s.highway && s.nearby(en, mindist) && (a == null || a.contains(en.coor)))
     69                if(s.highway && s.nearby(en, mindist) && (a == null || a.contains(en.getCoor())))
    7070                    map.put(en, s.w);
    7171            }
     
    8585            for(MyWaySegment s : ways)
    8686            {
    87                 if(!s.highway && s.nearby(en, mindist) && !s.isArea() && (a == null || a.contains(en.coor)))
     87                if(!s.highway && s.nearby(en, mindist) && !s.isArea() && (a == null || a.contains(en.getCoor())))
    8888                    map.put(en, s.w);
    8989            }
     
    9393            for(MyWaySegment s : ways)
    9494            {
    95                 if(s.nearby(en, mindist) && !s.isArea() && (a == null || a.contains(en.coor)))
     95                if(s.nearby(en, mindist) && !s.isArea() && (a == null || a.contains(en.getCoor())))
    9696                    map.put(en, s.w);
    9797            }
     
    114114                for(MyWaySegment s : ways)
    115115                {
    116                     if(s.nearby(en, minmiddledist) && (a == null || a.contains(en.coor)))
     116                    if(s.nearby(en, minmiddledist) && (a == null || a.contains(en.getCoor())))
    117117                        map.put(en, s.w);
    118118                }
     
    132132                for(MyWaySegment s : ways)
    133133                {
    134                     if(s.nearby(en, minmiddledist) && (a == null || a.contains(en.coor)))
     134                    if(s.nearby(en, minmiddledist) && (a == null || a.contains(en.getCoor())))
    135135                        map.put(en, s.w);
    136136                }
     
    160160            this.w = w;
    161161            this.highway = w.get("highway") != null || w.get("railway") != null;
    162             line = new Line2D.Double(n1.eastNorth.east(), n1.eastNorth.north(),
    163             n2.eastNorth.east(), n2.eastNorth.north());
     162            line = new Line2D.Double(n1.getEastNorth().east(), n1.getEastNorth().north(),
     163            n2.getEastNorth().east(), n2.getEastNorth().north());
    164164        }
    165165
     
    167167        {
    168168            return !w.nodes.contains(n)
    169             && line.ptSegDist(n.eastNorth.east(), n.eastNorth.north()) < dist;
     169            && line.ptSegDist(n.getEastNorth().east(), n.getEastNorth().north()) < dist;
    170170        }
    171171       
  • applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/WronglyOrderedWays.java

    r13497 r16159  
    9494            for (int node = 1; node < w.nodes.size(); node++)
    9595            {
    96                 area2 += (w.nodes.get(node-1).coor.lon() * w.nodes.get(node).coor.lat()
    97                 - w.nodes.get(node).coor.lon() * w.nodes.get(node-1).coor.lat());
     96                area2 += (w.nodes.get(node-1).getCoor().lon() * w.nodes.get(node).getCoor().lat()
     97                - w.nodes.get(node).getCoor().lon() * w.nodes.get(node-1).getCoor().lat());
    9898            }
    9999
  • applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/util/AgregatePrimitivesVisitor.java

    r14406 r16159  
    22
    33import java.util.Collection;
    4 import java.util.Comparator;
    54import java.util.LinkedList;
    65
    7 import org.openstreetmap.josm.data.osm.*;
     6import org.openstreetmap.josm.data.osm.Node;
     7import org.openstreetmap.josm.data.osm.OsmPrimitive;
     8import org.openstreetmap.josm.data.osm.Relation;
     9import org.openstreetmap.josm.data.osm.RelationMember;
     10import org.openstreetmap.josm.data.osm.Way;
    811import org.openstreetmap.josm.data.osm.visitor.AbstractVisitor;
    912
  • applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/util/Util.java

    r13497 r16159  
    1212import org.openstreetmap.josm.data.osm.Node;
    1313import org.openstreetmap.josm.data.osm.Way;
    14 import org.openstreetmap.josm.plugins.PluginInformation;
    1514import org.openstreetmap.josm.plugins.validator.OSMValidatorPlugin;
    1615
     
    5150
    5251        // First, round coordinates
    53         long x0 = Math.round(n1.eastNorth.east()  * OSMValidatorPlugin.griddetail);
    54         long y0 = Math.round(n1.eastNorth.north() * OSMValidatorPlugin.griddetail);
    55         long x1 = Math.round(n2.eastNorth.east()  * OSMValidatorPlugin.griddetail);
    56         long y1 = Math.round(n2.eastNorth.north() * OSMValidatorPlugin.griddetail);
     52        long x0 = Math.round(n1.getEastNorth().east()  * OSMValidatorPlugin.griddetail);
     53        long y0 = Math.round(n1.getEastNorth().north() * OSMValidatorPlugin.griddetail);
     54        long x1 = Math.round(n2.getEastNorth().east()  * OSMValidatorPlugin.griddetail);
     55        long y1 = Math.round(n2.getEastNorth().north() * OSMValidatorPlugin.griddetail);
    5756
    5857        // Start of the way
     
    8281
    8382        // Then floor coordinates, in case the way is in the border of the cell.
    84         x0 = (long)Math.floor(n1.eastNorth.east()  * OSMValidatorPlugin.griddetail);
    85         y0 = (long)Math.floor(n1.eastNorth.north() * OSMValidatorPlugin.griddetail);
    86         x1 = (long)Math.floor(n2.eastNorth.east()  * OSMValidatorPlugin.griddetail);
    87         y1 = (long)Math.floor(n2.eastNorth.north() * OSMValidatorPlugin.griddetail);
     83        x0 = (long)Math.floor(n1.getEastNorth().east()  * OSMValidatorPlugin.griddetail);
     84        y0 = (long)Math.floor(n1.getEastNorth().north() * OSMValidatorPlugin.griddetail);
     85        x1 = (long)Math.floor(n2.getEastNorth().east()  * OSMValidatorPlugin.griddetail);
     86        y1 = (long)Math.floor(n2.getEastNorth().north() * OSMValidatorPlugin.griddetail);
    8887
    8988        // Start of the way
     
    131130    {
    132131        List<Point2D> cells = new ArrayList<Point2D>();
    133         double x0 = n1.eastNorth.east() * gridDetail;
    134         double x1 = n2.eastNorth.east() * gridDetail;
    135         double y0 = n1.eastNorth.north() * gridDetail + 1;
    136         double y1 = n2.eastNorth.north() * gridDetail + 1;
     132        double x0 = n1.getEastNorth().east() * gridDetail;
     133        double x1 = n2.getEastNorth().east() * gridDetail;
     134        double y0 = n1.getEastNorth().north() * gridDetail + 1;
     135        double y1 = n2.getEastNorth().north() * gridDetail + 1;
    137136
    138137        if( x0 > x1 )
Note: See TracChangeset for help on using the changeset viewer.