use of com.thoughtworks.xstream.io.xml.DomReader in project ddf by codice.
the class TestBoundingBoxReader method testJTSConverterEPSG4326LatLon.
@Test
public void testJTSConverterEPSG4326LatLon() throws Exception {
// Setup
DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder docBuilder = docFactory.newDocumentBuilder();
Document doc = docBuilder.parse("src/test/resources/BoundingBoxInLatLonEPSG4326.xml");
HierarchicalStreamReader hReader = new DomReader(doc);
BoundingBoxReader boundingBoxReader = new BoundingBoxReader(hReader, CswAxisOrder.LAT_LON);
// Perform Test
String wktInLonLat = boundingBoxReader.getWkt();
LOGGER.debug("WKT: {}", wktInLonLat);
// Verify
assertThat(wktInLonLat, is(POLYGON_CONTROL_WKT_IN_LON_LAT));
}
Aggregations