Problem loading Maptiler cache

classic Classic list List threaded Threaded
5 messages Options
Rahulj Rahulj
Reply | Threaded
Open this post in threaded view
|

Problem loading Maptiler cache

Hi Guys,

I am having problem loading the tms cache i generated using MapTiler. I followed the steps described on the database preparation page of osgearth documentation (swapped x and y in tms). I am using  world.tif as my first image and second image a high resolution image as cache generated by Maptiler. My  earth files look like this

---------------------------------------------------------------------------
<image name="World" driver="gdal">
        <url>F:\Softwares\Visualization\osgEArth1.1\data\world.tif</url>
</image>

<image name="natmo" driver="tms">
        <url>F:\tmpo\tilemapresource.xml</url>
</image>
---------------------------------------------------------------------------

The error I am getting are
Could not create geoimage for natmo 0_1_0_0
Could not create geoimage for natmo 0_1_1_1
Could not create geoimage for natmo 0_1_1_0
Could not create geoimage for natmo 0_1_0_1
Could not create geoimage for natmo 0_1_2_0
Could not create geoimage for natmo 0_1_3_0
Could not create geoimage for natmo 0_1_3_1
Could not create geoimage for natmo 0_1_2_1

If i generate the cache using osgearth_seed every thing works fine.
One of the difference between the Maptiler TMS cache and osgearth_ssed cache tms.xml files i noticed is that no matter what  the extents of the image are tms always have maxx="180.0000000000000000000000000" maxy="90.0000000000000000000000000" minx="-180.0000000000000000000000000" miny="-90.0000000000000000000000000"

And origin
x="-180.0000000000000000000000000" y="-90.0000000000000000000000000"

Help me know what exactly i am doing wrong. :)
Thanks and regards
RJ
jasonbeverage jasonbeverage
Reply | Threaded
Open this post in threaded view
|

Re: Problem loading Maptiler cache

Hi RJ,

I just did a quick test using MapTiler.  The issue is that osgEarth and MapTiler are using the TMS specification in different ways.  If you choose "Global Geodetic" in MapTiler, the tiles are created according to the global-geodetic profile, but the extents and origin reported in the TMS document are the extents of the actual geospatial data vs the extent of the actual tiles.  osgEarth takes those values literally and things that the tiles follow a tiling pattern with the root level contained by the reported extents which is not the case.

For now, a solution is to just change the TMS file exported via maptiler to report global-geodetic bounds like so:
<BoundingBox minx="-180" miny="-90" maxx="180" maxy="90"/>
<Origin x="-180" y="-90"/>

Thanks,

Jason

On Mon, Sep 28, 2009 at 11:29 AM, Rahulj (via Nabble) <[hidden email]> wrote:
Hi Guys,

I am having problem loading the tms cache i generated using MapTiler. I followed the steps described on the database preparation page of osgearth documentation (swapped x and y in tms). I am using  world.tif as my first image and second image a high resolution image as cache generated by Maptiler. My  earth files look like this

---------------------------------------------------------------------------
<image name="World" driver="gdal">
        <url>F:\Softwares\Visualization\osgEArth1.1\data\world.tif</url>
</image>

<image name="natmo" driver="tms">
        <url>F:\tmpo\tilemapresource.xml</url>
</image>
---------------------------------------------------------------------------

The error I am getting are
Could not create geoimage for natmo 0_1_0_0
Could not create geoimage for natmo 0_1_1_1
Could not create geoimage for natmo 0_1_1_0
Could not create geoimage for natmo 0_1_0_1
Could not create geoimage for natmo 0_1_2_0
Could not create geoimage for natmo 0_1_3_0
Could not create geoimage for natmo 0_1_3_1
Could not create geoimage for natmo 0_1_2_1

If i generate the cache using osgearth_seed every thing works fine.
One of the difference between the Maptiler TMS cache and osgearth_ssed cache tms.xml files i noticed is that no matter what  the extents of the image are tms always have maxx="180.0000000000000000000000000" maxy="90.0000000000000000000000000" minx="-180.0000000000000000000000000" miny="-90.0000000000000000000000000"

And origin
x="-180.0000000000000000000000000" y="-90.0000000000000000000000000"

Help me know what exactly i am doing wrong. :)
Thanks and regards
RJ


