David Blasby ha scritto: > Andrea, > >> * compute the screen bounds diagonal in meters, assuming 90DPI >> (a comment in the code states that's the OGC standard, thought I could >> not find this neither in WMS nor in SLD spec..) > > Its near the beginning of the SLD doc - there's an entire section on > the problem (it actually say .28mm, page 27, which is about 90pdi). > >> * compute the orthodromic distance between the coordinates of >> the lower left and upper right corners of the geographic >> envelope using quite a sophisticated algorithm, > > There was also an earlier discussion on this, as this isnt quite the > correct method. If you read the SLD section I mentioned above, you're > also supposed to somewhat keep the scale constant through pans. > Imagine you're looking at a bbox with a certain scale at the equator > and you pan towards the poles. According to the SLD spec you should > have a constant scale through this entire panning process (at least > for some projections). Also, if you're pulling in layers from > different mapservers, they're supposed to be calculating scale > similarly. > > The problem is if you dont have a constant scale then you could be > inadvertently turning rules (min/max scale) on and off during pan > operations (also during tiling operations) which is usually considered > aesthetically unpleasing. Some users complained about this. > > See the discussion on "actual vs standard map scale" in section 10.2 > of the SLD spec. > > So, the difference is probably mapbuilder is computing "standard > scale" and geotools is computing "actual scale". > > Please read the SLD section I mentioned as its a bit complex (but > probably easy to program) but the results of doing what they say are a > bit "crazy" (especially near the poles or for projections that > significantly distort).
Very much agree. I read that section earlier, and sent a mail to geotools devel proposing we change the way scale is computed. We could make it pluggable as well. Cc'ing geotools since I did not think about panning and scale change issues, but they are of course there in any projected system, the more evident the more you go away from the projection center. Cheers Andrea ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Geotools-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-devel
