@Test public void constructPositiveIsochroneBBoxTest() { BBox bbox = JsonIsochronesRequestProcessor.constructIsochroneBBox(positiveEnv); BBox expectedBBox = new BBox(2.288033, 2.304801, 48.854886, 48.864247); Assert.assertTrue(bbox.isValid()); Assert.assertEquals(expectedBBox.maxLat, bbox.maxLat, 0.0); Assert.assertEquals(expectedBBox.maxLon, bbox.maxLon, 0.0); Assert.assertEquals(expectedBBox.minLat, bbox.minLat, 0.0); Assert.assertEquals(expectedBBox.minLon, bbox.minLon, 0.0); Assert.assertEquals(Double.NaN, bbox.minEle, 0.0); Assert.assertEquals(Double.NaN, bbox.maxEle, 0.0); }
public static BBox constructIsochroneBBox(Envelope env){ BBox bbox = new BBox(0,0,0,0); if (Double.isFinite(env.getMinX())) bbox.minLon = env.getMinX(); if (Double.isFinite(env.getMinY())) bbox.minLat = env.getMinY(); if (Double.isFinite(env.getMaxX())) bbox.maxLon = env.getMaxX(); if (Double.isFinite(env.getMaxY())) bbox.maxLat = env.getMaxY(); if (!bbox.isValid()) bbox = new BBox(0, 0, 0, 0); return bbox; }
JsonIsochronesRequestProcessor extends AbstractHttpRequestProcessor { public static BBox constructIsochroneBBox(Envelope env){ BBox bbox = new BBox(0,0,0,0); if (Double.isFinite(env.getMinX())) bbox.minLon = env.getMinX(); if (Double.isFinite(env.getMinY())) bbox.minLat = env.getMinY(); if (Double.isFinite(env.getMaxX())) bbox.maxLon = env.getMaxX(); if (Double.isFinite(env.getMaxY())) bbox.maxLat = env.getMaxY(); if (!bbox.isValid()) bbox = new BBox(0, 0, 0, 0); return bbox; } }
JsonIsochronesRequestProcessor extends AbstractHttpRequestProcessor { public static BBox constructIsochroneBBox(Envelope env){ BBox bbox = new BBox(0,0,0,0); if (Double.isFinite(env.getMinX())) bbox.minLon = env.getMinX(); if (Double.isFinite(env.getMinY())) bbox.minLat = env.getMinY(); if (Double.isFinite(env.getMaxX())) bbox.maxLon = env.getMaxX(); if (Double.isFinite(env.getMaxY())) bbox.maxLat = env.getMaxY(); if (!bbox.isValid()) bbox = new BBox(0, 0, 0, 0); return bbox; } JsonIsochronesRequestProcessor(HttpServletRequest request); }
JsonIsochronesRequestProcessor extends AbstractHttpRequestProcessor { public static BBox constructIsochroneBBox(Envelope env){ BBox bbox = new BBox(0,0,0,0); if (Double.isFinite(env.getMinX())) bbox.minLon = env.getMinX(); if (Double.isFinite(env.getMinY())) bbox.minLat = env.getMinY(); if (Double.isFinite(env.getMaxX())) bbox.maxLon = env.getMaxX(); if (Double.isFinite(env.getMaxY())) bbox.maxLat = env.getMaxY(); if (!bbox.isValid()) bbox = new BBox(0, 0, 0, 0); return bbox; } JsonIsochronesRequestProcessor(HttpServletRequest request); @Override void process(HttpServletResponse response); static BBox constructIsochroneBBox(Envelope env); }
JsonIsochronesRequestProcessor extends AbstractHttpRequestProcessor { public static BBox constructIsochroneBBox(Envelope env){ BBox bbox = new BBox(0,0,0,0); if (Double.isFinite(env.getMinX())) bbox.minLon = env.getMinX(); if (Double.isFinite(env.getMinY())) bbox.minLat = env.getMinY(); if (Double.isFinite(env.getMaxX())) bbox.maxLon = env.getMaxX(); if (Double.isFinite(env.getMaxY())) bbox.maxLat = env.getMaxY(); if (!bbox.isValid()) bbox = new BBox(0, 0, 0, 0); return bbox; } JsonIsochronesRequestProcessor(HttpServletRequest request); @Override void process(HttpServletResponse response); static BBox constructIsochroneBBox(Envelope env);  }