Ticket #283 (closed feature: fixed)

Opened 7 years ago

Last modified 7 years ago

Tile Requests: Rounding Errors

Reported by: crschmidt Owned by: euzuro
Priority: major Milestone: 2.2 Release
Component: Layer Version: 2.1
Keywords: Cc:
State:

Description

Currently, tiles request full decimal numbers, which results in rounding errors. Find a safe spot to round numbers off at.

Change History

Changed 7 years ago by sderle

six places after the decimal point is safe in any coordinate system, more or less. 0.000001 degrees is about 4 inches at the equator.

Changed 7 years ago by crschmidt

  • status changed from new to closed
  • resolution set to fixed

Email to users list:

This morning, I committed a change to OpenLayers which will alter tile bounding boxes for layers which use a BBOX parameter. (This includes WMS and WFS -- probably not much else.) The bounds.toBBOX() function will now round the values to 6 decimal places by default. The number of decimal places it rounds to is controllable by passing a value into the toBBOX function:

new OpenLayers.Bounds(0,1.22,2.55,3.5); bounds.toBBOX(1) -> '0,1.2,2.6,4'

This means that if you have an existing cached layer using something like Squid, your cache will no longer be valid for tiles which were resulting in BBOX values with more than 6 decimal places. If you have a problem with this new behavior, please respond to this email before the 2.2 release so that we can help you to find a solution which fits your situation.

Note: See TracTickets for help on using tickets.