Created
November 18, 2014 03:29
-
-
Save jericks/57ea9e7a8ba5ad1f43a0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import geoscript.layer.* | |
import geoscript.geom.Bounds | |
import geoscript.proj.Projection | |
import javax.imageio.ImageIO | |
MBTiles mbtiles = new MBTiles(new File("geography-class.mbtiles")) | |
Raster raster = mbtiles.getRaster(mbtiles.tiles(4)).reproject(new Projection("EPSG:4326")).resample(bbox: new Bounds(-180,-90,180,90,"EPSG:4326"), size: [800,400]) | |
ImageIO.write(raster.image, "png", new File("geography-class.png")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment