public SRS[] getProjections() { SRS[] srsList = {SRS.getEPSG4326()}; return srsList; }
public SRS[] getProjections() { SRS[] srsList = { SRS.getEPSG4326() }; return srsList; }
GridSubset epsg4326GridSubSet = layer.getGridSubsetForSRS(SRS.getEPSG4326()); if (null != epsg4326GridSubSet) { String[] bs = boundsPrep(epsg4326GridSubSet.getCoverageBestFitBounds());
private void layerWGS84BoundingBox(XMLBuilder xml, TileLayer layer) throws IOException { GridSubset subset = layer.getGridSubsetForSRS(SRS.getEPSG4326()); if (subset != null) { double[] coords = subset.getOriginalExtent().getCoords();
when(tld.getTileLayer(layerName)).thenReturn(tileLayer); when(tld.getLayerList()).thenReturn(Collections.singleton(tileLayer)); when(tileLayer.getGridSubsetsForSRS(SRS.getEPSG4326())) .thenReturn(Collections.singletonList(subset)); when(tileLayer.getInfoMimeTypes()).thenReturn(Collections.singletonList(XMLMime.gml)); req.addParameter("layers", layerName); req.addParameter("format", "image/png"); req.addParameter("srs", SRS.getEPSG4326().toString()); req.addParameter("bbox", "0,0,40,60"); req.addParameter("width", "40"); + layerName + "&format=image/png&srs=" + SRS.getEPSG4326().toString() + "&bbox=0,0,40,60&width=40&height=60&x=3&y=3");
when(tld.getTileLayer(layerName)).thenReturn(tileLayer); when(tld.getLayerList()).thenReturn(Collections.singleton(tileLayer)); when(tileLayer.getGridSubsetsForSRS(SRS.getEPSG4326())) .thenReturn(Collections.singletonList(subset)); when(tileLayer.getInfoMimeTypes()).thenReturn(Collections.singletonList(XMLMime.gml)); req.addParameter("layers", layerName); req.addParameter("format", "image/png"); req.addParameter("srs", SRS.getEPSG4326().toString()); req.addParameter("bbox", "0,0,40,60"); req.addParameter("width", "40"); + layerName + "&format=image/png&srs=" + SRS.getEPSG4326().toString() + "&bbox=0,0,40,60&width=40&height=60&x=3&y=3");
when(tld.getTileLayer(layerName)).thenReturn(tileLayer); when(tld.getLayerList()).thenReturn(Collections.singleton(tileLayer)); when(tileLayer.getGridSubsetsForSRS(SRS.getEPSG4326())) .thenReturn(Collections.singletonList(subset)); req.addParameter("layers", layerName); req.addParameter("format", "image/png"); req.addParameter("srs", SRS.getEPSG4326().toString()); req.addParameter("bbox", "0,0,40,60"); req.addParameter("width", "40"); + layerName + "&format=image/png&srs=" + SRS.getEPSG4326().toString() + "&bbox=0,0,40,60&width=40&height=60");
when(tld.getTileLayer(layerName)).thenReturn(tileLayer); when(tld.getLayerList()).thenReturn(Collections.singleton(tileLayer)); when(tileLayer.getGridSubsetsForSRS(SRS.getEPSG4326())) .thenReturn(Collections.singletonList(subset)); req.addParameter("layers", layerName); req.addParameter("format", "image/png"); req.addParameter("srs", SRS.getEPSG4326().toString()); req.addParameter("bbox", "0,0,40,60"); req.addParameter("width", "40"); + layerName + "&format=image/png&srs=" + SRS.getEPSG4326().toString() + "&bbox=0,0,40,60&width=40&height=60");
GridSetFactory.createGridSet( "test", SRS.getEPSG4326(), extent, false, GridSetFactory.createGridSet( "test", SRS.getEPSG4326(), extent, false,
parameters.put("b", "ΓΈ"); MimeType mime = ImageMime.png; SRS srs = SRS.getEPSG4326(); final String layerName = "test:123123 112";
@Test public void testSaveGridSet() throws Exception { String name = "testGrid"; SRS srs = SRS.getEPSG4326(); BoundingBox extent = new BoundingBox(-1, -1, 1, 1); boolean alignTopLeft = true;
if (srs.equals(SRS.getEPSG4326()) && gridBounds.equals(BoundingBox.WORLD4326) && resolutions == null) {
public void testBoundingBoxEPSG4326() throws Exception { BoundingBox extent = new BoundingBox(-180, -90, 180, 90); GridSet gridSet = GridSetFactory.createGridSet( "test", SRS.getEPSG4326(), extent, false, 4, null, 0.00028, 256, 256, false); assertEquals("test", gridSet.getName()); assertEquals(-180.0, gridSet.tileOrigin()[0]); assertEquals(-90.0, gridSet.tileOrigin()[1]); assertEquals(4, gridSet.getGridLevels().length); Grid grid0 = gridSet.getGridLevels()[0]; assertEquals(180.0 / 256, grid0.getResolution()); assertEquals(2L, grid0.getNumTilesWide()); assertEquals(1L, grid0.getNumTilesHigh()); Grid grid3 = gridSet.getGridLevels()[3]; assertEquals(180.0 / 2048, grid3.getResolution()); assertEquals((long) Math.pow(2, 4), grid3.getNumTilesWide()); assertEquals((long) Math.pow(2, 3), grid3.getNumTilesHigh()); }
public void testResolutionsArrayEPSG4326() throws Exception { BoundingBox extent = new BoundingBox(-180, -90, 180, 90); double[] resolutions = {180.0 / 256, 180.0 / 512, 180.0 / 1024, 180.0 / 2048}; GridSet gridSet = GridSetFactory.createGridSet( "test", SRS.getEPSG4326(), extent, false, resolutions, null, null, 0.00028, null, 256, 256, false); assertEquals("test", gridSet.getName()); assertEquals(-180.0, gridSet.tileOrigin()[0]); assertEquals(-90.0, gridSet.tileOrigin()[1]); assertEquals(resolutions.length, gridSet.getGridLevels().length); Grid grid0 = gridSet.getGridLevels()[0]; assertEquals(180.0 / 256, grid0.getResolution()); assertEquals(2L, grid0.getNumTilesWide()); assertEquals(1L, grid0.getNumTilesHigh()); Grid grid3 = gridSet.getGridLevels()[3]; assertEquals(180.0 / 2048, grid3.getResolution()); assertEquals((long) Math.pow(2, 4), grid3.getNumTilesWide()); assertEquals((long) Math.pow(2, 3), grid3.getNumTilesHigh()); }
public void testBoundingBoxTricky2() throws Exception { BoundingBox extent = new BoundingBox(-180, -90, 180, 82); SRS srs = SRS.getEPSG4326(); GridSet gridSet = GridSetFactory.createGridSet( "test", srs, extent, false, 4, null, 0.00028, 256, 256, false); assertEquals("test", gridSet.getName()); assertEquals(-180.0, gridSet.tileOrigin()[0]); assertEquals(-90.0, gridSet.tileOrigin()[1]); assertEquals(4, gridSet.getGridLevels().length); Grid grid0 = gridSet.getGridLevels()[0]; assertEquals(180.0 / 256, grid0.getResolution()); assertEquals(2L, grid0.getNumTilesWide()); assertEquals(1L, grid0.getNumTilesHigh()); }
parameters.put("b", "ΓΈ"); MimeType mime = ImageMime.png; SRS srs = SRS.getEPSG4326(); String layerName = "test:123123 112";
public void testBoundingBoxTricky1() throws Exception { BoundingBox extent = new BoundingBox(-180, -90, 172, 90); GridSet gridSet = GridSetFactory.createGridSet( "test", SRS.getEPSG4326(), extent, false, 4, null, 0.00028, 256, 256, false); assertEquals("test", gridSet.getName()); assertEquals(-180.0, gridSet.tileOrigin()[0]); assertEquals(-90.0, gridSet.tileOrigin()[1]); assertEquals(4, gridSet.getGridLevels().length); Grid grid0 = gridSet.getGridLevels()[0]; assertEquals(180.0 / 256, grid0.getResolution()); assertEquals(2L, grid0.getNumTilesWide()); assertEquals(1L, grid0.getNumTilesHigh()); }
public void testResolutionsArrayTricky1() throws Exception { // This should be expanded in the X direction BoundingBox extent = new BoundingBox(-173, -90, 180, 96); double[] resolutions = {180.0 / 200, 180.0 / 400, 180.0 / 800}; GridSet gridSet = GridSetFactory.createGridSet( "test", SRS.getEPSG4326(), extent, false, resolutions, null, null, 0.00028, null, 200, 200, false); assertEquals(-173.0, gridSet.tileOrigin()[0]); assertEquals(-90.0, gridSet.tileOrigin()[1]); assertEquals(resolutions.length, gridSet.getGridLevels().length); Grid grid0 = gridSet.getGridLevels()[0]; assertEquals(180.0 / 200, grid0.getResolution()); assertEquals(2L, grid0.getNumTilesWide()); assertEquals(2L, grid0.getNumTilesHigh()); Grid grid3 = gridSet.getGridLevels()[2]; assertEquals(180.0 / 800, grid3.getResolution()); assertEquals(8L, grid3.getNumTilesWide()); assertEquals(5L, grid3.getNumTilesHigh()); }
int tileHeight = 10; SRS srs = SRS.getEPSG4326();
int tileHeight = 20; SRS srs = SRS.getEPSG4326();