[Geoserver-users] WMS Tiles not aligned in android

Hi All,

I have implemented geoserver heatmap from this tutorial https://docs.geoserver.org/latest/en/user/styling/sld/extensions/rendering-transform.html#heatmap-generation , using android demo from this example app https://github.com/shalperin/android-wms

In the layer preview in geoserver (openlayers) the output shows correctly as below

Screenshot from 2020-04-17 13-53-22.png

However on android mobile app the tiles don’t align as shown in the image below

device-2020-04-17-135142.png

What could be the problem?

Attached is the source of the layer preview from geoserver, WMSTileProvider and TuileProviderFactory

Regards,
Erick

application_openlayers.html (43.3 KB)

TileProviderFactory.java (1.52 KB)

WMSTileProvider.java (1.71 KB)

Hi All,

I have implemented geoserver heatmap from this tutorial https://docs.geoserver.org/latest/en/user/styling/sld/extensions/rendering-transform.html#heatmap-generation , using android demo from this example app https://github.com/shalperin/android-wms

In the layer preview in geoserver (openlayers) the output shows correctly as below

Screenshot from 2020-04-17 13-53-22.png

However on android mobile app the tiles don’t align as shown in the image below

device-2020-04-17-135142.png

What could be the problem?

Attached is the source of the layer preview from geoserver, WMSTileProvider and TuileProviderFactory

Regards,
Erick

application_openlayers.html (43.3 KB)

TileProviderFactory.java (1.52 KB)

WMSTileProvider.java (1.71 KB)

Erick,

try replacing x by y or try putting -y in your url pattern.

Good luck.

--
Sent from: http://osgeo-org.1560.x6.nabble.com/GeoServer-User-f3786390.html

It isn’t possible to do this - when you make a tiled map each tile is independently created - see https://gis.stackexchange.com/questions/245379/adjust-geoserver-geotools-heatmap-code-to-show-it-as-tiled-wms/245959#245959 for a longer answer.

Ian

Ian,

you are right. From the images I thought the tiles were already created.

The only way would be to generate bigger WMS image and generate tiles from
them (cookie-cutter). I guess it would be possible with the right
meta-tiling parameters ...

--
Sent from: http://osgeo-org.1560.x6.nabble.com/GeoServer-User-f3786390.html

Hi Olyster,

Replacing x by y or making y value to be -y, makes the tile not visible in the android client.

Erick

On Fri, Apr 17, 2020 at 5:37 PM Olyster <gagnon_olivier@anonymised.com.5777…> wrote:

Erick,

try replacing x by y or try putting -y in your url pattern.

Good luck.


Sent from: http://osgeo-org.1560.x6.nabble.com/GeoServer-User-f3786390.html


Geoserver-users mailing list

Please make sure you read the following two resources before posting to this list:

If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer

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

Hi Ian,

The strange thing is that openlayer geoserver layer preview client doesn’t misalign the tiles, check below:

image.png

It’s only android tile provider that misalign the tiles, see below.

image.png

This might be, either due to tile size used by openlayers geoserver layer preview client or tile origin that android tile provider uses, I will try and play around with tile resize and origin and see whether the misalignment will be resolved.

Erick

On Fri, Apr 17, 2020 at 5:17 PM Ian Turton <ijturton@anonymised.com> wrote:

It isn’t possible to do this - when you make a tiled map each tile is independently created - see https://gis.stackexchange.com/questions/245379/adjust-geoserver-geotools-heatmap-code-to-show-it-as-tiled-wms/245959#245959 for a longer answer.

Ian

It’s more likely to be because the preview doesn’t have tiling turned on by default - this is not an alignment issue it is the fact that each tile is calculated separately so you get edge effects on each tile (and the maximum will be different too so the colors will be off)

Ian

···

Ian Turton