[Tilecache] Tilecache/Geoserver UTM bbox reprojection problem

David E. Reksten der at dod.no
Mon Nov 12 11:27:10 EST 2007


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:

Javascript in index.html:
      var bounds = new
OpenLayers.Bounds(234794.87858842534,6402796.894299105,1339110.328571976,8020412.976632362);
      tiled = new OpenLayers.Layer.WMS(
        "Geoserver layers", "http://localhost:8080/",
        {
          height: '550',
          width: '425',
          layers: 'my_layer',
          styles: '',
          srs: 'EPSG:32632',
          format: 'image/png', tiled: 'true', tilesOrigin :
"234794.87858842534,6402796.894299105"
        },
        {maxExtent: bounds, maxResolution: 6318.812821614287,
projection: "EPSG:32632", buffer: 0, reproject: false,}
      );
      map.addLayer(tiled);

In tilecache.cfg:
[my_layer]
type=WMSLayer
srs=EPSG:32632
url=http://srv-sql-test:8080/geoserver/wms?transparent=yes
extension=png
layers=my_wms_layer_group
bbox=234794.87858842534,6402796.894299105,1339110.328571976,8020412.976632362
size=425,550
debug=yes
extent_type=loose
maxResolution=6318.812821614287

URL received by Tilecache:
http://localhost:8080/?HEIGHT=256&WIDTH=256&LAYERS=my_layer&STYLES=&SRS=EPSG%3A32632&FORMAT=image%2Fpng&TILED=true&TILESORIGIN=234794.87858842534%2C6402796.894299105&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&BBOX=1043602.919755054,7211604.9354657335,1852410.9609216829,8020412.976632362

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.
What can cause this? Am I using the 'reproject: false' correctly, or
is there a particular part of openlayer.js that I can comment out for
testing?

David



More information about the Tilecache mailing list