[Geoserver-devel] OGC scale computation in

Hi all,
I've committed the changes to the scale computation, now the default
for 2.3.x and trunk is the OGC way to compute a scale. The older
can still be chosen passing the scaleComputationMethod hint.

It's quite nice I'd add, to have mapbuilder scale in line with
geoserver one.
On projected maps, the algorithm is the same as many others. Only on lat/lon maps we still have differences with MapServer and DeeGree,
whilst we are pretty much in line with MapBuilder (we do
have a very little difference, probably due to different floating
point precisions in java and javascript).

Cheers
Andrea

Andrea can I have a "upgrade to 2.3" instruction for this please" :slight_smile:

We did not go through a geotools proposal on this one (it is an API change is it not?); is their a Jira that will show up in the
change notes at least?

Jody

Hi all,
I've committed the changes to the scale computation, now the default
for 2.3.x and trunk is the OGC way to compute a scale. The older
can still be chosen passing the scaleComputationMethod hint.

It's quite nice I'd add, to have mapbuilder scale in line with
geoserver one.
On projected maps, the algorithm is the same as many others. Only on lat/lon maps we still have differences with MapServer and DeeGree,
whilst we are pretty much in line with MapBuilder (we do
have a very little difference, probably due to different floating
point precisions in java and javascript).

Cheers
Andrea

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
geotools-devel List Signup and Options
  

Jody Garnett ha scritto:

Andrea can I have a "upgrade to 2.3" instruction for this please" :slight_smile:

We did not go through a geotools proposal on this one (it is an API change is it not?); is their a Jira that will show up in the
change notes at least?

API change? Well, no new classes, no new public methods... I just added a hint to the streaming renderer, which is just as undocumented as the others :frowning: I added a couple of public constants thought, so this is in fact a little API change.

By default you get the new scale computation algorithm, but if you need
the old, geodetic precise (on small area) algorithm, you can set the following hint:
Map hints = new HashMap();
hints.put("scaleComputationMethod", StreamingRenderer.SCALE_ACCURATE);
renderer.setRenderingHints(hints).

Moreover, this change has been performed on 2.2.x as well (I consulted
Jesse before). So it's not really "how to upgrade to 2.3.x", but "hey
we're OGC compliants now, if you still want the old behaviour, that's
the way".
I would also like to point out that the scale computation algorithm
has been changed quite a few times in the last year without notices
(and it seems, nobody noticed, too).

Cheers
Andrea

Andrea Aime wrote:

Jody Garnett ha scritto:

Andrea can I have a "upgrade to 2.3" instruction for this please" :slight_smile:

We did not go through a geotools proposal on this one (it is an API change is it not?); is their a Jira that will show up in the
change notes at least?

API change? Well, no new classes, no new public methods... I just added a hint to the streaming renderer, which is just as undocumented as the others :frowning: I added a couple of public constants thought, so this is in fact a little API change.

Oh I was under the impression you made a strategy object for the different kinds of scale computations? In which case it would of been a new API. My mistake.

By default you get the new scale computation algorithm, but if you need
the old, geodetic precise (on small area) algorithm, you can set the following hint:
Map hints = new HashMap();
hints.put("scaleComputationMethod", StreamingRenderer.SCALE_ACCURATE);
renderer.setRenderingHints(hints).

So when the code gets around to calculating do you have an "if" statement to choose between
the different techniques?

Moreover, this change has been performed on 2.2.x as well (I consulted
Jesse before). So it's not really "how to upgrade to 2.3.x", but "hey
we're OGC compliants now, if you still want the old behaviour, that's
the way".

Okay so there is a Jira item that is marked closed for 2.2.3 and forward then ...

I would also like to point out that the scale computation algorithm
has been changed quite a few times in the last year without notices
(and it seems, nobody noticed, too).

Great :slight_smile: Well this is exactly the sort of thing we want to tack (if only with a Jira) so that the "trunk on trunk" idea
works out for everyone.

Jody

Jody Garnett ha scritto:

Andrea Aime wrote:

Jody Garnett ha scritto:

Andrea can I have a "upgrade to 2.3" instruction for this please" :slight_smile:

We did not go through a geotools proposal on this one (it is an API change is it not?); is their a Jira that will show up in the
change notes at least?

API change? Well, no new classes, no new public methods... I just added a hint to the streaming renderer, which is just as undocumented as the others :frowning: I added a couple of public constants thought, so this is in fact a little API change.

Oh I was under the impression you made a strategy object for the different kinds of scale computations? In which case it would of been a new API. My mistake.

I was tempted, but it seemed overkill for just two ways.
Unless we do want to replicate all the other scale computation algorithms found in the others projects, a simple if is enough.

By default you get the new scale computation algorithm, but if you need
the old, geodetic precise (on small area) algorithm, you can set the following hint:
Map hints = new HashMap();
hints.put("scaleComputationMethod", StreamingRenderer.SCALE_ACCURATE);
renderer.setRenderingHints(hints).

So when the code gets around to calculating do you have an "if" statement to choose between
the different techniques?

Yes, there are only two. If anyone will come in and ask for 10 different
ways, we'll set up the strategy pattern. It did not pull its weight in
this case and in my opinion.

Moreover, this change has been performed on 2.2.x as well (I consulted
Jesse before). So it's not really "how to upgrade to 2.3.x", but "hey
we're OGC compliants now, if you still want the old behaviour, that's
the way".

Okay so there is a Jira item that is marked closed for 2.2.3 and forward then ...

Yes, there is one... can't remember it, have a look at those closed today.

Cheers
Andrea