InsideDarkWeb.com

Geoserver WMTS Service REST url

recently I have installed the Geoserver with vector tile layer extension, getting the data in pbf (Mapbox vector tile format).

http://localhost:8080/geoserver/gwc/service/wmts?REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0&LAYER=VectorTileLayer:tbl__analysis&STYLE=&TILEMATRIX=EPSG:4326:{z}&TILEMATRIXSET=EPSG:4326&FORMAT=application/json;type=geojson&TILECOL={x}&TILEROW={y}

I want to convert this request URL to RESTfull like this.

http://localhost:8080/geoserver/gwc/service/wmts/1.0.0/blocks/{z}/{x}/{-y}.pbf

I have tried many methods but none of them working

My goal is to get the data in RESTful link for vector tiles .pbf layer

Update..

Logical reply in the question.

Geoserver currently doesn't support any restful service for URL mapping for wmts.

Geographic Information Systems Asked on November 21, 2021

2 Answers

2 Answers

Here is the link that can help you: https://github.com/PDOK/wmts-kvp-to-restful

Answered by shuyan on November 21, 2021

To use mapbox vector tiles served by GeoServer, you can do it like this:

// First the layer URL pattern
var layerWMTS = 'http://localhost:8080/geoserver/gwc/service/wmts?layer=public:list_parcels_hobart_4326&tilematrixset=EPSG:900913&Service=WMTS&Request=GetTile&Version=1.0.0&Format=application/x-protobuf;type=mapbox-vector&TileMatrix=EPSG:900913:{z}&TileCol={x}&TileRow={y}'

// Now add the layer
map.addLayer({
  'id': 'geoserver',
  'type': 'fill',
  'source': {
    'type': 'vector',
    'tiles': [
      layerWMTS
    ]
  },
  'layout': {
    'visibility': 'visible'
  },
  'source-layer': 'list_parcels_hobart_4326',
  'paint': {
    'fill-color': 'rgba(244, 131, 66, 0.4)',
    'fill-outline-color': 'rgba(244, 131, 66, 0.9)'
  }
})

This is about as simple as it gets. Note that some of the keywords need to be changed, soch as the layer=public:list_parcels_hobart_4326 section of the layer URL, and the 'source-layer': 'list_parcels_hobart_4326' of the layer parameter object. These can be taken from what you have configured in GeoServer.

And just a note to say that I think that GeoServer's vector tiles are pretty good, but it doesn't seem configurable, so you can't change simplification and such. I have a bit of exploration over here, although it's probably not well documented and a bit messy!

Answered by Alex Leith on November 21, 2021

Add your own answers!

Related Questions

Zonal histogram processing and invalid geometries

1  Asked on June 5, 2021 by beto-jacintho

   

Geonetwork 4 – Error accesing Swagger API

0  Asked on June 5, 2021 by davids182009

 

How to place point information in a .hgt file

0  Asked on June 5, 2021 by nobleman

     

Setting feature limit on WFS request

1  Asked on June 5, 2021 by stophface

         

Cannot draw map at high scale

0  Asked on June 5, 2021 by ditlev-reventlow

   

My grids aren’t displaying in degrees in QGIS

1  Asked on June 5, 2021 by geoafrikana

 

NASADEM total dataset size

1  Asked on June 4, 2021 by nmvfx

         

Black and white to rgb

1  Asked on June 4, 2021

     

Why project is not imported by QWC Admin GUI? (qwc-services)

0  Asked on June 4, 2021 by alberto-trentadue

 

Ask a Question

Get help from others!

© 2021 InsideDarkWeb.com. All rights reserved.