Package org.openstreetmap.josm.data.osm

Examples of org.openstreetmap.josm.data.osm.WaySegment


    /**
     * This method is used to detect segment under mouse and use it as reference for angle snapping
     */
    private void tryToSetBaseSegmentForAngleSnap() {
        WaySegment seg = Main.map.mapView.getNearestWaySegment(mousePos, OsmPrimitive.isSelectablePredicate);
        if (seg!=null) {
            snapHelper.setBaseSegment(seg);
        }
    }
View Full Code Here


    }

    private void tryToMoveNodeOnIntersection(List<WaySegment> wss, Node n) {
        if (wss.isEmpty())
            return;
        WaySegment ws = wss.get(0);
        EastNorth p1=ws.getFirstNode().getEastNorth();
        EastNorth p2=ws.getSecondNode().getEastNorth();
        if (snapHelper.dir2!=null && currentBaseNode!=null) {
            EastNorth xPoint = Geometry.getSegmentSegmentIntersection(p1, p2, snapHelper.dir2, currentBaseNode.getEastNorth());
            if (xPoint!=null) {
                n.setEastNorth(xPoint);
            }
View Full Code Here

                bestAngle = currentAngle;
                bestDistance = currentDistance;
            }

        }
        return candidate != -1 ? new WaySegment(w, candidate) : null;
    }
View Full Code Here

TOP

Related Classes of org.openstreetmap.josm.data.osm.WaySegment

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.