OpenLayers OpenLayers

Ticket #1302 (new feature)

Opened 7 months ago

Last modified 1 week ago

Add a gridOrigin parameter to align the grid to the grid of a WMS-C server.

Reported by: pascalou Assigned to: euzuro
Priority: minor Milestone: 2.8 Release
Component: Layer.Grid Version: 2.5
Keywords: wmsc grid origin alignment Cc: pascal.pons@ign.fr
State: Needs More Work

Description

  • Motivation of this feature:

We want to use a WMS-C source (http://wiki.osgeo.org/index.php/WMS_Tile_Caching, http://wiki.osgeo.org/index.php/WMS_Tiling_Client_Recommendation). We used the regular WMS Openlayer layer. The problem is that a WMSC server only serve tiles that are exactly aligned to its specific cache grid. Grids.js uses the bottom left corner of the map.maxextent as the origin of the grid, which is unfortunately not the case of our WMS-C server: our origin is (0,0).

  • Functionalities:

Compute the offsets of the requested tiles from a specified gridOrigin. If gridOrigin is not specified, use the previous map.maxExtent origin. This allows to align the requested tiles to a grid origin imposed by the WMS-C server.

  • Changes to API:

Add a new optional Api Property on Grid giving the LonLat grid origin.

  • Suggested strategies:

I made a very small patch on Grid.js that add a gridOrigin ApiProperty. I don't know if the variable can be simply named "origin" but this variable seems to be used on line 339 "this.origin = new OpenLayers.Pixel(tileoffsetx, tileoffsety);". I don't understand, this line that seems to be useless in the code ??

  • Alternatives:

Add a specific WMS-C layer class that will manage the alignment of the requested tiles ?

  • Sideaffects or complications:

I don't have a sufficient overview of the project to see Sideaffects. But it seems to be a very minor modifications.

Attachments

gridOrigin.patch (2.3 kB) - added by pascalou on 01/25/08 03:03:21.
patch on revision 5834

Change History

01/25/08 03:03:21 changed by pascalou

  • attachment gridOrigin.patch added.

patch on revision 5834

01/25/08 03:05:34 changed by pascalou

  • keywords changed from wmsc grid origin alignment to review wmsc grid origin alignment.

01/25/08 08:40:20 changed by pspencer

  • keywords changed from review wmsc grid origin alignment to wmsc grid origin alignment.
  • state set to Needs More Work.
  • milestone set to 2.7 Release.

I like this idea of this patch, but its going to require a bit more work. Specifically, we will need some tests. Also, I'd like to understand if this can be used to remove the necessity for the KaMap layer to override initGriddedTiles (although I don't think it does).

Targetting for 2.7 now because we have a lot to do for 2.6 and I don't see anyone being able to wrap their heads around the implications of this in the next couple of weeks.

07/28/08 14:44:03 changed by euzuro

  • milestone changed from 2.7 Release to 2.8 Release.

not a lot of interest.