[Tilecache] Tilecache/Geoserver UTM bbox reprojection problem

David E. Reksten der at dod.no
Tue Nov 13 10:40:25 EST 2007


On 12/11/2007, Christopher Schmidt <crschmidt at metacarta.com> wrote:
> On Mon, Nov 12, 2007 at 05:27:10PM +0100, David E. Reksten wrote:
> > On 12/11/2007, Christopher Schmidt <crschmidt at metacarta.com> wrote:
> > > On Mon, Nov 12, 2007 at 04:31:50PM +0100, David E. Reksten wrote:
> > > > If I replace the faulty bbox in the above url with the "proper" bbox,
> > > > everything works perfectly.
> > > >
> > > > After spending many hours on this, I can't understand why the bbox in
> > > > the URL doesn't match tileconfig.cfg or the Openlayer definition. Is
> > > > there any reprojection involved here, that I'm not aware of? Is there
> > > > a setting that I have missed?
> > >
> > > You're using an Untiled WMS layer with TileCache. You can't do that.
> > > Drop the '.Untiled', and you should be in okay shape.
> >
> > Thanks, that makes sense. However, still doesn't work, so I suspect
> > something else is (also) the problem. My setup now:
>
> Try rounding all your numbers (TileCache and OpenLayers) to int. Also,
> try setting the maxExtnet/maxResolution on the Map() object instead of
> the Layer object, and see if that helps. I'm not seeing anything else
> obvious, but the rounding errors can sometimes occur when using numbers
> with lots of decimals.

Thanks, I finally got it to work. The problem was that I had forgotten
that I had tested size=x,y in the tilecache.cfg, setting the tile
dimensions identical to the map/layer size in the html (for bonus
effect, the size wasn't rectangular). This caused an offset in the
TilesOrigin relative to the bbox, for some reason. Very confusing, and
very silly of me not to notice earlier...

> > What is really strange is that the tileorigin and the first coordinate
> > pair of the bbox is (234794,6402796), but it is changed or reprojected
> > to (1043602,7211604) by Openlayer before being sent off to Tilecache.
>
> I'm not sure I understand what your'e saying here. Is there any chance
> you could make a demo of this online somehow?

I ran the Tilecache stand-alone http server locally, as was thus able
to see the http requests real-time. The bbox-parmater shown there
started with (1043602,7211604) rather than (234794,6402796), which was
the offset the faulty size=... created in this instance.

But it works perfectly now, I'm happy to report.

Thank you for making such an excellent product available, and for your
time and help!

David



More information about the Tilecache mailing list