load TMS cache data in openlayers

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

load TMS cache data in openlayers

pankaj123
Hi this is in continuation from my question on geoserver mailing list

http://osgeo-org.1560.x6.nabble.com/Using-TMS-cache-data-td5096545.html#a5096831

This is my question

I tried using TMS cache without geoserver. I did put the data on apache server and was able to see some images being loaded. but I am having some problem

1. What is the url I am supposed to provide. I saw the openlayers example and its giving url of some .py file which in turn is providing url of another .py file which have timeserver info. I have a TMS cache data and a .xml file which gives info about that data. So am I suppopsed to give path of .xml file. When I tries that, it starts looking for tiles in url  which has .xml path like its a folder like

If I set the url to    http://localhost:81/DodaMissing/tms.xml/
layerName to         DodaMissing


It starts lokking for tiles in urls which look like
http://localhost:81/DodaMissing/tms.xml/1.0.0/DodaMissing/5/20/13.png

This has the .xml fileName in url. Data can't be in this folder.
Is it wrong. What should I do

2. So I gave a
url as                 http://localhost:81/
layerName as       DodaMissing

openlayers starts looking for tiles in
http://localhost:81/1.0.0/DodaMissing/5/12/18.png

I have copied my in this path, sopit is able to load some tiles.
Thing is I dont have all the data. The info about data is only in .xml but as now I am giving path of folder, openlayers starts lookinig tiles which are not present.
Also I am not able to provide srs as EPSG:4326, so I saw as I tries zoominig in out at location whose data I  have, It was trying to access something like

http://localhost:81/1.0.0/DodaMissing/15/23262/19579.png

but I had data like http://localhost:81/1.0.0/DodaMissing/15/46479/22396.png

which means their is lot of difference in 'X' coordinate.
Is that a problem. I think I am not specifying SRS anywhere. Can this be because of that.

I am copying the .xml content here, so you guys can see.

////////***************/////////

<?xml version="1.0"?>
<tilemap tilemapservice="" version="">
    <title>
       
    </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">
    </origin>
    <tileformat extension="png" height="256" mime-type="" width="256">
    </tileformat>
    <tilesets profile="global-geodetic">
        <tileset href="" order="0" units-per-pixel="0.7031250000000000000000000">
        </tileset>
        <tileset href="" order="1" units-per-pixel="0.3515625000000000000000000">
        </tileset>
        <tileset href="" order="2" units-per-pixel="0.1757812500000000000000000">
        </tileset>
        <tileset href="" order="3" units-per-pixel="0.0878906250000000000000000">
        </tileset>
        <tileset href="" order="4" units-per-pixel="0.0439453125000000000000000">
        </tileset>
        <tileset href="" order="5" units-per-pixel="0.0219726562500000000000000">
        </tileset>
        <tileset href="" order="6" units-per-pixel="0.0109863281250000000000000">
        </tileset>
        <tileset href="" order="7" units-per-pixel="0.0054931640625000000000000">
        </tileset>
        <tileset href="" order="8" units-per-pixel="0.0027465820312500000000000">
        </tileset>
        <tileset href="" order="9" units-per-pixel="0.0013732910156250000000000">
        </tileset>
        <tileset href="" order="10" units-per-pixel="0.0006866455078125000000000">
        </tileset>
        <tileset href="" order="11" units-per-pixel="0.0003433227539062500000000">
        </tileset>
        <tileset href="" order="12" units-per-pixel="0.0001716613769531250000000">
        </tileset>
        <tileset href="" order="13" units-per-pixel="0.0000858306884765625000000">
        </tileset>
        <tileset href="" order="14" units-per-pixel="0.0000429153442382812500000">
        </tileset>
        <tileset href="" order="15" units-per-pixel="0.0000214576721191406250000">
        </tileset>
        <tileset href="" order="16" units-per-pixel="0.0000107288360595703130000">
        </tileset>
        <tileset href="" order="17" units-per-pixel="0.0000053644180297851563000">
        </tileset>
        <tileset href="" order="18" units-per-pixel="0.0000026822090148925781000">
        </tileset>
        <tileset href="" order="19" units-per-pixel="0.0000013411045074462891000">
        </tileset>
    </tilesets>
</tilemap>

////**********/////////

PS. We are able to see this TMS cache data in OSGEarth...So data is not corrupt or anything..

Any help...

Regards
Pankaj Bansal

Reply | Threaded
Open this post in threaded view
|

Re: load TMS cache data in openlayers

pankaj123
Hi

I think I am not being very clear here. So I will change my question.

I have a TMS cache data which I want to load in openlayers. I have tms.xml file which have info about the TMS cache and then data.
I saw the example in openlayers and in that example tile cache is being used. I dont have any .py file. I just have a .xml file. I am writing the .xml for reference. How should I proceed.

PS. I am able to load this data in OSGEarth. So data is not corrupt.

///////******///////////
<?xml version="1.0"?>
<tilemap tilemapservice="" version="">
    <title>
       
    </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">
    </origin>
    <tileformat extension="tiff" height="256" mime-type="" width="256">
    </tileformat>
    <tilesets profile="global-geodetic">
        <tileset href="" order="0" units-per-pixel="0.7031250000000000000000000">
        </tileset>
        <tileset href="" order="1" units-per-pixel="0.3515625000000000000000000">
        </tileset>
        <tileset href="" order="2" units-per-pixel="0.1757812500000000000000000">
        </tileset>
        <tileset href="" order="3" units-per-pixel="0.0878906250000000000000000">
        </tileset>
        <tileset href="" order="4" units-per-pixel="0.0439453125000000000000000">
        </tileset>
        <tileset href="" order="5" units-per-pixel="0.0219726562500000000000000">
        </tileset>
        <tileset href="" order="6" units-per-pixel="0.0109863281250000000000000">
        </tileset>
        <tileset href="" order="7" units-per-pixel="0.0054931640625000000000000">
        </tileset>
        <tileset href="" order="8" units-per-pixel="0.0027465820312500000000000">
        </tileset>
        <tileset href="" order="9" units-per-pixel="0.0013732910156250000000000">
        </tileset>
        <tileset href="" order="10" units-per-pixel="0.0006866455078125000000000">
        </tileset>
        <tileset href="" order="11" units-per-pixel="0.0003433227539062500000000">
        </tileset>
        <tileset href="" order="12" units-per-pixel="0.0001716613769531250000000">
        </tileset>
        <tileset href="" order="13" units-per-pixel="0.0000858306884765625000000">
        </tileset>
        <tileset href="" order="14" units-per-pixel="0.0000429153442382812500000">
        </tileset>
        <tileset href="" order="15" units-per-pixel="0.0000214576721191406250000">
        </tileset>
        <tileset href="" order="16" units-per-pixel="0.0000107288360595703130000">
        </tileset>
        <tileset href="" order="17" units-per-pixel="0.0000053644180297851563000">
        </tileset>
        <tileset href="" order="18" units-per-pixel="0.0000026822090148925781000">
        </tileset>
        <tileset href="" order="19" units-per-pixel="0.0000013411045074462891000">
        </tileset>
    </tilesets>
</tilemap>


////////////************///////////////

Any help. I really need this thing to work..

Regards
Pankaj Bansal