Package org.openstreetmap.josm.data.osm.history

Examples of org.openstreetmap.josm.data.osm.history.HistoryNode


    static class HistoryPrimitiveBuilder extends AbstractVisitor {
        private HistoryOsmPrimitive clone;

        @Override
        public void visit(Node n) {
            clone = new HistoryNode(n.getId(), n.getVersion(), n.isVisible(), getCurrentUser(), 0, null, n.getCoor(), false);
            clone.setTags(n.getKeys());
        }
View Full Code Here


        protected void refresh() {
            HistoryOsmPrimitive p = getPrimitive();
            HistoryOsmPrimitive  opposite = getOppositePrimitive();
            if (!(p instanceof HistoryNode)) return;
            if (!(opposite instanceof HistoryNode)) return;
            HistoryNode node = (HistoryNode)p;
            HistoryNode oppositeNode = (HistoryNode) opposite;

            LatLon coord = node.getCoords();
            LatLon oppositeCoord = oppositeNode.getCoords();

            // display the coordinates
            //
            lblLat.setText(coord != null ? coord.latToString(CoordinateFormat.DECIMAL_DEGREES) : tr("(none)"));
            lblLon.setText(coord != null ? coord.lonToString(CoordinateFormat.DECIMAL_DEGREES) : tr("(none)"));
View Full Code Here

        protected void refresh() {
            HistoryOsmPrimitive p = getPrimitive();
            HistoryOsmPrimitive opposite = getOppositePrimitive();
            if (!(p instanceof HistoryNode)) return;
            if (!(opposite instanceof HistoryNode)) return;
            HistoryNode node = (HistoryNode) p;
            HistoryNode oppositeNode = (HistoryNode) opposite;

            LatLon coord = node.getCoords();
            LatLon oppositeCoord = oppositeNode.getCoords();

            // update distance
            //
            if (coord != null && oppositeCoord != null) {
                double distance = coord.greatCircleDistance(oppositeCoord);
View Full Code Here

        HistoryOsmPrimitive primitive = null;
        if (type.equals(OsmPrimitiveType.NODE)) {
            Double lat = getAttributeDouble(atts, "lat");
            Double lon = getAttributeDouble(atts, "lon");
            LatLon coor = (lat != null && lon != null) ? new LatLon(lat,lon) : null;
            primitive = new HistoryNode(
                    id,version,visible,user,changesetId,timestamp,coor
            );

        } else if (type.equals(OsmPrimitiveType.WAY)) {
            primitive = new HistoryWay(
View Full Code Here

TOP

Related Classes of org.openstreetmap.josm.data.osm.history.HistoryNode

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.