Package org.locationtech.udig.catalog.internal.wmt.wmtsource.ww

Examples of org.locationtech.udig.catalog.internal.wmt.wmtsource.ww.QuadTileSet


   
    @Test
    public void testQuadTileConstruct() throws Exception {
        Element rootElement = getRootElement();
       
        QuadTileSet quadTileSet = new QuadTileSet(rootElement.getChild("ChildLayerSet").getChild("QuadTileSet"), "");
       
        assertEquals("Bathymetry (30 arcsec)", quadTileSet.getName());
        assertEquals("ReferencedEnvelope[-180.0 : 180.0, -90.0 : 90.0]", quadTileSet.getBounds().toString());
       
        assertEquals("jpg", quadTileSet.getFileFormat());
        assertEquals(512, quadTileSet.getTileSize());
       
        assertEquals(6, quadTileSet.getScaleList().length);
       
        // Lowest Zoom-Level
        assertEquals(90, quadTileSet.getZoomLevel(0).getHeightInWorldUnits(), 0.0000000001);
        assertEquals(2, quadTileSet.getZoomLevel(0).getMaxTilePerColNumber());
        assertEquals(4, quadTileSet.getZoomLevel(0).getMaxTilePerRowNumber());
       
        // Next Zoom-Level
        assertEquals(45, quadTileSet.getZoomLevel(1).getHeightInWorldUnits(), 0.0000000001);
        assertEquals(4, quadTileSet.getZoomLevel(1).getMaxTilePerColNumber());
        assertEquals(8, quadTileSet.getZoomLevel(1).getMaxTilePerRowNumber());
       
        // Url-Construction
        assertEquals("http://s2.tileservice.worldwindcentral.com/getTile?T=global.topo_bathy_30arc&firstLevel=1&L=0&X=0&Y=0",
                quadTileSet.getZoomLevel(0).getTileUrl(
                        new WWTile.WWTileName(0, 0, quadTileSet.getZoomLevel(0), null)));
    }
View Full Code Here


    }
   
    @Test
    public void testTiles() throws Exception {
        Element rootElement = getRootElement();       
        QuadTileSet quadTileSet = new QuadTileSet(rootElement.getChild("ChildLayerSet").getChild("QuadTileSet"), "");
        WWSource wwSource = new WWSource(quadTileSet);
       
        assertEquals(2, wwSource.getZoomLevel(0).getMaxTilePerColNumber());
        assertEquals(4, wwSource.getZoomLevel(0).getMaxTilePerRowNumber());
       
View Full Code Here

   
    @Test
    public void testCutExtentInTilesRobbenIsland() throws Exception {
        Element rootElement = QuadTileSetTest.getRootElement();
       
        QuadTileSet quadTileSet = new QuadTileSet(((Element) rootElement.getChildren("ChildLayerSet").get(3)).getChild("QuadTileSet"), "");
       
        assertEquals("Robben Island (0.5m)", quadTileSet.getName());
       
        WWSource wwSource = new WWSource(quadTileSet);
       
        // extent is not covered from QuadTileSet
        WMTRenderJob renderJob1 = WMTRenderJob.createRenderJob(
View Full Code Here

    }
   
    @Test
    public void testTileFromCoordinateWholeWorld() throws Exception {
        Element rootElement = QuadTileSetTest.getRootElement();
        QuadTileSet quadTileSet = new QuadTileSet(rootElement.getChild("ChildLayerSet").getChild("QuadTileSet"), "");
       
        WWSource wwSource = new WWSource(quadTileSet);
       
        assertEquals(new WWTile(0, 1, wwSource.getZoomLevel(0), wwSource).getTileName().toString(),
                ((WWTile) wwSource.getTileFactory().getTileFromCoordinate(90, -180, wwSource.getZoomLevel(0), wwSource)).getTileName().toString());
View Full Code Here

TOP

Related Classes of org.locationtech.udig.catalog.internal.wmt.wmtsource.ww.QuadTileSet

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.