Package org.locationtech.udig.catalog.internal.wmt.tile.NASATile.NASATileName

Examples of org.locationtech.udig.catalog.internal.wmt.tile.NASATile.NASATileName.NASAZoomLevel


            lat = WMTTileFactory.moveInRange(lat,
                    nasaSource.getBounds().getMinY(), nasaSource.getBounds().getMaxY());
            lon = WMTTileFactory.moveInRange(lon,
                    nasaSource.getBounds().getMinX(), nasaSource.getBounds().getMaxX());
           
            NASAZoomLevel nasaZoomLevel = (NASAZoomLevel) zoomLevel;
           
            int row = (int) Math.abs((lat - nasaSource.getBounds().getMaxY())  / nasaZoomLevel.getHeightInWorldUnits());
            int col = (int) Math.abs((lon - nasaSource.getBounds().getMinX()) / nasaZoomLevel.getWidthInWorldUnits());
           
            WMTPlugin.debug("[NASATile.getTileFromCoordinate] " + zoomLevel.getZoomLevel() + //$NON-NLS-1$
                    "/" + col +  "/" + row + " lon: " + lon + " lat: " + lat, Trace.NASA)//$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
           
            return new NASATile(col, row, nasaZoomLevel, (NASASource) wmtSource);
View Full Code Here


       
        for(Object element : tilePatterns) {
            if (element instanceof Element) {
                Element tilePattern = (Element) element;
                String tilePatternText = tilePattern.getValue();
                NASAZoomLevel zoomLevel = new NASAZoomLevel(tilePatternText, this);
               
                WMTPlugin.debug("[NASASource] Zoom-Level: " + zoomLevel.getScale() //$NON-NLS-1$
                        " " + zoomLevel.getWidthInWorldUnits(), Trace.NASA); //$NON-NLS-1$
               
                zoomLevels.add(zoomLevel);
            }
        }
       
View Full Code Here

    }

    @Test
    public void testZoomLevel() {
       
        NASAZoomLevel zoomLevel = source.getZoomLevel(0);


        ReferencedEnvelope boundsFirstTile = new ReferencedEnvelope(-180, -116, -26, 90, DefaultGeographicCRS.WGS84);
        assertEquals("http://wms.jpl.nasa.gov/wms.cgi?request=GetMap&layers=global_mosaic&srs=EPSG:4326&format=image/jpeg&styles=visual&width=512&height=512&bbox=-180,-26,-116,90",
                zoomLevel.getTileUrl(boundsFirstTile));
               
        assertEquals(6, zoomLevel.calculateMaxTilePerRowNumber(0));
        assertEquals(3, zoomLevel.calculateMaxTilePerColNumber(0));
    }
View Full Code Here

    }
   
    @Test
    public void testGetTileFromCoordinate() {
       
        NASAZoomLevel zoomLevel = source.getZoomLevel(0);
        WMTTileFactory tileFactory = source.getTileFactory();
       
        NASATile tile = (NASATile) tileFactory.getTileFromCoordinate(90, -180, zoomLevel, source);       
        assertEquals("Global Mosaic, pan sharpened visual_0_0_0", tile.getId());
       
View Full Code Here

    }
   
    @Test
    public void testGetTileFromCoordinateUSA() {
       
        NASAZoomLevel zoomLevel = sourceUSA.getZoomLevel(3);
        WMTTileFactory tileFactory = sourceUSA.getTileFactory();
       
        NASATile tile = (NASATile) tileFactory.getTileFromCoordinate(50, -125, zoomLevel, sourceUSA);       
        assertEquals("Continental US Elevation_3_0_0", tile.getId());
       
View Full Code Here

        assertEquals("Continental US Elevation_3_1_1", tile3.getId());
    }
   
    @Test
    public void testGetExtentFromTileName() {
        NASAZoomLevel zoomLevel = source.getZoomLevel(0);
       
        NASATileName tileName1 = new NASATileName(0, 0, zoomLevel, source);
       
        assertEquals("ReferencedEnvelope[-180.0 : -116.0, 26.0 : 90.0]",
                NASATile.getExtentFromTileName(tileName1).toString());
View Full Code Here

                NASATile.getExtentFromTileName(tileName1.getRightNeighbour()).toString());
    }
   
    @Test
    public void testGetExtentFromTileNameUSA() {
        NASAZoomLevel zoomLevel = sourceUSA.getZoomLevel(3);
       
        NASATileName tileName1 = new NASATileName(0, 0, zoomLevel, sourceUSA);
       
        equals(NASATile.getExtentFromTileName(tileName1),
                -125.0, -114.33333333, 39.33333333, 50.0);
View Full Code Here

TOP

Related Classes of org.locationtech.udig.catalog.internal.wmt.tile.NASATile.NASATileName.NASAZoomLevel

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.