class GeoPackageDivider extends AbstractDivider<GeographicPosition> {

    @Override
    public Collection<AbstractTileGeometry<?>> divide(AbstractTileGeometry<?> parent)
    {
        long currentZoomLevel = myLayer.getMinZoomLevel() + parent.getGeneration();
        long newZoomLevel = currentZoomLevel + 1;

        if (newZoomLevel > myLayer.getMaxZoomLevel())
        {
            throw new IllegalArgumentException("Not enough zoom levels to divide geometry: " + parent);
        }

        List<AbstractTileGeometry<?>> dividedTiles = New.list();

        Object imageKey = parent.getImageManager().getImageKey();
        if (imageKey instanceof ZYXImageKey)
        {
            ZYXImageKey zyx = (ZYXImageKey)imageKey;
            int y = zyx.getY();
            int x = zyx.getX();

            int[] newXs = calculateNewXorY(x);
            int[] newYs = calculateNewXorY(y);
            List<GeographicBoundingBox> newBoxes = calculateNewBoxes((GeographicBoundingBox)parent.getBounds());

            int index = 0;
            for (int newY : newYs)
            {
                for (int newX : newXs)
                {
                    GeographicBoundingBox newBounds = newBoxes.get(index);
                    ZYXImageKey newKey = new ZYXImageKey((int)newZoomLevel, newY, newX, newBounds);
                    GeoPackageDivider divider = this;
                    if (newZoomLevel + 1 > myLayer.getMaxZoomLevel())
                    {
                        divider = null;
                    }
                    AbstractTileGeometry<?> subTile = parent.createSubTile(newBounds, newKey, divider);
                    dividedTiles.add(subTile);

                    index++;
                }
            }
        }

        return dividedTiles;
    }

    public  GeoPackageDivider(GeoPackageTileLayer layer);

}