Package org.geotools.mbtiles

Examples of org.geotools.mbtiles.MBTilesFile.loadMetaData()


    public MBTilesReader(Object source, Hints hints) throws IOException {
        sourceFile = MBTilesFormat.getFileFromSource(source);

        MBTilesFile file = new MBTilesFile(sourceFile);

        metadata = file.loadMetaData();
       
        try {
            bounds = ReferencedEnvelope.create(metadata.getBounds(), WGS_84).transform(SPHERICAL_MERCATOR, true);
        } catch (Exception e) {
            bounds = null;
View Full Code Here


        mapContent.getRequest().getFormatOptions().put("max_zoom", "11");
       
        WebMap map = format.produceMap(mapContent);
        MBTilesFile mbtiles = createMbTilesFiles(map);
       
        MBTilesMetadata metadata = mbtiles.loadMetaData();
       
        assertEquals("World_Lakes", metadata.getName());
        assertEquals("0", metadata.getVersion());
        assertEquals("World, null", metadata.getDescription());
        assertEquals(-0.17578125, metadata.getBounds().getMinimum(0), 0.001);
View Full Code Here

        MBTilesFile mbtiles = new MBTilesFile(f);
        mbtiles.init();
        // Add tiles to the file(Internally uses the MBtilesFileWrapper)
        format.addTiles(mbtiles, mapContent.getRequest(), null);
        // Ensure everything is correct
        MBTilesMetadata metadata = mbtiles.loadMetaData();
       
        assertEquals("World_Lakes", metadata.getName());
        assertEquals("0", metadata.getVersion());
        assertEquals("World, null", metadata.getDescription());
        assertEquals(-0.17578125, metadata.getBounds().getMinimum(0), 0.001);
View Full Code Here

        // File file = getDataDirectory().findFile("data", "test.mbtiles");
        assertNotNull(file);
        assertTrue(file.exists());

        MBTilesFile mbtiles = new MBTilesFile(file);
        MBTilesMetadata metadata = mbtiles.loadMetaData();
        assertEquals(11, mbtiles.maxZoom());
        assertEquals(10, mbtiles.minZoom());
        assertEquals("World", metadata.getName());

        assertEquals(-0.17578125, metadata.getBounds().getMinimum(0), 0.0001);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.