Ticket #1302 (assigned feature)

Opened 7 years ago

Last modified 4 years ago

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

Reported by: pascalou Owned by: crschmidt
Priority: minor Milestone: 2.13 Release
Component: Layer.Grid Version: 2.5
Keywords: wmsc grid origin alignment Cc: pascal.pons@…
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 Download (2.3 KB) - added by pascalou 7 years ago.
patch on revision 5834
gridOrigin.2.patch Download (4.8 KB) - added by crschmidt 6 years ago.

Change History

Changed 7 years ago by pascalou

patch on revision 5834

Changed 7 years ago by pascalou

  • keywords review added

Changed 7 years ago by pspencer

  • keywords review removed
  • 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.

Changed 6 years ago by euzuro

  • milestone changed from 2.7 Release to 2.8 Release

not a lot of interest.

Changed 6 years ago by crschmidt

Changed 6 years ago by crschmidt

Needs tests; working on it. Existing Layer tests all pass still.

ka-Map and MapGuide still have a custom getGridLayout function; ka-Map actually has no change here, but MapGuide now lets you set the gridOrigin as well.

Changed 6 years ago by crschmidt

(In [8930]) "Remove unused 'tileOrigin' code from TileCache layer", (Closes #1076). Though the idea behind this is good, having the code here and unused is not the right thing to do. (See #1302) for a better attempt at what this should actually be. The reason this code exists is almost certainly a carggocult from Layer.TMS, which *does* have a tileOrigin, and I'm pretty sure tschaub started by copying from that. r=me, though it's mostly just docs.

Changed 5 years ago by crschmidt

  • owner changed from euzuro to crschmidt
  • status changed from new to assigned

Changed 5 years ago by crschmidt

  • milestone changed from 2.8 Release to 2.9 Release

bumping to 2.9, since the primary motivation I had for getting this in trunk was the ArcGIS cache stuff, and that's just too big a change to get in this late.

Changed 4 years ago by bartvde

  • milestone changed from 2.9 Release to 2.10 Release
Note: See TracTickets for help on using tickets.