[Geoserver-users] Need WTS to serve based on Google/Bing/OSM tile coordinates instead of TMS ...

Hello,

I’m using Geoserver and GWC to serve mapbox vector tiles which is all going well. The fly in the ointment is that I need to use a third party app (eg. Maputnik, Mapbox studio style editor), to generate styles for the layers. All of these apps use Google/OSM’s standard of specifying slippy tiles, which places the tile origin at the top left, while TMS places it at the bottom left. This isn’t a problem in OpenLayers 3.0 because putting a minus sign in front of the {-y} coordinate will translate the coordinate correctly. Since I can’t get into 3rd party code, I can’t use the same trick.

I saw here: http://gis.stackexchange.com/questions/52637/geoserver-tiles-grid-offset, that WMTS could provide a workaround. Sadly, I don’t seem to be able to get this working. Here is my URL:

http://ge-gis-dev1.yambay.perth:8080/geoserver/gwc/service/wmts?Service=WMTS&REQUEST=GetTile&version=1.0.0&Format=application/json;type=geojson&Layer=Western_Power_Demo:cadastre2&TileMatrixSet=EPSG:4326&TileMatrix=EPSG:4326:19&TileRow=311259&TileCol=430800

I should see the lot boundaries, as is shown here, in the top centre tile:

I’m using the Google tile references, instead of TMS. All I see on the client is the following:

If I use the TMS coordinates in the same URL in OpenLayers 3.0, the features come down fine. Also, am I right in assuming to use the URL as a template, I should just use the following?

http://ge-gis-dev1.yambay.perth:8080/geoserver/gwc/service/wmts?Service=WMTS&REQUEST=GetTile&version=1.0.0&Format=application/json;type=geojson&Layer=Western_Power_Demo:cadastre2&TileMatrixSet=EPSG:4326&TileMatrix=EPSG:4326:{z}&TileRow={y}&TileCol={x}

Any insights that can be provided would be much appreciated.

Cheers,

Tom

image001.png

image002.png

Hi, Tom,

I believe the Vector Tiles are being correctly computed - I think this is an issue with the Tile definitions (as you noted). I am bringing in Kevin, the GWC lead, as he might have some insight.

I think you’re trying to get GWC to respond to out-of-standard requests. Perhaps there’s a work-around, but if those toolkits aren’t making correct requests (correct in relation to the spec geoserver is supporting) then GWC isn’t going to be able to make correct responses.

Thanks,
Dave

image002.png

···

On Mon, Mar 13, 2017 at 2:57 AM, Tom Cuthill <tomc@anonymised.com> wrote:

Hello,

I’m using Geoserver and GWC to serve mapbox vector tiles which is all going well. The fly in the ointment is that I need to use a third party app (eg. Maputnik, Mapbox studio style editor), to generate styles for the layers. All of these apps use Google/OSM’s standard of specifying slippy tiles, which places the tile origin at the top left, while TMS places it at the bottom left. This isn’t a problem in OpenLayers 3.0 because putting a minus sign in front of the {-y} coordinate will translate the coordinate correctly. Since I can’t get into 3rd party code, I can’t use the same trick.

I saw here: http://gis.stackexchange.com/questions/52637/geoserver-tiles-grid-offset, that WMTS could provide a workaround. Sadly, I don’t seem to be able to get this working. Here is my URL:

http://ge-gis-dev1.yambay.perth:8080/geoserver/gwc/service/wmts?Service=WMTS&REQUEST=GetTile&version=1.0.0&Format=application/json;type=geojson&Layer=Western_Power_Demo:cadastre2&TileMatrixSet=EPSG:4326&TileMatrix=EPSG:4326:19&TileRow=311259&TileCol=430800

I should see the lot boundaries, as is shown here, in the top centre tile:

I’m using the Google tile references, instead of TMS. All I see on the client is the following:

If I use the TMS coordinates in the same URL in OpenLayers 3.0, the features come down fine. Also, am I right in assuming to use the URL as a template, I should just use the following?

http://ge-gis-dev1.yambay.perth:8080/geoserver/gwc/service/wmts?Service=WMTS&REQUEST=GetTile&version=1.0.0&Format=application/json;type=geojson&Layer=Western_Power_Demo:cadastre2&TileMatrixSet=EPSG:4326&TileMatrix=EPSG:4326:{z}&TileRow={y}&TileCol={x}

Any insights that can be provided would be much appreciated.

Cheers,

Tom


Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford


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

WMTS uses a flipped y coordinate like that however it specifies its coordinates as query parameters rather than path elements like TMS does.

A WMTS request looks like this:

http://localhost:8080/geowebcache/service/wmts?layer=testlayer&style=&tilematrixset=EPSG%3A4326&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image%2Fpng&TileMatrix=EPSG%3A4326%3A2&TileCol=3&TileRow=0

There’s also a “Google Maps” service but it uses query parameters like WMTS does, just with different names and none of the additional features of WMTS (Capabilities, GetFeatureInfo, styles, dimensions, etc)

I can’t think of any way of doing coordinates as path element coordinates with flipped y other than writing a custom service implementation, or doing URL rewriting wrapped around WMTS using either your servlet container if it supports it, or a proxy web server in front of it.

image001.png

image002.png

···

On 17-03-13 01:34 PM, Dave Blasby wrote:

Hi, Tom,

I believe the Vector Tiles are being correctly computed - I think this is an issue with the Tile definitions (as you noted). I am bringing in Kevin, the GWC lead, as he might have some insight.

