TC called if OL maxextent bigger than a particular layer's ?

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

TC called if OL maxextent bigger than a particular layer's ?

yvesm
Hi All,

We have a case where the maxExtent of our map needs to be larger than
the area for which we have air photos (the layers we are tilecaching).  
Up to now, we have set both OL's maxExtent and tilecache.cfg's bbox
element of the layers in question to the same value, which is to say we
are deliberately restricting the map extent to the area covered by the
tilecached layer.  However we need to use a larger mapExtent than that
of the image layers, so the question is do we need to align the TC'ed
layers bbox with the new maxExtent ?  According to the docs
(http://tilecache.org/readme.html) there's no way around that.

We would of course like to avoid doing that because the series of images
we have is only a thin diagonal line in a huge bbox and we already have
way too many blank tiles already so making the maxExtent larger would
only generate more blank tiles.  Speaking of blank tiles, is there
another way than to specify a bunch of bboxes to separate
tilecache_seed.py calls to render only areas that have valuable info at
very high zoom levels ?  The idea is that in the very unlikely event
someone zooms in to level 10 in an area where ther is no image, the WMS
server will be called to render blank images and that should not be too
costly.  The most likely event of course is that people will zoom in
where there are visible images and that would be taken care of by a
series of bbox seeds.  How do people cope with OL.mapExtent > TC.bbox ?

TIA,

Yves
_______________________________________________
Tilecache mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/tilecache
Reply | Threaded
Open this post in threaded view
|

Re: TC called if OL maxextent bigger than a particular layer's ?

Marco Nijdam
Hi Yves,

Not too sure about the OpenLayers implementation, but I would expect
that the Layer's maxExtent could be different from the Map's maxExtent.
I see the there is even a property in Layer whether to request tiles
outside the Layer's maxExtent.

So why not set the Map's maxExtent to whatever you need, and keep the
Layer.TileCache maxExtent to what you already have?

Kind regards,
--
-- Marco Nijdam
--

As quoted from Yves Moisan:

> Hi All,
>
> We have a case where the maxExtent of our map needs to be larger than
> the area for which we have air photos (the layers we are tilecaching).
> Up to now, we have set both OL's maxExtent and tilecache.cfg's bbox
> element of the layers in question to the same value, which is to say we
> are deliberately restricting the map extent to the area covered by the
> tilecached layer.  However we need to use a larger mapExtent than that
> of the image layers, so the question is do we need to align the TC'ed
> layers bbox with the new maxExtent ?  According to the docs
> (http://tilecache.org/readme.html) there's no way around that.
>
> We would of course like to avoid doing that because the series of images
> we have is only a thin diagonal line in a huge bbox and we already have
> way too many blank tiles already so making the maxExtent larger would
> only generate more blank tiles.  Speaking of blank tiles, is there
> another way than to specify a bunch of bboxes to separate
> tilecache_seed.py calls to render only areas that have valuable info at
> very high zoom levels ?  The idea is that in the very unlikely event
> someone zooms in to level 10 in an area where ther is no image, the WMS
> server will be called to render blank images and that should not be too
> costly.  The most likely event of course is that people will zoom in
> where there are visible images and that would be taken care of by a
> series of bbox seeds.  How do people cope with OL.mapExtent > TC.bbox ?
>
> TIA,
>
> Yves
> _______________________________________________
> Tilecache mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/tilecache
>


_______________________________________________
Tilecache mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/tilecache
Reply | Threaded
Open this post in threaded view
|

Re: TC called if OL maxextent bigger than a particular layer's ?

christopher.schmidt

On Jun 22, 2010, at 3:42 PM, ext Marco Nijdam wrote:

> Hi Yves,
>
> Not too sure about the OpenLayers implementation, but I would expect
> that the Layer's maxExtent could be different from the Map's maxExtent.
> I see the there is even a property in Layer whether to request tiles
> outside the Layer's maxExtent.
>
> So why not set the Map's maxExtent to whatever you need, and keep the
> Layer.TileCache maxExtent to what you already have?

Only works if your layer is not a baselayer; otherwise, you're out of
luck.

Some layers also have a tileExtent and layerExtent seperated;
I don't know which ones off the top fo my head.

-- Chris

> Kind regards,
> --
> -- Marco Nijdam
> --
>
> As quoted from Yves Moisan:
>> Hi All,
>>
>> We have a case where the maxExtent of our map needs to be larger than
>> the area for which we have air photos (the layers we are tilecaching).
>> Up to now, we have set both OL's maxExtent and tilecache.cfg's bbox
>> element of the layers in question to the same value, which is to say we
>> are deliberately restricting the map extent to the area covered by the
>> tilecached layer.  However we need to use a larger mapExtent than that
>> of the image layers, so the question is do we need to align the TC'ed
>> layers bbox with the new maxExtent ?  According to the docs
>> (http://tilecache.org/readme.html) there's no way around that.
>>
>> We would of course like to avoid doing that because the series of images
>> we have is only a thin diagonal line in a huge bbox and we already have
>> way too many blank tiles already so making the maxExtent larger would
>> only generate more blank tiles.  Speaking of blank tiles, is there
>> another way than to specify a bunch of bboxes to separate
>> tilecache_seed.py calls to render only areas that have valuable info at
>> very high zoom levels ?  The idea is that in the very unlikely event
>> someone zooms in to level 10 in an area where ther is no image, the WMS
>> server will be called to render blank images and that should not be too
>> costly.  The most likely event of course is that people will zoom in
>> where there are visible images and that would be taken care of by a
>> series of bbox seeds.  How do people cope with OL.mapExtent > TC.bbox ?
>>
>> TIA,
>>
>> Yves
>> _______________________________________________
>> Tilecache mailing list
>> [hidden email]
>> http://lists.osgeo.org/mailman/listinfo/tilecache
>>
>
>
> _______________________________________________
> Tilecache mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/tilecache

Regards,
--
Christopher Schmidt
Nokia

_______________________________________________
Tilecache mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/tilecache
Reply | Threaded
Open this post in threaded view
|

Re: TC called if OL maxextent bigger than a particular layer's ?

yvesm
Le 2010-06-22 15:45, [hidden email] a écrit :

> On Jun 22, 2010, at 3:42 PM, ext Marco Nijdam wrote:
>
>    
>> Hi Yves,
>>
>> Not too sure about the OpenLayers implementation, but I would expect
>> that the Layer's maxExtent could be different from the Map's maxExtent.
>> I see the there is even a property in Layer whether to request tiles
>> outside the Layer's maxExtent.
>>
>> So why not set the Map's maxExtent to whatever you need, and keep the
>> Layer.TileCache maxExtent to what you already have?
>>      
> Only works if your layer is not a baselayer; otherwise, you're out of
> luck.
>    

> Some layers also have a tileExtent and layerExtent seperated;
> I don't know which ones off the top fo my head.
>
>    
So bottom line is : mapExtent must equal TC BBOX.

Thanx you both,

Yves

_______________________________________________
Tilecache mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/tilecache
Reply | Threaded
Open this post in threaded view
|

Re: TC called if OL maxextent bigger than a particular layer's ?

erilem
In reply to this post by christopher.schmidt
On Tuesday, June 22, 2010,  <[hidden email]> wrote:

>
> On Jun 22, 2010, at 3:42 PM, ext Marco Nijdam wrote:
>
>> Hi Yves,
>>
>> Not too sure about the OpenLayers implementation, but I would expect
>> that the Layer's maxExtent could be different from the Map's maxExtent.
>> I see the there is even a property in Layer whether to request tiles
>> outside the Layer's maxExtent.
>>
>> So why not set the Map's maxExtent to whatever you need, and keep the
>> Layer.TileCache maxExtent to what you already have?
>
> Only works if your layer is not a baselayer; otherwise, you're out of
> luck.

Right.

Using a fake baselayer might be a workaround.

Another way might be to override map.isValidLonLat and use
this.maxExtent instead of this.getMaxExtent() for the validation of
the lonlat.

And this makes me wonder if it would make sense to have isValidLonLat
use this.options.maxExtent if it's defined (and
this.baselayer.maxExtent if it's not).

Another area of interest for OL 3 I guess :-)

--
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96
Mail : [hidden email]
http://www.camptocamp.com
_______________________________________________
Tilecache mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/tilecache
Reply | Threaded
Open this post in threaded view
|

Re: TC called if OL maxextent bigger than a particular layer's ?

yvesm

> Right.
>
> Using a fake baselayer might be a workaround.
>    
Hi Eric,

Thanx for chiming in.  You mean using a dummy base layer for which I
would not have a TC defined ?  The idea basically is to still show the
TC layer, for the extent it is defined, and not request unecessary (in
fact undefined) tiles.  I understand I could show features on a super
(dummy) base layer and maybe make the TC baselayer available at a
certain scale (though I wonder how seeding would work then : zoomLevel 0
would be 2 or 3 in reality), but I don't see how users can see the
portion for which there is a tilecached layer.  I think we'll resort to
defining a new OL map object altogether.

Thanx anyhow,

Yves

_______________________________________________
Tilecache mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/tilecache
Reply | Threaded
Open this post in threaded view
|

Re: TC called if OL maxextent bigger than a particular layer's ?

erilem
On Wednesday, June 23, 2010, Yves Moisan <[hidden email]> wrote:

>
>
> Right.
>
> Using a fake baselayer might be a workaround.
>
>
> Hi Eric,
>
> Thanx for chiming in.  You mean using a dummy base layer for which I would not have a TC defined ?

Yes.

new OpenLayers.Layer("_dummy_", {
    isBaseLayer: true,
    displayInLayerSwitcher: false,
    maxExtent: ...
});

(maxExtent can also be defined in the map options.)

> The idea basically is to still show the TC layer, for the extent it is defined, and not request unecessary (in fact undefined) tiles.

No tiles outside the TC layer's maxExtent will be requested.

> I understand I could show features on a super (dummy) base layer and maybe make the TC baselayer available at a certain scale

Just in case this is unclear: in the workaround I'm suggesting the
dummy base layer is a regular base layer (as defined above), and the
TC layer is an overlay.

> (though I wonder how seeding would work then : zoomLevel 0 would be 2 or 3 in reality), but I don't see how users can see the portion for which there is a tilecached layer.  I think we'll resort to defining a new OL map object altogether.

--
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96
Mail : [hidden email]
http://www.camptocamp.com
_______________________________________________
Tilecache mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/tilecache