Hi Adam,
You should be able to handle this by using the “clip” parameter for the
VecTiles provider (see here:
http://tilestache.org/doc/TileStache.Goodies.VecTiles.server.html
<http://tilestache.org/doc/TileStache.Goodies.VecTiles.server.html>).
Here’s a quick example using the “rivers.json” file, note the “clip” parameter
included in the provider definition:
{
"type": "vector",
"layers": [{
"id": "rivers",
"type": "line",
"source": "rivers",
"source-layer": "rivers",
"layout": {
"visibility": "visible"
},
"paint": {
"line-width": 2,
"line-color": "rgb(37, 58, 241)"
}
}],
"config": {
"provider": {
"class": "TileStache.Goodies.VecTiles:Provider",
"kwargs": {
"dbinfo": {
"host": "localhost",
"user": "postgres",
"password": "postgis",
"database": "arches",
"port": "5432"
},
"simplify": 0.5,
“clip": false,
"queries": [
"select gid as __id__, name,
st_asgeojson(geom) as geojson, st_transform(geom, 900913) as __geometry__ from
rivers"
]
}
},
"allowed origin": "*",
"compress": true,
"write cache": false
}
}
You should note: in some cases (depending on the resolution and size of your
geometries) turning off clipping may impact performance as the entire geometry
will be included in your tiles. I think that turning clipping off is really
only useful for layers where you need a polygon outline style. I would imagine
that in most cases the performance impact of this can be mitigated by tuning
your simplification and cache parameters.
- Rob
> On Jan 29, 2018, at 9:46 AM, Adam Cox <[email protected]> wrote:
>
> While trying to add a new tileserver layer to my Arches 4.0.1 installation, I
> came across a rendering issue that I'm wondering if anyone else has dealt
> with. My layer is a postgis table of polygons, and in QGIS it shows up just
> fine (these are boundaries of multi-county regions in Florida). However, when
> I make a tileserver layer in Arches from it, I get the following result,
> which has an extra perpendicular grid that is non-existent in the dataset.
>
>
> <https://lh3.googleusercontent.com/-lrfenYtfbMs/Wm9cUm_glfI/AAAAAAAAB0A/FXMvWrQ54p8TlyR2Xv7DgeOpJDPTe1gqQCLcBGAs/s1600/tileserver%2Bissue.png>
> From the way this grid shows up (variably at different zoom levels, etc.), I
> can tell it's an outline of the actual tiles themselves. Does anyone know how
> to fix this? In the Arches Map Layer manager, I have the following for the
> Service Styling:
>
> [
> {
> "layout": {
> "visibility": "visible"
> },
> "paint": {
> "fill-color": "#343434"
> },
> "source": "FPAN Regions",
> "source-layer": "FPAN Regions",
> "type": "fill",
> "id": "fpan_region"
> },
> {
> "layout": {
> "visibility": "visible"
> },
> "paint": {
> "line-color": "#ee0000",
> "line-width": 2
> },
> "source": "FPAN Regions",
> "source-layer": "FPAN Regions",
> "type": "line",
> "id": "fpan_region-outline"
> }
> ]
>
> Thanks!
> Adam
>
> --
> -- To post, send email to [email protected]. To unsubscribe,
> send email to [email protected]. For more
> information, visit https://groups.google.com/d/forum/archesproject?hl=en
> <https://groups.google.com/d/forum/archesproject?hl=en>
> ---
> You received this message because you are subscribed to the Google Groups
> "Arches Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected]
> <mailto:[email protected]>.
> For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>.
--
-- To post, send email to [email protected]. To unsubscribe, send
email to [email protected]. For more information,
visit https://groups.google.com/d/forum/archesproject?hl=en
---
You received this message because you are subscribed to the Google Groups
"Arches Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.