[webmap-discuss] WMS Requests: Rounding BBOX

Tim Schaub noreply at geocartic.com
Fri Sep 22 15:21:17 EDT 2006


> 
> Is it trivial to find out the precision of a number in 
> various languages? I don't know how to do it off the top of 
> my head in Javascript, but maybe I'm being a bit naive. 
> 

I'm talking about the decimal precision (as opposed to significant figures)
of an advertised (in GetCapabilities) resolution.  If a person manually
configures a client application, then they will be reading the
GetCapabilities response and figuring out the appropriate precision.  If
you've got a client application that can parse GetCapabilities responses and
pull out the resolution as a string, then it would do something like:

resolution.length - resolution.indexOf(decimalSeparator) - 1

to figure out the decimal precision.  

Again, this implies that servers are responsible for advertising resolutions
and intentionally specifying decimal precision (1.00 is different from 1.0).

> Using precision of resolution as advertised by a server seems 
> to make sense to me.

Cool, me too.

Tim





More information about the Mail_webmap-discuss mailing list