[Geoserver-users] Cache not match miss aligned

I am using GeoServer 2.8.3 (and the built in GWC 1.8.2)

I have a layers in GeoServer which I want to present via tiled WMS.

The layer has the following properties:

  • Raster layer from a GeoTiff
  • native SRS of EPSG:3111
  • declared SRS of EPSG:4326.

I can request the layer as a (non-tiled) WMS request from OL as follows:

var url = "[http://192.168.2.154:8088/geoserver/wms](http://192.168.2.154:8088/geoserver/wms)?";
				url += "&service=WMS";
				url += "&version=1.1.1";
				url += "&request=GetMap";
				url += "&layers=Melway:60k2";			
				url += "&styles=";
				url += "&format=image/png";
				url += "&TRANSPARENT=TRUE";
				url += "&srs=EPSG:4326";
				url += "&bbox=" +bbox;
				url += "&width=256";
				url += "&height=256";

And I get a response that draws nicely over Google Maps. 
However if I either add tiled=true or access via /gwc/service/wms then I see tiles created, but when they are rendered they are not aligned perfectly with the direct WMS or Google layers.
GWC is configured to cache 4326 only, in PNG format and I can see the tiles being created from the GS web gui.
Any ideas?

Cheers


The contents of this email are confidential and may be subject to legal or professional privilege and copyright. No representation is made that this email is free of viruses or other defects. If you have received this communication in error, you may not copy or distribute any part of it or otherwise disclose its contents to anyone. Please advise the sender of your incorrect receipt of this correspondence.

Ciao Peter,
this sound like a bug due to the reprojection policy.

Can you file a jira report with a small sample to replicate?

···

On Thu, May 12, 2016 at 4:56 AM, Peter Wang <peter.wang@anonymised.com> wrote:

I am using GeoServer 2.8.3 (and the built in GWC 1.8.2)

I have a layers in GeoServer which I want to present via tiled WMS.

The layer has the following properties:

  • Raster layer from a GeoTiff
  • native SRS of EPSG:3111
  • declared SRS of EPSG:4326.

I can request the layer as a (non-tiled) WMS request from OL as follows:

var url = "[http://192.168.2.154:8088/geoserver/wms](http://192.168.2.154:8088/geoserver/wms)?";
				url += "&service=WMS";
				url += "&version=1.1.1";
				url += "&request=GetMap";
				url += "&layers=Melway:60k2";			
				url += "&styles=";
				url += "&format=image/png";
				url += "&TRANSPARENT=TRUE";
				url += "&srs=EPSG:4326";
				url += "&bbox=" +bbox;
				url += "&width=256";
				url += "&height=256";

And I get a response that draws nicely over Google Maps. 
However if I either add tiled=true or access via /gwc/service/wms then I see tiles created, but when they are rendered they are not aligned perfectly with the direct WMS or Google layers.
GWC is configured to cache 4326 only, in PNG format and I can see the tiles being created from the GS web gui.
Any ideas?

Cheers


The contents of this email are confidential and may be subject to legal or professional privilege and copyright. No representation is made that this email is free of viruses or other defects. If you have received this communication in error, you may not copy or distribute any part of it or otherwise disclose its contents to anyone. Please advise the sender of your incorrect receipt of this correspondence.


Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j


Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Regards,
Simone Giannecchini

GeoServer Professional Services from the experts!
Visit http://goo.gl/it488V for more information.

Ing. Simone Giannecchini
@simogeo
Founder/Director

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 333 8128928

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.

On Thu, May 12, 2016 at 4:56 AM, Peter Wang <peter.wang@anonymised.com> wrote:

However if I either add tiled=true or access via /gwc/service/wms then I see tiles created, but when they are rendered they are not aligned perfectly with the direct WMS or Google layers.

How much is the misalignment? GWC tolerates requests up to 10% off the tile
grid structure, and will
respond with the cached tiles, which might be up to 10% off the exact
coordinates you requested because of said tolerance.

If this is the cause try using the OpenLayers preview for the tile layers,
as far as I know it is setup to perfectly match
with the GWC gridsets.

Cheers
Andrea

--

GeoServer Professional Services from the experts! Visit
http://goo.gl/it488V for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

