Examples of GkPosition


Examples of slash.navigation.base.GkPosition

        assertTrue(format.isPosition("3811134.00 5818411.00"));
        assertTrue(format.isPosition("3799444.14 \t 5829944.10 \tHamburg/Uhlenhorst"));
    }

    public void testParsePosition() {
        GkPosition position = format.parsePosition("3799444.14 \t 5829944.10");
        assertNotNull(position);
        assertNearBy(13.4115129, position.getLongitude());
        assertNearBy(52.5202079, position.getLatitude());
        assertEquals(3799444.14, position.getRight());
        assertEquals(5829944.10, position.getHeight());
        assertNull(position.getElevation());
        assertNull(position.getTime());
        assertNull(position.getDescription());
    }
View Full Code Here

Examples of slash.navigation.base.GkPosition

        assertNull(position.getTime());
        assertNull(position.getDescription());
    }

    public void testParsePositionWithdescription() {
        GkPosition position = format.parsePosition("3799444.14 \t 5829944.10 \tHamburg/Uhlenhorst");
        assertNotNull(position);
        assertNearBy(13.4115129, position.getLongitude());
        assertNearBy(52.5202079, position.getLatitude());
        assertEquals(3799444.14, position.getRight());
        assertEquals(5829944.10, position.getHeight());
        assertNull(position.getElevation());
        assertNull(position.getTime());
        assertEquals("Hamburg/Uhlenhorst", position.getDescription());
    }
View Full Code Here

Examples of slash.navigation.base.GkPosition

    public MagicMapsPthRoute(RouteCharacteristics characteristics, List<GkPosition> positions) {
        this(new MagicMapsPthFormat(), characteristics, positions);
    }

    public GkPosition createPosition(Double longitude, Double latitude, Double elevation, Double speed, CompactCalendar time, String description) {
        return new GkPosition(longitude, latitude, elevation, speed, time, description);
    }
View Full Code Here

Examples of slash.navigation.base.GkPosition

            //noinspection StatementWithEmptyBody
            if (line.startsWith("#")) {
            } else //noinspection StatementWithEmptyBody
                if (isNameValue(line)) {
            } else if (isPosition(line)) {
                GkPosition position = parsePosition(line);
                positions.add(position);
            } else {
                return;
            }
        }
View Full Code Here

Examples of slash.navigation.base.GkPosition

        if (!lineMatcher.matches())
            throw new IllegalArgumentException("'" + line + "' does not match");
        Double right = parseDouble(lineMatcher.group(1));
        Double height = parseDouble(lineMatcher.group(2));
        String description = trim(lineMatcher.group(3));
        return new GkPosition(right, height, description);
    }
View Full Code Here

Examples of slash.navigation.base.GkPosition

        writer.println("# Path2D file format V1.0 - MagicMaps");
        writer.println("Pathsize: " + positions.size());
        writer.println("selectedPoint: 1");

        for (int i = startIndex; i < endIndex; i++) {
            GkPosition position = positions.get(i);
            String right = formatDoubleAsString(position.getRight(), 2);
            String height = formatDoubleAsString(position.getHeight(), 2);
            writer.println(right + " \t " + height);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.