Package com.github.jsonj

Examples of com.github.jsonj.JsonArray.first()


        assertThat(swapLatLon(toJsonJPoint(point1)), is(array(2.0,1.0)));
    }

    public void shouldConvertLineString() {
        JsonArray ls = toJsonJLineString(lineString1);
        assertThat(ls.first().asArray(), is(toJsonJPoint(point1)));
        assertThat(ls.last().asArray(), is(toJsonJPoint(point3)));
    }

    public void shouldSwapPoints() {
        JsonArray ls = toJsonJLineString(lineString1);
View Full Code Here


    }

    public void shouldSwapPoints() {
        JsonArray ls = toJsonJLineString(lineString1);
        JsonArray swapped = swapLatLon(ls);
        assertThat(swapped.first().asArray(), is(array(2.0,1.0)));
    }

    public void shouldConvertLineStringToPolygon() {
        JsonArray polygon = GeoJsonSupport.lineStringToPolygon(lineString1);
        assertThat(polygon.first().asArray().last().asArray(), is(toJsonJPoint(point1)));
View Full Code Here

        assertThat(swapped.first().asArray(), is(array(2.0,1.0)));
    }

    public void shouldConvertLineStringToPolygon() {
        JsonArray polygon = GeoJsonSupport.lineStringToPolygon(lineString1);
        assertThat(polygon.first().asArray().last().asArray(), is(toJsonJPoint(point1)));
    }
}
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.