*AVVERTENZE AI SENSI DEL D.Lgs. 196/2003*

Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo è consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure, reproduction,
copying, distribution, or either dissemination, either whole or partial, is
strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact
immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender
does not give any warranty or accept liability as the content, accuracy or
completeness of sent messages and accepts no responsibility for changes
made after they were sent or for other risks which arise as a result of
e-mail transmission, viruses, etc.

-------------------------------------------------------

Hey,

I work with Peter and have been looking at this too.

We are using drawing the map with Google, and pointing it to GeoServer to get this content.

What confuses me is that if we use WMS it all lines up perfectly, if we use GWC it isn’t even close. You can see from the images attached the difference I’m talking about - it’s definitely not a small mismatch!

WMS generated tiles
GWC generated tiles

Cheers,

···

On Sun, May 15, 2016 at 1:26 AM, Andrea Aime <andrea.aime@anonymised.com> wrote:


Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j


Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

James Sewell,
PostgreSQL Team Lead / Solutions Architect


Level 2, 50 Queen St, Melbourne VIC 3000

P (+61) 3 8370 8000 W www.lisasoft.com F (+61) 3 8370 8099

On Thu, May 12, 2016 at 4:56 AM, Peter Wang <peter.wang@anonymised.com> wrote:

However if I either add tiled=true or access via /gwc/service/wms then I see tiles created, but when they are rendered they are not aligned perfectly with the direct WMS or Google layers.

How much is the misalignment? GWC tolerates requests up to 10% off the tile grid structure, and will
respond with the cached tiles, which might be up to 10% off the exact coordinates you requested because of said tolerance.

If this is the cause try using the OpenLayers preview for the tile layers, as far as I know it is setup to perfectly match
with the GWC gridsets.

Cheers
Andrea

==
GeoServer Professional Services from the experts! Visit
http://goo.gl/it488V for more information.

Ing. Andrea Aime

@geowolf
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)

phone: +39 0584 962313

fax: +39 0584 1660272

mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.


Hi James,
thanks for the visualization.
I don’t know what’s causing it, I’d follow Simone’s suggestion and add a ticket
plus instructions and sample data to replicate

Cheers
Andrea

···

On Mon, May 16, 2016 at 3:04 AM, James Sewell <james.sewell@anonymised.com> wrote:

Hey,

I work with Peter and have been looking at this too.

We are using drawing the map with Google, and pointing it to GeoServer to get this content.

What confuses me is that if we use WMS it all lines up perfectly, if we use GWC it isn’t even close. You can see from the images attached the difference I’m talking about - it’s definitely not a small mismatch!

Cheers,


The contents of this email are confidential and may be subject to legal or professional privilege and copyright. No representation is made that this email is free of viruses or other defects. If you have received this communication in error, you may not copy or distribute any part of it or otherwise disclose its contents to anyone. Please advise the sender of your incorrect receipt of this correspondence.

James Sewell,
PostgreSQL Team Lead / Solutions Architect


Level 2, 50 Queen St, Melbourne VIC 3000

P (+61) 3 8370 8000 W www.lisasoft.com F (+61) 3 8370 8099

On Sun, May 15, 2016 at 1:26 AM, Andrea Aime <andrea.aime@anonymised.com> wrote:


Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j


Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

On Thu, May 12, 2016 at 4:56 AM, Peter Wang <peter.wang@anonymised.com> wrote:

However if I either add tiled=true or access via /gwc/service/wms then I see tiles created, but when they are rendered they are not aligned perfectly with the direct WMS or Google layers.

How much is the misalignment? GWC tolerates requests up to 10% off the tile grid structure, and will
respond with the cached tiles, which might be up to 10% off the exact coordinates you requested because of said tolerance.

If this is the cause try using the OpenLayers preview for the tile layers, as far as I know it is setup to perfectly match
with the GWC gridsets.

Cheers
Andrea

==
GeoServer Professional Services from the experts! Visit
http://goo.gl/it488V for more information.

Ing. Andrea Aime

@geowolf
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)

phone: +39 0584 962313

fax: +39 0584 1660272

mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.


==
GeoServer Professional Services from the experts! Visit
http://goo.gl/it488V for more information.

Ing. Andrea Aime

@geowolf
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
phone: +39 0584 962313

fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.