View message @ http://n2.nabble.com/Problem-loading-Maptiler-cache-tp3730083p3730083.html
To start a new topic under osgEarth, email [hidden email]
To unsubscribe from osgEarth, click here.


Rahulj Rahulj
Reply | Threaded
Open this post in threaded view
|

Re: Problem loading Maptiler cache

Thanks Jason for the answer,

After doing what you suggested I am still getting some warnings and dont know how to interpret them.
This time i generated cache for world and boston using maptiler and changed the extents as you suggested. I am using osgEarth1.2 on windows

The warning i am getting are

---------Warnings-----------
mismatched tag, 15
Failed to load TileMap
[osgEarth::TMS] No TileMap found; checking fo
mismatched tag, 18
Failed to load TileMap
[osgEarth::TMS] No TileMap found; checking fo
Could not create geoimage for boston 0_1_2_0
Could not create geoimage for boston 0_1_2_1
Could not create geoimage for boston 0_1_3_1
Could not create geoimage for boston 0_1_3_0
----------------------------------------------

My earth file looks like this
------------------------------------------------------------------
<map name="testMapTiler" type="geocentric">
    <profile>global-geodetic</profile>   

    <image name="world" driver="tms">
        <url>C:\data\world\tilemapresource.xml</url>
        <format>png</format>
    </image>

    <image name="boston" driver="tms">
        <url>C:\data\boston-inset\tilemapresource.xml</url>       
        <format>png</format>
    </image>
</map>
----------------------------------------------------------------
and the tms files for boston and world are

--------------Boston TMS------------------
<?xml version="1.0" encoding="utf-8"?>
        <TileMap version="1.0.0" tilemapservice="http://tms.osgeo.org/1.0.0">
          <Title>boston</Title>
          <Abstract></Abstract>
          <SRS>EPSG:4326</SRS>
           <BoundingBox maxx="180.0000000000000000000000000" maxy="90.0000000000000000000000000" minx="-180.0000000000000000000000000" miny="-90.0000000000000000000000000">
    </BoundingBox>
    <Origin x="-180.0000000000000000000000000" y="-90.0000000000000000000000000">
          <TileFormat width="256" height="256" mime-type="" extension="png"/>
          <TileSets profile="geodetic">
            <TileSet href="0" units-per-pixel="0.70312500000000" order="0"/>
            <TileSet href="1" units-per-pixel="0.35156250000000" order="1"/>
            <TileSet href="2" units-per-pixel="0.17578125000000" order="2"/>
            <TileSet href="3" units-per-pixel="0.08789062500000" order="3"/>
            <TileSet href="4" units-per-pixel="0.04394531250000" order="4"/>
            <TileSet href="5" units-per-pixel="0.02197265625000" order="5"/>
          </TileSets>
        </TileMap>
-----------------------------------------------------------------------

---------------------World TMS ---------------------------------------
<?xml version="1.0" encoding="utf-8"?>
        <TileMap version="1.0.0" tilemapservice="http://tms.osgeo.org/1.0.0">
          <Title>world</Title>
          <Abstract></Abstract>
          <SRS>EPSG:4326</SRS>
          <BoundingBox maxx="180.0000000000000000000000000" maxy="90.0000000000000000000000000" minx="-180.0000000000000000000000000" miny="-90.0000000000000000000000000">
    </BoundingBox>
    <Origin x="-180.0000000000000000000000000" y="-90.0000000000000000000000000">
          <TileFormat width="256" height="256" mime-type="image/png" extension="png"/>
          <TileSets profile="geodetic">
            <TileSet href="0" units-per-pixel="0.70312500000000" order="0"/>
            <TileSet href="1" units-per-pixel="0.35156250000000" order="1"/>
            <TileSet href="2" units-per-pixel="0.17578125000000" order="2"/>
          </TileSets>
        </TileMap>
--------------------------------------------------------------------------

Thanks and regards
RJ
jasonbeverage jasonbeverage
Reply | Threaded
Open this post in threaded view
|

Re: Problem loading Maptiler cache

Hi RJ,

You're missing a trailing / in the Origin tag.

Jason

On Mon, Sep 28, 2009 at 1:01 PM, Rahulj (via Nabble) <[hidden email]> wrote:
Thanks Jason for the answer,

