[Geoserver-users] Layers appears only when zooming

Good evening,

I am trying to display some layers stored in Oracle Spatial and disseminated
by Geoserver 1.7.0. I had prepared a small example to better understand my
problem:
http://193.43.36.238:8484/figis/Development/openlayers.html

As you can see by default the map seems empty, in fact the polygons appear
when zooming in. More interesting is the fact that the shape of the polygons
changes according to thedifferent level of zoom( sometimes they are cut).

JS codein my HTML page:
var myMap = new
OpenLayers.Map('mapResourceFIRMS',{numZoomLevels:24,projection: "EPSG:4326"
});
var wms_continent_background = new
OpenLayers.Layer.WMS("Background","/geoserver/wms?service=wms",
                {layers: 'fifao:SPECIES_DIST',format:'image/png'}
                );

myMap.addLayer(wms_continent_background);
myMap.zoomToMaxExtent();

What i don't understand is the fact that in the demo section of my
Geoserver, it works nicely:
http://193.43.36.238:8484/geoserver/wms?bbox=-128.67246437072706,26.725438404083228,120.50570869445805,75.15232534408568&styles=&Format=application/openlayers&request=GetMap&version=1.1.1&layers=fifao:SPECIES_DIST&width=800&height=300&srs=EPSG:4326

Is there any explanation for this type of behaviour, could it be a GeoServer
bug?

Any suggestions would be more than welcome.

Thanks in advance for everything.

Sylvain
-Oracle 10.2.0
-Geoserver 1.7.0 rc1-pre
-OL 2.6
--
View this message in context: http://www.nabble.com/Layers-appears-only-when-zooming-tp19844660p19844660.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Hi Sylvain,

I took a look at the links you posted and i am not 100% sure what might be going on. You may get a better answer on the openlayers list. However... i can replicate similar behavior in the map preview by turning the map to "tiled". You may want to change the layer on your custom JS map to be WMS.Untiled and see if the problem persists.

That being said... it should work as expected. It is hard to see where the problem lies.

Andrea: Could the combination of tiling + oracle be leading to strange results?

-Justin

springrider wrote:

Good evening,

I am trying to display some layers stored in Oracle Spatial and disseminated
by Geoserver 1.7.0. I had prepared a small example to better understand my
problem:
http://193.43.36.238:8484/figis/Development/openlayers.html

As you can see by default the map seems empty, in fact the polygons appear
when zooming in. More interesting is the fact that the shape of the polygons
changes according to thedifferent level of zoom( sometimes they are cut).

JS codein my HTML page:
var myMap = new
OpenLayers.Map('mapResourceFIRMS',{numZoomLevels:24,projection: "EPSG:4326"
});
var wms_continent_background = new
OpenLayers.Layer.WMS("Background","/geoserver/wms?service=wms",
                {layers: 'fifao:SPECIES_DIST',format:'image/png'} );

myMap.addLayer(wms_continent_background);
myMap.zoomToMaxExtent();

What i don't understand is the fact that in the demo section of my
Geoserver, it works nicely:
http://193.43.36.238:8484/geoserver/wms?bbox=-128.67246437072706,26.725438404083228,120.50570869445805,75.15232534408568&styles=&Format=application/openlayers&request=GetMap&version=1.1.1&layers=fifao:SPECIES_DIST&width=800&height=300&srs=EPSG:4326

Is there any explanation for this type of behaviour, could it be a GeoServer
bug?

Any suggestions would be more than welcome.

Thanks in advance for everything.

Sylvain
-Oracle 10.2.0
-Geoserver 1.7.0 rc1-pre
-OL 2.6

--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.

springrider ha scritto:

Good evening,

I am trying to display some layers stored in Oracle Spatial and disseminated
by Geoserver 1.7.0. I had prepared a small example to better understand my
problem:
http://193.43.36.238:8484/figis/Development/openlayers.html

<snip>

Is there any explanation for this type of behaviour, could it be a GeoServer
bug?

Sylvain
-Oracle 10.2.0
-Geoserver 1.7.0 rc1-pre
-OL 2.6

Hum, depending on your point of view, you can classify this as a GeoServer or as an Oracle bug, but I believe it's Oracle specific,
and already known:
http://jira.codehaus.org/browse/GEOS-2070
http://jira.codehaus.org/browse/GEOT-1940

Basically, Oracle is completely unable to handle a request that
spans beyond the normal lon/lat bounds, and your OL client
is probably making one when fairly zoomed out, that also explains
the issue with "cut" polygons, that happens when some tiles are
within the world bounds, but some others fall partly outside
(I bet that happens with areas that touch the Bering Sea).

