Search in sources :

Example 16 with LngLatAlt

use of org.geojson.LngLatAlt in project geojson-jackson by opendatalab-de.

the class PolygonTest method itShouldReplaceExteriorRing.

@Test
public void itShouldReplaceExteriorRing() throws Exception {
    Polygon polygon = new Polygon(Arrays.asList(new LngLatAlt(0, 0), new LngLatAlt(1, 0), new LngLatAlt(1, 1), new LngLatAlt(0, 1), new LngLatAlt(0, 0)));
    polygon.setExteriorRing(MockData.EXTERNAL);
    assertEquals(MockData.EXTERNAL, polygon.getExteriorRing());
    assertEquals(0, polygon.getInteriorRings().size());
}
Also used : Polygon(org.geojson.Polygon) LngLatAlt(org.geojson.LngLatAlt) Test(org.junit.Test)

Aggregations

LngLatAlt (org.geojson.LngLatAlt)16 Test (org.junit.Test)10 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)3 MultiPoint (org.geojson.MultiPoint)3 Polygon (org.geojson.Polygon)3 ArrayList (java.util.ArrayList)2 LineString (org.geojson.LineString)2 Coordinate (org.openforis.idm.model.Coordinate)2 Coordinate (com.vividsolutions.jts.geom.Coordinate)1 Polygon (com.vividsolutions.jts.geom.Polygon)1 FileInputStream (java.io.FileInputStream)1 IOException (java.io.IOException)1 InputStreamReader (java.io.InputStreamReader)1 InvocationTargetException (java.lang.reflect.InvocationTargetException)1 MultiLineString (org.geojson.MultiLineString)1 MultiPolygon (org.geojson.MultiPolygon)1 Location (org.onebusaway.gtfs.model.Location)1 CollectSurvey (org.openforis.collect.model.CollectSurvey)1 CollectSurveyContext (org.openforis.collect.model.CollectSurveyContext)1 SamplingDesignItem (org.openforis.collect.model.SamplingDesignItem)1