[Geoserver-devel] Min/Max Scale denominator

Hi,

I know this is a message more for the users list but I am on so many lists that the thought of joining another one makes me tired :(.

I had an interesting problem using a style with several rules with different min/max scale denominators. I made the style and tested the layer using the little openlayers demo that ships with Geoserver. It worked great. I then added the layer to my own webpage as an overlay layer and instead of choosing a different rule when I zoomed in it always used the same rule.

It sounds to me like maybe I am using openlayers wrong. The layer was tiled but it doesn't seem to me that that should have had this affect. Any ideas about a configuration in openlayer (or anything else) that would make the style be incorrectly chosen? The style was the default style and the FeatureType had no other styles. The openlayers WMS layer definition did not have a style defined. In fact we copied the layer definition directly from the demo javascript.

Thanks,

Jesse

This doesn't ring a bell for me; however, you could try to debug by tracking down the urls used to request the tiles in each case. You can probably do this by right-clicking in the map and choosing 'view image', or using the Firebug JavaScript/webpage debugger in Firefox. Comparing the parameter lists may give you a hint as to what's going on.

Hope this helps,
David Winslow

Jesse Eichar wrote:

Hi,

I know this is a message more for the users list but I am on so many lists that the thought of joining another one makes me tired :(.

I had an interesting problem using a style with several rules with different min/max scale denominators. I made the style and tested the layer using the little openlayers demo that ships with Geoserver. It worked great. I then added the layer to my own webpage as an overlay layer and instead of choosing a different rule when I zoomed in it always used the same rule.

It sounds to me like maybe I am using openlayers wrong. The layer was tiled but it doesn't seem to me that that should have had this affect. Any ideas about a configuration in openlayer (or anything else) that would make the style be incorrectly chosen? The style was the default style and the FeatureType had no other styles. The openlayers WMS layer definition did not have a style defined. In fact we copied the layer definition directly from the demo javascript.

Thanks,

Jesse

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel
  

Jesse Eichar ha scritto:

Hi,

I know this is a message more for the users list but I am on so many lists that the thought of joining another one makes me tired :(.

I had an interesting problem using a style with several rules with different min/max scale denominators. I made the style and tested the layer using the little openlayers demo that ships with Geoserver. It worked great. I then added the layer to my own webpage as an overlay layer and instead of choosing a different rule when I zoomed in it always used the same rule.

It sounds to me like maybe I am using openlayers wrong. The layer was tiled but it doesn't seem to me that that should have had this affect. Any ideas about a configuration in openlayer (or anything else) that would make the style be incorrectly chosen? The style was the default style and the FeatureType had no other styles. The openlayers WMS layer definition did not have a style defined. In fact we copied the layer definition directly from the demo javascript.

Hmmm... the only thing that comes to mind is that the dpi used
by OL to compute the scale is not the one recommended by the WMS
specification, so in our preview we change that to the proper value:

// make OL compute scale according to WMS spec
OpenLayers.DOTS_PER_INCH = 25.4 / 0.28;

Now, this influences the scale OL is showing and makes sure it
matches the one computed on the server... but besides that, no
I have no idea what might be different.

Have you tried comparing the WMS requests made by your client and
the GS one?

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

Thanks guys. Appreciate the responses.

Jesse

On 16-Oct-08, at 4:58 PM, Andrea Aime wrote:

Jesse Eichar ha scritto:

Hi,
I know this is a message more for the users list but I am on so many lists that the thought of joining another one makes me tired :(.
I had an interesting problem using a style with several rules with different min/max scale denominators. I made the style and tested the layer using the little openlayers demo that ships with Geoserver. It worked great. I then added the layer to my own webpage as an overlay layer and instead of choosing a different rule when I zoomed in it always used the same rule.
It sounds to me like maybe I am using openlayers wrong. The layer was tiled but it doesn't seem to me that that should have had this affect. Any ideas about a configuration in openlayer (or anything else) that would make the style be incorrectly chosen? The style was the default style and the FeatureType had no other styles. The openlayers WMS layer definition did not have a style defined. In fact we copied the layer definition directly from the demo javascript.

Hmmm... the only thing that comes to mind is that the dpi used
by OL to compute the scale is not the one recommended by the WMS
specification, so in our preview we change that to the proper value:

// make OL compute scale according to WMS spec
OpenLayers.DOTS_PER_INCH = 25.4 / 0.28;

Now, this influences the scale OL is showing and makes sure it
matches the one computed on the server... but besides that, no
I have no idea what might be different.

Have you tried comparing the WMS requests made by your client and
the GS one?

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

We have a similar problem. Scales of Open Layers and scales of Geoserver do
not match. I i have a simple world image (tiff) with a specific style that
contains MinScaleDenominator and MaxScaleDenominator. Then when i view this
layer in open layers and i for example zoom-in, i still see this layer where
it should already be inivisible (according to the style).

Setting OpenLayers.DOTS_PER_INCH to 96 of 74 or 90.xxxx doesn't help, the
scales are still way off.

--
View this message in context: http://www.nabble.com/Min-Max-Scale-denominator-tp20015627p20029445.html
Sent from the GeoServer - Dev mailing list archive at Nabble.com.

So, has the solution for this problem been found?

David Winslow-5 wrote:

This doesn't ring a bell for me; however, you could try to debug by
tracking down the urls used to request the tiles in each case. You can
probably do this by right-clicking in the map and choosing 'view image',
or using the Firebug JavaScript/webpage debugger in Firefox. Comparing
the parameter lists may give you a hint as to what's going on.

Hope this helps,
David Winslow

Jesse Eichar wrote:

Hi,

I know this is a message more for the users list but I am on so many
lists that the thought of joining another one makes me tired :(.

I had an interesting problem using a style with several rules with
different min/max scale denominators. I made the style and tested the
layer using the little openlayers demo that ships with Geoserver. It
worked great. I then added the layer to my own webpage as an overlay
layer and instead of choosing a different rule when I zoomed in it
always used the same rule.

It sounds to me like maybe I am using openlayers wrong. The layer was
tiled but it doesn't seem to me that that should have had this
affect. Any ideas about a configuration in openlayer (or anything
else) that would make the style be incorrectly chosen? The style was
the default style and the FeatureType had no other styles. The
openlayers WMS layer definition did not have a style defined. In fact
we copied the layer definition directly from the demo javascript.

Thanks,

Jesse

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the
world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel
  
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the
world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

--
View this message in context: http://www.nabble.com/Min-Max-Scale-denominator-tp20015627p20129757.html
Sent from the GeoServer - Dev mailing list archive at Nabble.com.

GeoUser ha scritto:

So, has the solution for this problem been found?

Nobody was able to reproduce. If you can, open a jira issue,
send us some sample data, the SLD, and the OL client and
we'll debug it.

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

I haven't had time to look into it again. hopefully I will have some time next week.

jesse

On 23-Oct-08, at 2:19 PM, GeoUser wrote:

So, has the solution for this problem been found?

David Winslow-5 wrote:

This doesn't ring a bell for me; however, you could try to debug by
tracking down the urls used to request the tiles in each case. You can
probably do this by right-clicking in the map and choosing 'view image',
or using the Firebug JavaScript/webpage debugger in Firefox. Comparing
the parameter lists may give you a hint as to what's going on.

Hope this helps,
David Winslow

Jesse Eichar wrote:

Hi,

I know this is a message more for the users list but I am on so many
lists that the thought of joining another one makes me tired :(.

I had an interesting problem using a style with several rules with
different min/max scale denominators. I made the style and tested the
layer using the little openlayers demo that ships with Geoserver. It
worked great. I then added the layer to my own webpage as an overlay
layer and instead of choosing a different rule when I zoomed in it
always used the same rule.

It sounds to me like maybe I am using openlayers wrong. The layer was
tiled but it doesn't seem to me that that should have had this
affect. Any ideas about a configuration in openlayer (or anything
else) that would make the style be incorrectly chosen? The style was
the default style and the FeatureType had no other styles. The
openlayers WMS layer definition did not have a style defined. In fact
we copied the layer definition directly from the demo javascript.

Thanks,

Jesse

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the
world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the
world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

--
View this message in context: http://www.nabble.com/Min-Max-Scale-denominator-tp20015627p20129757.html
Sent from the GeoServer - Dev mailing list archive at Nabble.com.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel