Gabriel,
First, I'm excited see vector tile output for GeoServer, so +1 for that!
From an incredibly quick read through, I have one high-level question.
Is the topology processing which is part of this diff something which
may find a better, more general home or is it specific to GeoJSON vector
tiles? I suppose I get curious when I see Point, Linestring, etc.
classes needing to be written.
Thanks,
Jim
On 06/19/2015 01:41 PM, Gabriel Roldan wrote:
Hello all,
at Boundless we're working on GeoServer/GWC support for Vector Tiles,
hence I'm looking for approval to add a new community module to master
in the interest of making the work available for everyone.
TL;DR version:
We'll be producing "vector maps" in TopoJSON, GeoJSON, and Mapbox PBF
formats through the WMS, so that these "vector maps" can be produced
for any map dimensions / CRS combination, leaving the slicing into
specific grids to GWC, or the client apps requesting the map tiles to
the WMS directly where they're dynamically generated.
The WMS map output format(s) will allow a certain level of control
over geometry simplification either through the dpi wms argument or
other custom parameter, yet to be determined, and over the number of
returned features by respecting the layer's SLD
min/maxScaleDenominator + filter rules.
Work is being conducted on this branch
<https://github.com/groldan/geoserver/tree/vectortiles>
At a glance:
<https://github.com/groldan/geoserver/compare/master...vectortiles>
Full story:
There are different formats in which vector tiles can be encoded, none
of which is an industry or de-facto standard:
Mapbox Vector Tiles
<https://github.com/mapbox/vector-tile-spec/tree/master/1.0.1>:
Protocol Buffers based. No support for it in OL3.
TopoJSON
<https://github.com/mbostock/topojson-specification/blob/master/README.md>:
JSON arc-poly topology, points encoded inline. There's a large OSM
dataset in this format and OL3 has support for it
<http://openlayers.org/en/v3.5.0/examples/tile-vector.html>
GeoJSON <http://geojson.org/geojson-spec.html>: the good and old
GeoJSON format can also be used as vector tiles. OL3 can be set up to
use it as easily as it does with TopoJSON.
Now, each format has its pros and cons. The common denominator though,
is that all of them can fulfill the requirement of producing geometry
generalized versions of raw feature data plus alphanumeric attribtues.
The geometry generalization is key in order to control the resulting
tile file size, and the resource consumption on the map client.
On top of that, we want to add other requirements:
* Dynamically generate vector tiles: can do with GeoServer WMS,
regardless of map/screen dimensions and requested projection.
* Control over level of geometry generalization: can do with
GeoServer's WMS standard DPI parameter, or other format specific
parameters
* Control on number of features produced by zoom level: can do with
SLD FeatureTypeStyle Rules and min/maxScaleDenominators
* Leverage the current software stack and existing infrastructure as
much as possible: Let GWC request and cache vector tiles in the
appropriate tile size/resolution and projection. Leverage OL3's
flexibility to load tiles from TMS, WMS, WMS-C, etc.
Vector Tile Format break down:
++++++++++++++++++++++++
MapBox Vector Tiles
---------------------------
Pros: compresses a bit better than the JSON text based formats with
gzip compression.
Cons: non human readable. Lack of support in OL3 so far. Limited
control over resolution. Tied to Web Mercator projection by MapBox's
spec, but we intend to overcome that silly limitation
TopoJSON:
----------------
Pros: human readable. Allows to share common edges between adjacent
geometries.
Cons: The edge sharing is easy to implement from raw OSM data which in
itself is a topology. For non topology based data, figuring out the
common edges is a slow and resource consuming process. The format can
be written with duplicated arcs but kind of defeats its purpose. Yet
for the time being we're producing it without the extra complexity
that computing common edges implies. Another con is that it can't be
produced in a streaming way, since the topology needs to be built in
memory before encoding.
GeoJSON:
--------------
Pros: human readable. Streaming.
Cons: _may_ compress a bit worse than TopoJSON. Yet to be determined.
It should compress worse than TopoJSON when the later is encoded with
shared edges.
OL3:
------
* It'd be good if OL could reuse vector tiles of higher resolutions in
lower resolution zoom levels. (already possible with custom grids)
* It'd be good if OL could merge the geometries for the same features
coming from different tiles, as they may be clipped to tile bounds.
* OL support for MapBox tiles is not yet there, nor part of this
effort, but it'll be there at some point
--
Gabriel Roldán
Software Developer | Boundless <http://boundlessgeo.com/>
grol...@boundlessgeo.com <mailto:grol...@boundlessgeo.com>
@boundlessgeo <http://twitter.com/boundlessgeo/>
------------------------------------------------------------------------------
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel
------------------------------------------------------------------------------
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel