public static GeoPoint fromInvertedDoubleString(final String s, final char spacer) {
        final int spacerPos1 = s.indexOf(spacer);
        final int spacerPos2 = s.indexOf(spacer, spacerPos1 + 1);

        if (spacerPos2 == -1) {
            return new GeoPoint(
                    Double.parseDouble(s.substring(spacerPos1 + 1, s.length())),
                    Double.parseDouble(s.substring(0, spacerPos1)));
        } else {
            return new GeoPoint(
                    Double.parseDouble(s.substring(spacerPos1 + 1, spacerPos2)),
                    Double.parseDouble(s.substring(0, spacerPos1)),
                    Double.parseDouble(s.substring(spacerPos2 + 1, s.length())));

        }
    }
@Test
    public void test_toFromInvertedDoubleString_withoutAltitude() {
        final GeoPoint in = new GeoPoint(-117.123, 33.123);
        final GeoPoint out = GeoPoint.fromInvertedDoubleString("33.123,-117.123", ',');
        assertEquals("toFromString without altitude", in, out);
    }