[Tilecache] Why is the bounding box/resolution from the original request not honored?

chris marx chrismarx at gmail.com
Fri Nov 14 04:17:49 EST 2008


All,
 I've solved the problem, it appears that the order of the parameters was
coming in differently. I enabled logging, and looked at the parts variable
in TMS.py

the log showed parts = ['tilecache', 'tilecache.py', '1.0.0',
'google-tiles', '4', '6', '5.png']

which meant i had to rewrite the the rest of the parse method like so

else:
            layer = self.getLayer(parts[3])
            if len(parts) < 3:
                return self.layerCapabilities(host, layer)
            else:
                parts[-1] = parts[-1].split(".")[0]
                tile = None
                if layer.tms_type == "google" or (fields.has_key('type') and
fields['type'] == 'google'):
                    res = layer.resolutions[int(parts[4])]
                    maxY = int(
                      round(
                        (layer.bbox[3] - layer.bbox[1]) /
                        (res * layer.size[1])
                       )
                    ) - 1
                    tile  = Layer.Tile(layer, int(parts[5]), maxY -
int(parts[6]), int(parts[4]))
                else:
                    tile  = Layer.Tile(layer, int(parts[5]), int(parts[6]),
int(parts[4]))
                return tile

now, the TMS style requests are working!!

I'm still trying to get the right codes to access spherical mercator in
Manifold GIS WMS. If that fails, can someone point me to the right class
where the calculations are made that translate the x,y,z variables in the
mercator request? I might have to convert that to lat/lng to get a proper
response from the wms server-

On Thu, Nov 13, 2008 at 5:42 PM, chris marx <chrismarx at gmail.com> wrote:

> Ok,
>  I found this command
>
> adsutil set w3svc/AllowPathInfoForScriptMappings True
>
>
> Which is apparently the command i need to run to allow uri path parameters
> for IIS (from the bum link to microsoft). I've done that and try navigating
> to this link
>
>
> http://warbler2.cit.cornell.edu/tilecache/1.0.0/google-tiles/4/7/6.png?type=google
>
> but iis says the page is not found. if i try this
>
>
> http://warbler2.cit.cornell.edu/tilecache/tilecache.py/1.0.0/google-tiles/4/7/6.png?type=google
>
> it says
>
> An error occurred: The requested layer (tilecache.py) does not exist. Available layers are:
>  * google-tiles
>
>
> Thanks for any advice!
> chris-
>
>
> On Wed, Nov 12, 2008 at 6:38 PM, chris marx <chrismarx at gmail.com> wrote:
>
>> Ok,
>>  I missed this sentence
>> "TileCache supports three tile request mechanisms: WMS requests, like
>> this<http://labs.metacarta.com/wms-c/tilecache.py?LAYERS=basic&FORMAT=image/png&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application/vnd.ogc.se_inimage&SRS=EPSG:4326&BBOX=-90,0,0,90&WIDTH=256&HEIGHT=256>,
>> WorldWind requests, like this one<http://labs.metacarta.com/wms-c/tilecache.py?T=basic&L=5&X=32&Y=23>,
>> and TMS requests, Like this one<http://labs.metacarta.com/wms-c/tilecache.py/1.0.0/basic/5/32/23.png>.
>> "
>>
>> The last one goes to this link
>> http://labs.metacarta.com/wms-c/tilecache.py/1.0.0/basic/5/32/23.png
>>
>> But there is no documentation of what these parameters should be (although
>> everything seems obvious except the first, is this the wms version?)
>>
>> I tried doing this, but I'm running IIS, and the microsoft link thats
>> posted
>> http://support.microsoft.com/kb/q184320/
>>
>> no longer works, so I'm not sure if my path_info is configured to receive
>> parameters this way. any pointers for getting this to work with IIS, and
>> more about this format of TMS requests would be much appreciated-
>>  chris-
>>
>>
>> On Wed, Nov 12, 2008 at 3:37 PM, chris marx <chrismarx at gmail.com> wrote:
>>
>>> Ah,
>>>  Sorry, must have missed this in the documentation, I just looked through
>>> it again, I saw some references to this configuration in the seeding tile
>>> cache, could you be a little more specific?
>>> chris-
>>>
>>>
>>> On Wed, Nov 12, 2008 at 3:14 PM, Christopher Schmidt <
>>> crschmidt at metacarta.com> wrote:
>>>
>>>> On Wed, Nov 12, 2008 at 02:50:52PM -0500, chris marx wrote:
>>>> > Ah, ok. Yes, in fact I did, I even posted a comment there a few days
>>>> ago,
>>>> > because there seemed to be something missing in the code, but perhaps
>>>> you
>>>> > can elaborate. I looked at the example, and it's firing off tile
>>>> requests
>>>> > that look like this
>>>> >
>>>> >
>>>> http://hypercube.telascience.org/tiles/1.0.0/google-tiles/1/0/0.png?type=google
>>>> >
>>>> > this doesn't even look like a wms request to me, is there some part of
>>>> the
>>>> > TileCache app that knows that to do with a request like this?
>>>>
>>>> Yes.
>>>>
>>>> Regards,
>>>> --
>>>> Christopher Schmidt
>>>> MetaCarta
>>>>
>>>
>>>
>>>
>>> --
>>>
>>> Chris Marx
>>> Programmer/Analyst
>>> Cornell Lab of Ornithology
>>> 159 Sapsucker Woods Rd.
>>> Ithaca, NY 14850
>>> t. 1.607.254.1142
>>> http://www.birds.cornell.edu/
>>>
>>
>>
>>
>> --
>>
>> Chris Marx
>> Programmer/Analyst
>> Cornell Lab of Ornithology
>> 159 Sapsucker Woods Rd.
>> Ithaca, NY 14850
>> t. 1.607.254.1142
>> http://www.birds.cornell.edu/
>>
>
>
>
> --
>
> Chris Marx
> Programmer/Analyst
> Cornell Lab of Ornithology
> 159 Sapsucker Woods Rd.
> Ithaca, NY 14850
> t. 1.607.254.1142
> http://www.birds.cornell.edu/
>



-- 

Chris Marx
Programmer/Analyst
Cornell Lab of Ornithology
159 Sapsucker Woods Rd.
Ithaca, NY 14850
t. 1.607.254.1142
http://www.birds.cornell.edu/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/tilecache/attachments/20081114/1766df61/attachment.html


More information about the Tilecache mailing list