Hi,
at http://jira.codehaus.org/browse/GEOS-3854
you can see a first cut of the cached superoverlay mode patch.
The patch adds a "cached" superoverlay mode that
delegates directly to GWC for all layers in the request
where this is possible.
The compatibility with GWC is checked by verifying all the
KML related params are the same as the GS defaults, that
the style is the default one, no wms filters, no palette,
no maxFeatures or startIndex
(can anyone think of something I've missed?).
If that works, the code builds a link straight to
the GWC main KML entry point for that layer, something like:
http://host:port/geoserver/gwc/service/kml/prefix:layer.kml.kml
for vectors and
http://host:port/geoserver/gwc/service/kml/prefix:layer.png.kml
for rasters
Now, there is a catch. That link is actually good only if
you want to point to the top of the 4326 hierarchy.
Which is reasonable in reflector requests, that are unlikely
to have a bbox, but less so in straight GetMap request, that
always do.
In that case the code already tries to find the best tile in the 4326
hierarchy matching the request, anyone with a quick suggestion
on how I turn it into the proper GWC link?
I already have the Z, need to find the X and Y given the tile envelope
in 4326 and the zoom level.
Cheers
Andrea
--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.
Line 628 in
wms/src/main/java/org/vfny/geoserver/wms/responses/map/kml/CachedHierarchyRegionatingStrategy.java
contains a naive way of figuring it out.
Here's GWC's internal code, but at first glance I think they're
identical for this purpose:
http://geowebcache.org/trac/browser/trunk/geowebcache/src/main/java/org/geowebcache/grid/GridSet.java#L127
-Arne
Andrea Aime wrote:
Hi,
at http://jira.codehaus.org/browse/GEOS-3854
you can see a first cut of the cached superoverlay mode patch.
The patch adds a "cached" superoverlay mode that
delegates directly to GWC for all layers in the request
where this is possible.
The compatibility with GWC is checked by verifying all the
KML related params are the same as the GS defaults, that
the style is the default one, no wms filters, no palette,
no maxFeatures or startIndex
(can anyone think of something I've missed?).
If that works, the code builds a link straight to
the GWC main KML entry point for that layer, something like:
http://host:port/geoserver/gwc/service/kml/prefix:layer.kml.kml
for vectors and
http://host:port/geoserver/gwc/service/kml/prefix:layer.png.kml
for rasters
Now, there is a catch. That link is actually good only if
you want to point to the top of the 4326 hierarchy.
Which is reasonable in reflector requests, that are unlikely
to have a bbox, but less so in straight GetMap request, that
always do.
In that case the code already tries to find the best tile in the 4326
hierarchy matching the request, anyone with a quick suggestion
on how I turn it into the proper GWC link?
I already have the Z, need to find the X and Y given the tile envelope
in 4326 and the zoom level.
Cheers
Andrea