Loading atlas-lib/src/main/java/es/redmic/atlaslib/dto/layer/LayerDTO.java +3 −4 Original line number Diff line number Diff line Loading @@ -28,7 +28,6 @@ import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; import org.apache.avro.Schema; import org.locationtech.jts.geom.Geometry; import org.locationtech.jts.geom.Polygon; import com.fasterxml.jackson.annotation.JsonIgnore; Loading Loading @@ -113,7 +112,7 @@ public class LayerDTO extends LayerCompactDTO { private String image; @NotNull private Geometry geometry; private Polygon geometry; public String getTitle() { return title; Loading Loading @@ -203,11 +202,11 @@ public class LayerDTO extends LayerCompactDTO { this.image = image; } public Geometry getGeometry() { public Polygon getGeometry() { return geometry; } public void setGeometry(Geometry geometry) { public void setGeometry(Polygon geometry) { this.geometry = geometry; } Loading atlas-lib/src/test/java/es/redmic/atlaslib/unit/dto/layer/LayerEqualTest.java +8 −2 Original line number Diff line number Diff line Loading @@ -23,9 +23,9 @@ package es.redmic.atlaslib.unit.dto.layer; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import org.geotools.geometry.jts.JTSFactoryFinder; import org.junit.Test; import org.locationtech.jts.geom.Coordinate; import org.locationtech.jts.geom.GeometryFactory; import es.redmic.atlaslib.dto.layer.LayerDTO; import es.redmic.atlaslib.unit.utils.LayerDataUtil; Loading Loading @@ -247,7 +247,13 @@ public class LayerEqualTest { LayerDTO dto2 = LayerDataUtil.getLayer(); dto1.setGeometry(new GeometryFactory().createPoint(new Coordinate(45.56433, 37.94388))); Coordinate[] coordinates = new Coordinate[] { new Coordinate(-18.1745567321777, 27.6111183166504), new Coordinate(-18.1745567321777, 29.4221172332764), new Coordinate(-13.5011913299561, 29.4221172332764), new Coordinate(-13.3011913299561, 27.6111183166504), new Coordinate(-18.1745567321777, 27.6111183166504) }; dto1.setGeometry(JTSFactoryFinder.getGeometryFactory().createPolygon(coordinates)); assertFalse(dto1.equals(dto2)); } Loading Loading
atlas-lib/src/main/java/es/redmic/atlaslib/dto/layer/LayerDTO.java +3 −4 Original line number Diff line number Diff line Loading @@ -28,7 +28,6 @@ import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; import org.apache.avro.Schema; import org.locationtech.jts.geom.Geometry; import org.locationtech.jts.geom.Polygon; import com.fasterxml.jackson.annotation.JsonIgnore; Loading Loading @@ -113,7 +112,7 @@ public class LayerDTO extends LayerCompactDTO { private String image; @NotNull private Geometry geometry; private Polygon geometry; public String getTitle() { return title; Loading Loading @@ -203,11 +202,11 @@ public class LayerDTO extends LayerCompactDTO { this.image = image; } public Geometry getGeometry() { public Polygon getGeometry() { return geometry; } public void setGeometry(Geometry geometry) { public void setGeometry(Polygon geometry) { this.geometry = geometry; } Loading
atlas-lib/src/test/java/es/redmic/atlaslib/unit/dto/layer/LayerEqualTest.java +8 −2 Original line number Diff line number Diff line Loading @@ -23,9 +23,9 @@ package es.redmic.atlaslib.unit.dto.layer; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import org.geotools.geometry.jts.JTSFactoryFinder; import org.junit.Test; import org.locationtech.jts.geom.Coordinate; import org.locationtech.jts.geom.GeometryFactory; import es.redmic.atlaslib.dto.layer.LayerDTO; import es.redmic.atlaslib.unit.utils.LayerDataUtil; Loading Loading @@ -247,7 +247,13 @@ public class LayerEqualTest { LayerDTO dto2 = LayerDataUtil.getLayer(); dto1.setGeometry(new GeometryFactory().createPoint(new Coordinate(45.56433, 37.94388))); Coordinate[] coordinates = new Coordinate[] { new Coordinate(-18.1745567321777, 27.6111183166504), new Coordinate(-18.1745567321777, 29.4221172332764), new Coordinate(-13.5011913299561, 29.4221172332764), new Coordinate(-13.3011913299561, 27.6111183166504), new Coordinate(-18.1745567321777, 27.6111183166504) }; dto1.setGeometry(JTSFactoryFinder.getGeometryFactory().createPolygon(coordinates)); assertFalse(dto1.equals(dto2)); } Loading