@Ignore @Test @Category(UnitTest.class) public void testConvertToPixelCenterLatLng() { MrsPyramidMetadata meta = allOnesImage.getMetadata(); LongRectangle pixelBounds = meta.getPixelBounds(zoom); int tilesize = meta.getTilesize(); Bounds bounds = allOnesImage.getBounds(); LatLng ul = allOnesImage.convertToPixelCenterLatLng(pixelBounds.getMinX(), pixelBounds.getMinY()); LatLng lr = allOnesImage.convertToPixelCenterLatLng(pixelBounds.getMaxX(), pixelBounds.getMaxY()); LatLng ct = allOnesImage.convertToPixelCenterLatLng(pixelBounds.getCenterX(), pixelBounds.getCenterY()); Pixel ultms = TMSUtils.latLonToPixels(ul.getLat(), ul.getLng(), zoom, tilesize); Pixel lrtms = TMSUtils.latLonToPixels(lr.getLat(), lr.getLng(), zoom, tilesize); Pixel cttms = TMSUtils.latLonToPixels(ct.getLat(), ct.getLng(), zoom, tilesize); Pixel cnr = TMSUtils.latLonToPixels(bounds.s, bounds.w, zoom, tilesize); long ulx = ultms.px - cnr.px; long uly = ultms.py - cnr.py; Assert.assertEquals("Bad pixel Latitude", uly, pixelBounds.getMaxY()); Assert.assertEquals("Bad pixel Longitude", ulx, pixelBounds.getMinX()); long lrx = lrtms.px - cnr.px; long lry = lrtms.py - cnr.py; Assert.assertEquals("Bad pixel Latitude", lry, pixelBounds.getMinY()); Assert.assertEquals("Bad pixel Longitude", lrx, pixelBounds.getMaxX()); long ctx = cttms.px - cnr.px; long cty = cttms.py - cnr.py; Assert.assertEquals("Bad pixel Latitude", cty, pixelBounds.getCenterY()); Assert.assertEquals("Bad pixel Longitude", ctx, pixelBounds.getCenterX()); }
public LatLng convertToPixelCenterLatLng(double px, double py) { return new LatLng(convertToWorldY(py + 0.5), convertToWorldX(px + 0.5)); }
MrsImage implements AutoCloseable { public LatLng convertToPixelCenterLatLng(double px, double py) { return new LatLng(convertToWorldY(py + 0.5), convertToWorldX(px + 0.5)); } }
MrsImage implements AutoCloseable { public LatLng convertToPixelCenterLatLng(double px, double py) { return new LatLng(convertToWorldY(py + 0.5), convertToWorldX(px + 0.5)); } private  MrsImage(MrsImageDataProvider provider, int zoomlevel); }
MrsImage implements AutoCloseable { public LatLng convertToPixelCenterLatLng(double px, double py) { return new LatLng(convertToWorldY(py + 0.5), convertToWorldX(px + 0.5)); } private  MrsImage(MrsImageDataProvider provider, int zoomlevel); @SuppressWarnings("squid:S1166") // Exceptions are ignored. This is OK. static MrsImage open(MrsImageDataProvider provider, int zoomlevel); static MrsImage open(String name, int zoomlevel,
    ProviderProperties providerProperties); static Set<Long> getTileIdsFromBounds(Bounds bounds, int zoomlevel, int tilesize); void close(); LatLng convertToLatLng(double px, double py); LatLng convertToPixelCenterLatLng(double px, double py); final double convertToWorldX(double px); final double convertToWorldY(double py); MrGeoRaster getAnyTile(); Bounds getBounds(); Bounds getBounds(int tx, int ty); double[] getExtrema(); long getHeight(); long getMaxTileX(); long getMaxTileY(); int getMaxZoomlevel(); MrsPyramidMetadata getMetadata(); long getMinTileX(); long getMinTileY(); String getName(); long getNumXTiles(); long getNumYTiles(); long getPixelMaxX(); long getPixelMaxY(); long getPixelMinX(); long getPixelMinY(); LongRectangle getPixelRect(); MrGeoRaster getTile(long tx, long ty); LongRectangle getTileBounds(); int getTileHeight(); KVIterator<TileIdWritable, MrGeoRaster> getTiles(); KVIterator<TileIdWritable, MrGeoRaster> getTiles(LongRectangle tileBounds); KVIterator<TileIdWritable, MrGeoRaster> getTiles(TileIdWritable start,
    TileIdWritable end); int getTilesize(); int getTileType(); int getTileWidth(); long getWidth(); int getZoomlevel(); boolean isTileEmpty(long tx, long ty); @Override String toString(); Set<Long> getTileIdsFromBounds(Bounds bounds); MrGeoRaster getRaster(); MrGeoRaster getRaster(Bounds bounds); MrGeoRaster getRaster(long[] tiles); MrGeoRaster getRaster(LongRectangle tileBounds); MrGeoRaster getRaster(TileIdWritable[] tiles); @SuppressWarnings("squid:S1166") // TileNotFoundException exceptions are caught and ignored. This is OK MrGeoRaster getRaster(Tile[] tiles); MrGeoRaster getRaster(TileBounds tileBounds); }
MrsImage implements AutoCloseable { public LatLng convertToPixelCenterLatLng(double px, double py) { return new LatLng(convertToWorldY(py + 0.5), convertToWorldX(px + 0.5)); } private  MrsImage(MrsImageDataProvider provider, int zoomlevel); @SuppressWarnings("squid:S1166") // Exceptions are ignored. This is OK. static MrsImage open(MrsImageDataProvider provider, int zoomlevel); static MrsImage open(String name, int zoomlevel,
    ProviderProperties providerProperties); static Set<Long> getTileIdsFromBounds(Bounds bounds, int zoomlevel, int tilesize); void close(); LatLng convertToLatLng(double px, double py); LatLng convertToPixelCenterLatLng(double px, double py); final double convertToWorldX(double px); final double convertToWorldY(double py); MrGeoRaster getAnyTile(); Bounds getBounds(); Bounds getBounds(int tx, int ty); double[] getExtrema(); long getHeight(); long getMaxTileX(); long getMaxTileY(); int getMaxZoomlevel(); MrsPyramidMetadata getMetadata(); long getMinTileX(); long getMinTileY(); String getName(); long getNumXTiles(); long getNumYTiles(); long getPixelMaxX(); long getPixelMaxY(); long getPixelMinX(); long getPixelMinY(); LongRectangle getPixelRect(); MrGeoRaster getTile(long tx, long ty); LongRectangle getTileBounds(); int getTileHeight(); KVIterator<TileIdWritable, MrGeoRaster> getTiles(); KVIterator<TileIdWritable, MrGeoRaster> getTiles(LongRectangle tileBounds); KVIterator<TileIdWritable, MrGeoRaster> getTiles(TileIdWritable start,
    TileIdWritable end); int getTilesize(); int getTileType(); int getTileWidth(); long getWidth(); int getZoomlevel(); boolean isTileEmpty(long tx, long ty); @Override String toString(); Set<Long> getTileIdsFromBounds(Bounds bounds); MrGeoRaster getRaster(); MrGeoRaster getRaster(Bounds bounds); MrGeoRaster getRaster(long[] tiles); MrGeoRaster getRaster(LongRectangle tileBounds); MrGeoRaster getRaster(TileIdWritable[] tiles); @SuppressWarnings("squid:S1166") // TileNotFoundException exceptions are caught and ignored. This is OK MrGeoRaster getRaster(Tile[] tiles); MrGeoRaster getRaster(TileBounds tileBounds);  }