Package sagan.team

Examples of sagan.team.GeoLocation


        if (!m.find()) {
            throw new ParseException(text, 0);
        }
        float latitude = Float.valueOf(m.group(1));
        float longitude = Float.valueOf(m.group(2));
        return new GeoLocation(latitude, longitude);
    }
View Full Code Here


    public void testNoParse() throws Exception {
        formatter.parse("afslk", null);
    }

    private void assertLatLon(String latLon, float lat, float lon) throws ParseException {
        GeoLocation location = formatter.parse(latLon, null);
        assertThat(location.getLatitude(), equalTo(lat));
        assertThat(location.getLongitude(), equalTo(lon));
    }
View Full Code Here

        assertThat(location.getLongitude(), equalTo(lon));
    }

    @Test
    public void testPrint() throws Exception {
        assertThat(formatter.print(new GeoLocation(-10.3f, 87.42f), null), equalTo("-10.300000,87.419998"));
    }
View Full Code Here

TOP

Related Classes of sagan.team.GeoLocation

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.