At the time of writing no one has stepped up to work on this
issue and fix it. If you can code in Java I can point you to the
relevant classes, otherwise you also have the option of
getting commercial support using a number of providers
(http://geoserver.org/display/GEOS/Commercial+Support)

Cheers
Andrea

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

Thanks again Andrea for your help.

What i don't understand is that it works perfectly while using the OL engine
in GeoServer and not anymore using directly the OL library in an html page.
I tried to specify my extension and the result is the same.
It's really weird because it is the only layer stored in Oracle for which i
have a problem, i didn't find any geometry problems and there is no issue
withe the world bounds..

Sylvain

Andrea Aime-4 wrote:

springrider ha scritto:

Good evening,

I am trying to display some layers stored in Oracle Spatial and
disseminated
by Geoserver 1.7.0. I had prepared a small example to better understand
my
problem:
http://193.43.36.238:8484/figis/Development/openlayers.html

<snip>

Is there any explanation for this type of behaviour, could it be a
GeoServer
bug?

Sylvain
-Oracle 10.2.0
-Geoserver 1.7.0 rc1-pre
-OL 2.6

Hum, depending on your point of view, you can classify this as a
GeoServer or as an Oracle bug, but I believe it's Oracle specific,
and already known:
http://jira.codehaus.org/browse/GEOS-2070
http://jira.codehaus.org/browse/GEOT-1940

Basically, Oracle is completely unable to handle a request that
spans beyond the normal lon/lat bounds, and your OL client
is probably making one when fairly zoomed out, that also explains
the issue with "cut" polygons, that happens when some tiles are
within the world bounds, but some others fall partly outside
(I bet that happens with areas that touch the Bering Sea).

At the time of writing no one has stepped up to work on this
issue and fix it. If you can code in Java I can point you to the
relevant classes, otherwise you also have the option of
getting commercial support using a number of providers
(http://geoserver.org/display/GEOS/Commercial+Support)

Cheers
Andrea

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

-------------------------------------------------------------------------
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-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
View this message in context: http://www.nabble.com/Layers-appears-only-when-zooming-tp19844660p19862693.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

springrider ha scritto:

Thanks again Andrea for your help.

What i don't understand is that it works perfectly while using the OL engine
in GeoServer and not anymore using directly the OL library in an html page.
I tried to specify my extension and the result is the same.
It's really weird because it is the only layer stored in Oracle for which i
have a problem, i didn't find any geometry problems and there is no issue
withe the world bounds..

Well, I guess you should try to compare the two sets of requests
with the GeoServer OL engine and the one you have and see where
the difference lies. GeoServer is embedding sing OL 2.5 or 2.6
depending on the GS version, both built with a profile that
eliminates some extra functionality we don't need (RSS support,
MapServer layers and so on).
You can use FireFox + Firebug to find out the exact requests,
or just right click on the tiles and see what's the url for
each image.

Cheers
Andrea

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

Thanks, after having spent time exploring the URLs, i found out that what is
sent by my html page is :
http://193.43.36.238:8484/figis/geoserver/wms?service=wms&LAYERS=fifao%3ASPECIES_DIST&FORMAT=image%2Fpng&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A4326&BBOX=0,-90,180,90&WIDTH=256&HEIGHT=256
while it should be
http://193.43.36.238:8484/geoserver/wms?service=wms&LAYERS=fifao%3ASPECIES_DIST&FORMAT=image%2Fpng&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A4326&BBOX=-180,-90,0,90&WIDTH=256&HEIGHT=256

The bounding box is different. would be a OL problem?

Thanks
Sylvain

Andrea Aime-4 wrote:

springrider ha scritto:

Thanks again Andrea for your help.

What i don't understand is that it works perfectly while using the OL
engine
in GeoServer and not anymore using directly the OL library in an html
page.
I tried to specify my extension and the result is the same.
It's really weird because it is the only layer stored in Oracle for which
i
have a problem, i didn't find any geometry problems and there is no issue
withe the world bounds..

Well, I guess you should try to compare the two sets of requests
with the GeoServer OL engine and the one you have and see where
the difference lies. GeoServer is embedding sing OL 2.5 or 2.6
depending on the GS version, both built with a profile that
eliminates some extra functionality we don't need (RSS support,
MapServer layers and so on).
You can use FireFox + Firebug to find out the exact requests,
or just right click on the tiles and see what's the url for
each image.

Cheers
Andrea

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

-------------------------------------------------------------------------
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-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
View this message in context: http://www.nabble.com/Layers-appears-only-when-zooming-tp19844660p19864627.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

springrider ha scritto:

Thanks, after having spent time exploring the URLs, i found out that what is
sent by my html page is :
http://193.43.36.238:8484/figis/geoserver/wms?service=wms&LAYERS=fifao%3ASPECIES_DIST&FORMAT=image%2Fpng&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A4326&BBOX=0,-90,180,90&WIDTH=256&HEIGHT=256
while it should be
http://193.43.36.238:8484/geoserver/wms?service=wms&LAYERS=fifao%3ASPECIES_DIST&FORMAT=image%2Fpng&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A4326&BBOX=-180,-90,0,90&WIDTH=256&HEIGHT=256

The bounding box is different. would be a OL problem?

It may be a different setup of the OL map. Are you sure you
clicked on the same intended tile? The two bboxes are not
the same:
0,-90,180,90: the tile covering half of the world before the
               Greenwich meridian
-180,-90,0,90: the tile covering half of the world after the
               Greenwich meridian

Cheers
Andrea

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