Discussion:
[Geoserver-users] Vector Tiles Extension and Gutter Size
James Banting
2017-05-30 18:21:53 UTC
Permalink
Hi all,

I'm having issues with makers being cut off using the vector tiles
extension - pbf to be specific. I've set the gutter size on the layer
and GWC default to 100 but it doesn't seem to have any effect.

I'm using Geoserver 2.11.0 and geoserver-2.11.0-vectortiles plugin.

Any thoughts?



Cheers,
--
*James Banting*
Rahkonen Jukka (MML)
2017-05-31 14:24:26 UTC
Permalink
Hi,

Your image looks like the symbols which present the vector data are painted over by satellite image raster tiles. The problem may be on the client side and not in the vector tile data. What is your client and how did you create the basemap and overlay layers?

-Jukka Rahkonen-

James Banting wrote:

[Geoserver-users] Vector Tiles Extension and Gutter Size

Hi all,

I'm having issues with makers being cut off using the vector tiles extension - pbf to be specific. I've set the gutter size on the layer and GWC default to 100 but it doesn't seem to have any effect.

I'm using Geoserver 2.11.0 and geoserver-2.11.0-vectortiles plugin.

Any thoughts?

[cid:***@01D2DA32.C054AB40]

Cheers,
--
James Banting
James Banting
2017-05-31 16:34:28 UTC
Permalink
Looks like your right. I'm using Leaflet 1.0.3 and the vectorgrid
extension. I'll dive into their docs and see whats going on.
The code below is what i used to test.

Thanks,
James

<!DOCTYPE html>
<html>
<head>
<title>VectorGrid.Protobuf example</title>
<meta charset="utf-8" />

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<link rel="stylesheet"
href="https://unpkg.com/***@1.0.3/dist/leaflet.css" />
<script src="https://unpkg.com/***@1.0.3/dist/leaflet.js"></script>
<script src="https://unpkg.com/***@1.2.0"></script>
</head>
<body style='margin:0'>
<div id="map" style="width: 100vw; height: 100vh; background:
white"></div>

<script>

// Custom Map tiles
var DeltaGeo_base_url =
'http://geo.deltageo.ca/geoserver/gwc/service/tms/1.0.0/'
var Deltageo_workspace = 'Ponoka:'
var test_layer_name = 'test_points'
var deltageo_epsg = 900913

var mapLink = '<a href="http://www.esri.com/">Esri</a>';
var wholink = 'i-cubed, USDA, USGS, AEX, GeoEye, Getmapping,
Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community';
var ESRI =
L.tileLayer('http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}',
{
maxZoom: 22,
attribution: '&copy; '+mapLink+', '+wholink,
});

var osmUrl='Loading Image...';
var osmAttrib='Map data © <a
href="http://openstreetmap.org">OpenStreetMap</a> contributors';
var osm = L.tileLayer(osmUrl, {
maxZoom: 22,
attribution: osmAttrib,
});


var GeoserverTileOptions = {
layerURL: DeltaGeo_base_url + Deltageo_workspace +
test_layer_name +"@EPSG%3A"+ deltageo_epsg +"@pbf/{z}/{x}/{-y}.pbf",
rendererFactory: L.canvas.tile,
attribution: 'Map Data © <a
href="https://deltageo.ca">DeltaGeo</a>',
vectorTileLayerStyles: {
'test_points' : { icon: new L.Icon.Default() },
},
tiled:true
};

var GeoserverLayer =
L.vectorGrid.protobuf(GeoserverTileOptions.layerURL, GeoserverTileOptions)

var MapboxTileOptions = {
layerURL:
'https://api.tiles.mapbox.com/v4/deltageo.cj3d55wie004s2xphdsf52gin-4o472/{z}/{x}/{y}.vector.pbf?access_token=pk.eyJ1IjoiZGVsdGFnZW8iLCJhIjoiY2l6aWtpbzEzMDJ6ZTJxbGJpcHQ1Nm5zbSJ9.u4o-xpWMuno33f1Jzgi0Nw',
rendererFactory: L.canvas.tile,
attribution: 'Map Data © <a
href="https://mapbox.com">Mapbox</a>',
vectorTileLayerStyles: {
'test_data' : { icon: new L.Icon.Default() },
},
};

var MapboxLayer =
L.vectorGrid.protobuf(MapboxTileOptions.layerURL, MapboxTileOptions)

var map = L.map('map', {
center: [52.7,-113.990],
zoom: 10,
layers: [ESRI]
});

L.control.layers(
{
"ESRI Satellite": ESRI,
'OSM': osm,
},
{
"Geoserver Vector Tiles": GeoserverLayer,
"Mapbox Vector Tiles": MapboxLayer,
},
{collapsed: false}
).addTo(map)

</script>
</body>
</html>
Post by Rahkonen Jukka (MML)
Hi,
Your image looks like the symbols which present the vector data are
painted over by satellite image raster tiles. The problem may be on
the client side and not in the vector tile data. What is your client
and how did you create the basemap and overlay layers?
-Jukka Rahkonen-
[Geoserver-users] Vector Tiles Extension and Gutter Size
Hi all,
I'm having issues with makers being cut off using the vector tiles
extension - pbf to be specific. I've set the gutter size on the layer
and GWC default to 100 but it doesn't seem to have any effect.
I'm using Geoserver 2.11.0 and geoserver-2.11.0-vectortiles plugin.
Any thoughts?
Cheers,
--
*James Banting*
Dave Blasby
2017-05-31 19:43:44 UTC
Permalink
Hi,

