[Geopackage] Bounding boxes for tiles

Paul Daisey pdaisey1331 at gmail.com
Sat Jan 18 11:19:01 EST 2014


Brad:

     I think it is the other way around.  The bbox in gpkg_contents is 
informative:

1.1.3.1.1 "The bounding box (min_x, min_y, max_x, max_y) provides an 
informative bounding box (not necessarily minimum bounding box) of the 
content."

whereas the one in gpkg_tile_matrix_set is to be exact.

2.3.6.1.2 "The minimum bounding box defined in the gpkg_tile_matrix_set 
table or view for a tile pyramid user data table SHALL be exact so that 
the bounding box coordinates for individual tiles in a tile pyramid MAY 
be calculated based on the column values for the user data table in the 
gpkg_tile_matrix table or view."

Paul

On 1/18/2014 6:33 AM, Brad Hards wrote:
> I'm updating my old code for converting the output of gdal2tiles.py to
> geopackage. A typical index file (tilemapresource.xml) looks like:
>
> <?xml version="1.0" encoding="utf-8"?>
>          <TileMap version="1.0.0" tilemapservice="http://tms.osgeo.org/1.0.0">
>            <Title>pap.vrt</Title>
>            <Abstract></Abstract>
>            <SRS>EPSG:900913</SRS>
>            <BoundingBox minx="18.39785146190368" miny="-72.43391470757965"
> maxx="18.67206370360821" maxy="-72.18546427890816"/>
>            <Origin x="18.39785146190368" y="-72.43391470757965"/>
>            <TileFormat width="256" height="256" mime-type="image/png"
> extension="png"/>
>            <TileSets profile="mercator">
>              <TileSet href="10" units-per-pixel="152.87405654296876"
> order="10"/>
>              <TileSet href="11" units-per-pixel="76.43702827148438"
> order="11"/>
>              <TileSet href="12" units-per-pixel="38.21851413574219"
> order="12"/>
>              <TileSet href="13" units-per-pixel="19.10925706787109"
> order="13"/>
>              <TileSet href="14" units-per-pixel="9.55462853393555" order="14"/>
>              <TileSet href="15" units-per-pixel="4.77731426696777" order="15"/>
>              <TileSet href="16" units-per-pixel="2.38865713348389" order="16"/>
>            </TileSets>
>          </TileMap>
>
> In this case, there are four tiles at zoom level 10, where the actual content
> is shown the bounding box above.
>
> My reading of the current (OK, r9) spec text is that the bounds in
> gpkg_tile_matrix_set must reflect the full world (-180.0 to 180.0, and
> something like -85 or -90 to 90 or 85, depending on how the tiles are build /
> transformed), so that you can:
> 1. Add more tiles
> 2. calculate where the tiles go.
>
> However for gpkg_contents, the bounds should reflect the actual content (i.e.
> should match BoundingBox in the XML above).
>
> Does anyone interpret it differently?
>
> Brad
>

-- 

    Paul W. Daisey, Jr.
    Image Matters LLC
    201 Loudoun Street SW
    Leesburg, VA 20175

    Phone  703-669-5510
    Fax    703-669-5515
    Cell   301-651-7148
    pauld at imagemattersllc.com  <mailto://pauld@imagemattersllc.com>

http://www.imagemattersllc.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opengeospatial.org/pipermail/geopackage/attachments/20140118/b76d0201/attachment.html>


More information about the Geopackage mailing list