I think you’re trying to get GWC to respond to out-of-standard requests. Perhaps there’s a work-around, but if those toolkits aren’t making correct requests (correct in relation to the spec geoserver is supporting) then GWC isn’t going to be able to make correct responses.

Thanks,
Dave

On Mon, Mar 13, 2017 at 2:57 AM, Tom Cuthill <tomc@anonymised.com> wrote:

Hello,

I’m using Geoserver and GWC to serve mapbox vector tiles which is all going well. The fly in the ointment is that I need to use a third party app (eg. Maputnik, Mapbox studio style editor), to generate styles for the layers. All of these apps use Google/OSM’s standard of specifying slippy tiles, which places the tile origin at the top left, while TMS places it at the bottom left. This isn’t a problem in OpenLayers 3.0 because putting a minus sign in front of the {-y} coordinate will translate the coordinate correctly. Since I can’t get into 3rd party code, I can’t use the same trick.

I saw here: http://gis.stackexchange.com/questions/52637/geoserver-tiles-grid-offset, that WMTS could provide a workaround. Sadly, I don’t seem to be able to get this working. Here is my URL:

http://ge-gis-dev1.yambay.perth:8080/geoserver/gwc/service/wmts?Service=WMTS&REQUEST=GetTile&version=1.0.0&Format=application/json;type=geojson&Layer=Western_Power_Demo:cadastre2&TileMatrixSet=EPSG:4326&TileMatrix=EPSG:4326:19&TileRow=311259&TileCol=430800

I should see the lot boundaries, as is shown here, in the top centre tile:

I’m using the Google tile references, instead of TMS. All I see on the client is the following:

If I use the TMS coordinates in the same URL in OpenLayers 3.0, the features come down fine. Also, am I right in assuming to use the URL as a template, I should just use the following?

http://ge-gis-dev1.yambay.perth:8080/geoserver/gwc/service/wmts?Service=WMTS&REQUEST=GetTile&version=1.0.0&Format=application/json;type=geojson&Layer=Western_Power_Demo:cadastre2&TileMatrixSet=EPSG:4326&TileMatrix=EPSG:4326:{z}&TileRow={y}&TileCol={x}

Any insights that can be provided would be much appreciated.

Cheers,

Tom


Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford


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

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! [http://sdm.link/slashdot](http://sdm.link/slashdot)
_______________________________________________
Geoserver-users mailing list
[Geoserver-users@lists.sourceforge.net](mailto:Geoserver-users@anonymised.comsourceforge.net)
[https://lists.sourceforge.net/lists/listinfo/geoserver-users](https://lists.sourceforge.net/lists/listinfo/geoserver-users)

-- 
Kevin Michael Smith
[<smithkm@anonymised.com>](mailto:smithkm@anonymised.com)

On Wed, Mar 15, 2017 at 1:56 AM, Kevin Smith <smithkm@anonymised.com> wrote:

I can't think of any way of doing coordinates as path element coordinates
with flipped y other than writing a custom service implementation,

How about implementing the REST bindings for WMTS in that case? :wink:

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.

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

On 17-03-13 02:57 AM, Tom Cuthill wrote:

If I use the TMS coordinates in the same URL in OpenLayers 3.0, the
features come down fine. Also, am I right in assuming to use the URL
as a template, I should just use the following?

http://ge-gis-dev1.yambay.perth:8080/geoserver/gwc/service/wmts?Service=WMTS&REQUEST=GetTile&version=1.0.0&Format=application/json;type=geojson&Layer=Western_Power_Demo:cadastre2&TileMatrixSet=EPSG:4326&TileMatrix=EPSG:4326:\{z\}&amp;TileRow=\{y\}&amp;TileCol=\{x\}
<http://ge-gis-dev1.yambay.perth:8080/geoserver/gwc/service/wmts?Service=WMTS&REQUEST=GetTile&version=1.0.0&Format=application/json;type=geojson&Layer=Western_Power_Demo:cadastre2&TileMatrixSet=EPSG:4326&TileMatrix=EPSG:4326:{z}&TileRow={y}&TileCol={x}&gt;

Any insights that can be provided would be much appreciated.

That does look right. If you want to see vector tiles served through
WMTS, you could try the new layer demo page in GWC 1.11-RC1/GeoServer
2.11-RC1. It might help you figure out how to make this work, and it
provides a bit more testing for the RC before we release.

--
Kevin Michael Smith
<smithkm@anonymised.com>

That might work, although it uses string TileMatrix names rather than integer zoom levels.

An option to placate the annoying clients that refuse to use one of the published standards and just use ad hoc path based tile schemes would be a service that take a template for the coordinates as part of the path. /geowebcache/service/adhoc/////

So /geowebcache/service/adhoc/zx-y//////<row_flipped> and /geowebcache/service/adhoc/xyz//////

On the down side, it’s caving in to the broken clients and reducing their incentive to do things properly. On the up side it means we get fewer complaints about how we don’t support all these ad hoc schemes.

Of course implementing either of these would depend on someone with incentive and resources doing it or paying someone else to do it.


<details class='elided'>
<summary title='Show trimmed content'>&#183;&#183;&#183;</summary>

On Wed, Mar 15, 2017 at 1:56 AM, Kevin Smith <[smithkm@anonymised.com](mailto:smithkm@anonymised.com)> wrote:

> I can't think of any way of doing coordinates as path element coordinates with flipped y other than writing a custom service implementation,

How about implementing the REST bindings for WMTS in that case? ;-)

</details>