The VT code has a fixed-sized gutter. You can control it in the code - its
fairly easy to change for a quick test.

I'm not sure how it will work in your case; it looks like the library is
aggressively clipping at the tile boundaries (which is likely what it
should be doing). I expect you'll find 2 independent markers for each side
of the tile - think there are a few examples in your original picture.

Dave
Post by James Banting
Looks like your right. I'm using Leaflet 1.0.3 and the vectorgrid
extension. I'll dive into their docs and see whats going on.
The code below is what i used to test.
Thanks,
James
<!DOCTYPE html>
<html>
<head>
<title>VectorGrid.Protobuf example</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://unpkg.com/
</head>
<body style='margin:0'>
white"></div>
<script>
// Custom Map tiles
var DeltaGeo_base_url = 'http://geo.deltageo.ca/
geoserver/gwc/service/tms/1.0.0/'
var Deltageo_workspace = 'Ponoka:'
var test_layer_name = 'test_points'
var deltageo_epsg = 900913
var mapLink = '<a href="http://www.esri.com/"
<http://www.esri.com/>>Esri</a>';
var wholink = 'i-cubed, USDA, USGS, AEX, GeoEye, Getmapping,
Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community';
var ESRI = L.tileLayer('http://server.
arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}',
{
maxZoom: 22,
attribution: '&copy; '+mapLink+', '+wholink,
});
var osmUrl='http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png
<Loading Image...>';
var osmAttrib='Map data © <a href="http://openstreetmap.org"
<http://openstreetmap.org>>OpenStreetMap</a> contributors';
var osm = L.tileLayer(osmUrl, {
maxZoom: 22,
attribution: osmAttrib,
});
var GeoserverTileOptions = {
layerURL: DeltaGeo_base_url + Deltageo_workspace +
rendererFactory: L.canvas.tile,
attribution: 'Map Data © <a href="https://deltageo.ca"
<https://deltageo.ca>>DeltaGeo</a>',
vectorTileLayerStyles: {
'test_points' : { icon: new L.Icon.Default() },
},
tiled:true
};
var GeoserverLayer = L.vectorGrid.protobuf(GeoserverTileOptions.layerURL,
GeoserverTileOptions)
var MapboxTileOptions = {
layerURL: 'https://api.tiles.mapbox.com/v4/deltageo.
cj3d55wie004s2xphdsf52gin-4o472/{z}/{x}/{y}.vector.pbf?access_token=pk.
eyJ1IjoiZGVsdGFnZW8iLCJhIjoiY2l6aWtpbzEzMDJ6ZTJxbGJpcHQ1Nm5z
bSJ9.u4o-xpWMuno33f1Jzgi0Nw',
rendererFactory: L.canvas.tile,
attribution: 'Map Data © <a href="https://mapbox.com"
<https://mapbox.com>>Mapbox</a>',
vectorTileLayerStyles: {
'test_data' : { icon: new L.Icon.Default() },
},
};
var MapboxLayer = L.vectorGrid.protobuf(MapboxTileOptions.layerURL,
MapboxTileOptions)
var map = L.map('map', {
center: [52.7,-113.990],
zoom: 10,
layers: [ESRI]
});
L.control.layers(
{
"ESRI Satellite": ESRI,
'OSM': osm,
},
{
"Geoserver Vector Tiles": GeoserverLayer,
"Mapbox Vector Tiles": MapboxLayer,
},
{collapsed: false}
).addTo(map)
</script>
</body>
</html>
Hi,
Your image looks like the symbols which present the vector data are
painted over by satellite image raster tiles. The problem may be on the
client side and not in the vector tile data. What is your client and how
did you create the basemap and overlay layers?
-Jukka Rahkonen-
[Geoserver-users] Vector Tiles Extension and Gutter Size
Hi all,
I'm having issues with makers being cut off using the vector tiles
extension - pbf to be specific. I've set the gutter size on the layer and
GWC default to 100 but it doesn't seem to have any effect.
I'm using Geoserver 2.11.0 and geoserver-2.11.0-vectortiles plugin.
Any thoughts?
Cheers,
--
*James Banting*
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Kevin Smith
2017-06-05 17:28:37 UTC
Permalink
Post by Dave Blasby
Hi,
The VT code has a fixed-sized gutter. You can control it in the code
- its fairly easy to change for a quick test.
I'm not sure how it will work in your case; it looks like the library
is aggressively clipping at the tile boundaries (which is likely what
it should be doing). I expect you'll find 2 independent markers for
each side of the tile - think there are a few examples in your
original picture.
The gutter currently being used is only for clipping, not for looking up
geometries. I'm currently looking into making it work more like the
gutter/buffer for raster tiles so it will find features outside the
render area if the style looks like it would give them a big enough
symbol, or based on the buffer parameter.
--
Kevin Michael Smith
<***@draconic.ca>
Loading...