示例#1
0
  @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());

    assertEquals(
        "ReferencedEnvelope[-180.0 : -116.0, -38.0 : 26.0]",
        NASATile.getExtentFromTileName(tileName1.getLowerNeighbour()).toString());

    assertEquals(
        "ReferencedEnvelope[-116.0 : -52.0, 26.0 : 90.0]",
        NASATile.getExtentFromTileName(tileName1.getRightNeighbour()).toString());
  }
示例#2
0
  @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);

    equals(
        NASATile.getExtentFromTileName(tileName1.getLowerNeighbour()),
        -125.0,
        -114.33333333,
        28.66666666,
        39.33333333);

    equals(
        NASATile.getExtentFromTileName(tileName1.getRightNeighbour()),
        -114.33333333,
        -103.66666666,
        39.33333333,
        50.0);
  }
示例#3
0
  @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());

    NASATile tile2 = (NASATile) tileFactory.getTileFromCoordinate(39, -125, zoomLevel, sourceUSA);
    assertEquals("Continental US Elevation_3_0_1", tile2.getId());

    NASATile tile3 = (NASATile) tileFactory.getTileFromCoordinate(39, -114, zoomLevel, sourceUSA);
    assertEquals("Continental US Elevation_3_1_1", tile3.getId());
  }
示例#4
0
  @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());

    NASATile tile2 = (NASATile) tileFactory.getTileFromCoordinate(-90, -180, zoomLevel, source);
    assertEquals("Global Mosaic, pan sharpened visual_0_0_2", tile2.getId());

    NASATile tile3 = (NASATile) tileFactory.getTileFromCoordinate(-90, -115, zoomLevel, source);
    assertEquals("Global Mosaic, pan sharpened visual_0_1_2", tile3.getId());
  }