0

We use geoserver to serve WMS tiles inside a openlayers environment. The weird thing I see is that, in our production environment, depending on the scale, data is shifted (translated) against the OSM/Google/Bing background.

See following screenshot, here you can see the pipelines positioned correctly on the plant site:

correctly positioned

Now if I zoom out, I get the following view:

incorrect position

obviously wrong. I am a bit puzzled as to what could cause this.

I develop on a mac, using geoserver 2.6.3 and (unfortunately) Oracle database backend. On my mac I do no have this problem at all. So it is imho not related to my OpenLayers/javascript code.

Our production environment is a Windows 2012R2 server, with Oracle 11g2. I first ran Geoserver 2.6.3, just upgraded to 2.7.1, hoping that would remove the problem (but it did not --a lot faster though, which is nice).

I read on the geoserver site that Windows+oracle is an obscure platform, but I am kind of hoping somebody could think of something to look at that could cause this?

Things I tried/verified:

  • the data is the same on both platforms
  • the data is stored in SRS-ID 3035, and thus transformed to 900913
  • the cache is empty (originally the srs-id was incorrectly deduced from the table)
  • used the same browser
  • I checked the featuretype.xml on both platforms and it looked identical

At the moment I am bit stuck, my guess it is the combination of oracle and windows that causes this error? We use postgis+geoserver 2.3 on windows for another client without issues.

But I have no idea where to look for a probable cause, and eventually, hopefully a fix.

  • Just curious, do you have an independent, third source of data by which you can work out which of data is incorrect (the pipes or the backdrop)? – nmtoken Jul 10 '15 at 12:07
  • If I zoom in/out, the backdrop does not jump around, openlayers animates the zooming, and then fills in the retrieved tiles. The google/osm/bing backdrops just are rendered correctly (so it seems), the data retrieved from geoserver is shifted (at certain scales). Note: when using my local geoserver it just works. If I use the windows geoserver, it is shifted. I could not capture in a screenshot, but in openlayers it actually shows the locally zoomed version before filling in the tiles, so it seems really clear that the newly retrieved tiles are "offset" in some way. – nathanvda Jul 10 '15 at 13:46
  • But anyway, seems like a good thing to verify, so I will try that. – nathanvda Jul 10 '15 at 13:46
  • @nathanvda ...have you ever figured this out ? – deg Oct 11 '17 at 19:51
1

Zoom-level depending mis-alignments are often caused by the OL client and the server having either slightly different zoom level definitions, or different maximum extent definitions.

Try looking at the GWC preview (you can find it in the tile layers menu) and check its setup, then make sure your client does the same.

  • Thank you Andrea! Interesting. So my local geoserver could have a different "zoom level definition" (maybe because it was updated from 2.3 -> 2.6), and the production geoserver was a fresh 2.6 (and later 2.7) install? Because on my local geoserver it works. So I check the gridsets in the menu? I am using standard 900913. Ow maybe relevant: I am using openlayers 2.14, which is maybe too ancient? – nathanvda Jul 10 '15 at 8:59
  • Weird: if I use leaflet, everything is ok. Baffling. Confused :) – nathanvda Jul 10 '15 at 15:02
  • Unsure, not a client side guy myself, you should ask on the OL mailing list I guess – Andrea Aime Jul 26 '15 at 12:26

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.