After doing what you suggested I am still getting some warnings and dont know how to interpret them.
This time i generated cache for world and boston using maptiler and changed the extents as you suggested. I am using osgEarth1.2 on windows

The warning i am getting are

---------Warnings-----------
mismatched tag, 15
Failed to load TileMap
[osgEarth::TMS] No TileMap found; checking fo
mismatched tag, 18
Failed to load TileMap
[osgEarth::TMS] No TileMap found; checking fo
Could not create geoimage for boston 0_1_2_0
Could not create geoimage for boston 0_1_2_1
Could not create geoimage for boston 0_1_3_1
Could not create geoimage for boston 0_1_3_0
----------------------------------------------

My earth file looks like this
------------------------------------------------------------------
<map name="testMapTiler" type="geocentric">
    <profile>global-geodetic</profile>    

    <image name="world" driver="tms">
        <url>C:\data\world\tilemapresource.xml</url>
        <format>png</format>
    </image>

    <image name="boston" driver="tms">
        <url>C:\data\boston-inset\tilemapresource.xml</url>
        <format>png</format>
    </image>
</map>
----------------------------------------------------------------
and the tms files for boston and world are

--------------Boston TMS------------------
<?xml version="1.0" encoding="utf-8"?>
        <TileMap version="1.0.0" tilemapservice="http://tms.osgeo.org/1.0.0">
          <Title>boston</Title>
          <Abstract></Abstract>
          <SRS>EPSG:4326</SRS>
           <BoundingBox maxx="180.0000000000000000000000000" maxy="90.0000000000000000000000000" minx="-180.0000000000000000000000000" miny="-90.0000000000000000000000000">
    </BoundingBox>
    <Origin x="-180.0000000000000000000000000" y="-90.0000000000000000000000000">
          <TileFormat width="256" height="256" mime-type="" extension="png"/>
          <TileSets profile="geodetic">
            <TileSet href="0" units-per-pixel="0.70312500000000" order="0"/>
            <TileSet href="1" units-per-pixel="0.35156250000000" order="1"/>
            <TileSet href="2" units-per-pixel="0.17578125000000" order="2"/>
            <TileSet href="3" units-per-pixel="0.08789062500000" order="3"/>
            <TileSet href="4" units-per-pixel="0.04394531250000" order="4"/>
            <TileSet href="5" units-per-pixel="0.02197265625000" order="5"/>
          </TileSets>
        </TileMap>
-----------------------------------------------------------------------

---------------------World TMS ---------------------------------------
<?xml version="1.0" encoding="utf-8"?>
        <TileMap version="1.0.0" tilemapservice="http://tms.osgeo.org/1.0.0">
          <Title>world</Title>
          <Abstract></Abstract>
          <SRS>EPSG:4326</SRS>
          <BoundingBox maxx="180.0000000000000000000000000" maxy="90.0000000000000000000000000" minx="-180.0000000000000000000000000" miny="-90.0000000000000000000000000">
    </BoundingBox>
    <Origin x="-180.0000000000000000000000000" y="-90.0000000000000000000000000">
          <TileFormat width="256" height="256" mime-type="image/png" extension="png"/>
          <TileSets profile="geodetic">
            <TileSet href="0" units-per-pixel="0.70312500000000" order="0"/>
            <TileSet href="1" units-per-pixel="0.35156250000000" order="1"/>
            <TileSet href="2" units-per-pixel="0.17578125000000" order="2"/>
          </TileSets>
        </TileMap>
--------------------------------------------------------------------------

Thanks and regards
RJ


View message @ http://n2.nabble.com/Problem-loading-Maptiler-cache-tp3730083p3730611.html
To start a new topic under osgEarth, email [hidden email]
To unsubscribe from osgEarth, click here.


Rahulj Rahulj
Reply | Threaded
Open this post in threaded view
|

Re: Problem loading Maptiler cache

Thanks Jason,

Typical copy-paste error :). Mismatched tags warnings are gone and the warning left are

---------------------------------------------
Could not create geoimage for boston 0_1_2_0
Could not create geoimage for boston 0_1_3_0
Could not create geoimage for boston 0_1_2_1
Could not create geoimage for boston 0_1_3_1
---------------------------------------------

and the boston area looks really blurry. When I added another tms as third image layer the boston area looked proper (I compared it  by opening associated file in google earth).

Thanks and regards
RJ