[mapserver-dev] Vector Tile Production...

thomas bonfort thomas.bonfort at gmail.com
Mon Sep 14 05:10:27 PDT 2015


Hi all,

I have  a mostly functional and fully untested (on the client side)
branch that implements vector tile rendering for mapserver:
https://github.com/tbonfort/mapserver/tree/vector-tiles . It relies on
mapserver's WFS implementation, so we'll need to also adapt mapcache
to handle these WFS queries in order to present  x/y/z style URLS so
it becomes actually usable.

Given that we're using WFS, we actually don't care about projections,
you can request a vector tile for any extent/projection combo,
although that isn't going to be supported by any client (yet?). I did
have to fiddle around with handling scale computations as there's no
concept of scale in traditional getfeature queries
(https://github.com/tbonfort/mapserver/commit/50c3a44ddd3c182ca0e1a16a6e5a1c5c20675768)
=> Steve or Even could you have a glance?

I could use some help with testing this out, especially on the client
side. Here's how you can get a tile:

* add an outputformat:
OUTPUTFOMAT
  NAME "mvt"
  DRIVER "mvt"
END

* add the name of the outputformat to wfs_getfeature_formatlist
metadata entry of the layers that are allowed to be returned as vector
tiles
METADATA
  "wfs_featureid"     "UNIQUE_KEY"
    "wfs_getfeature_formatlist" "mvt"
    "gml_include_items" "NAME,UNIQUE_KEY,CAPITAL,POP_RANGE"
    "gml_POP_RANGE_alias" "POP_CLASS"
END
(you can use traditional WFS keys to filter attributes, remap
attribute names,  etc...)

* run with map=/path/to/vector_tiles.map&map.size=256+256&SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=popplace,road&OUTPUTFORMAT=mvt&srsName=epsg:3857&bbox=-20000000,-20000000,20000000,20000000,epsg:3857"

Best regards,
Thomas


On 8 September 2015 at 22:48, Basques, Bob (CI-StPaul)
<bob.basques at ci.stpaul.mn.us> wrote:
> All,
>
> I can come out on the vote for projection support right now.  As I think
> about it, it seems like it might be more work to NOT include projections, at
> least based on the MapServer template outputting.
>
> I would also suspect that this type of feature description would quickly
> start a conversation about 3D (or 2.5D at the very least) types of
> constructs.
>
> bobb
>
>
> On Sep 8, 2015, at 3:20 PM, Rahkonen Jukka (MML)
> <jukka.rahkonen at maanmittauslaitos.fi> wrote:
>
> Hi,
>
> There is a blog post from Stefan Henneberger
> http://www.salzburgresearch.at/blog/geoserver-rendering-binary-vector-tiles/
> that gives some background.
> If the aim is simply to serve vectors in web Mercator to be rendered on the
> client side then probably the MVT way would be fine. Perhaps with some
> modified GetStyles request that would return styles as Style JSON could be a
> good pair with it or what do you think?
>
> I can imagine that very soon there will be a wish to use vector tiles for
> data transfer instead of WFS. It may introduce demands for having support
> for projections, more geometry types, schema,  and need to decide what to do
> with features which are crossing tile boundaries and other complicated
> things like how to download only tiles which are changed since last access.
> A common OSGeo specification could be nice to have at that stage, I do not
> believe that such things bother MapBox so much.
>
>
> -Jukka Rahkonen-
>
>
>
> Lime, Steve D wrote:
>
> The fact ESRI is following the MapBox spec instead of creating their own
> lends a great deal of credibility to the MapBox work. I’ve not run across
> any competing specs – has anyone else? I would assume both OL3 and Leaflet
> would be target client environments. --Steve
>
> From: Tamas Szekeres [mailto:szekerest at gmail.com]
> Sent: Tuesday, September 08, 2015 1:54 PM
> To: Lime, Steve D (MNIT) <Steve.Lime at state.mn.us>
> Cc: thomas bonfort <thomas.bonfort at gmail.com>; mapserver-dev at lists.osgeo.org
> Subject: Re: [mapserver-dev] Vector Tile Production...
>
> Do we already have a standard to follow when implementing this? As far as I
> know ESRI followed the mapbox vector tile specbut that is bound to a
> specific company. What would be the client side application we are targeting
> to consume the vector tiles?
>
> Best regards,
>
> Tamas
>
>
> 2015-09-08 18:27 GMT+02:00 Lime, Steve D (MNIT) <Steve.Lime at state.mn.us>:
>
> Should we start work on an RFC then? I can get a skeletal one in place but
> this enhancement should encompass both MapServer and MapCache at the same
> time IMHO...
>
> Steve
>
> -----Original Message-----
> From: thomas bonfort [mailto:thomas.bonfort at gmail.com]
> Sent: Monday, September 07, 2015 12:51 PM
> To: Lime, Steve D (MNIT) <Steve.Lime at state.mn.us>
> Cc: mapserver-dev at lists.osgeo.org
> Subject: Re: [mapserver-dev] Vector Tile Production...
>
> That's definitely something we should be looking into I'd say.
>
> --
> thomas
>
> On 27 July 2015 at 20:45, Lime, Steve D (MNIT) <Steve.Lime at state.mn.us>
> wrote:
>> With 7.0 out the door I’m wondering if makes sense to look forward at all
>> to
>> being able to produce vector tiles with the MapServer/MapCache stack. It’s
>> been a hot topic with our GIS staff with ESRI announcing some preview
>> capabilities with vector tiles tied to the MapBox spec. --Steve
>>
>>
>> _______________________________________________
>> mapserver-dev mailing list
>> mapserver-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-dev
> _______________________________________________
> mapserver-dev mailing list
> mapserver-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-dev
>
>
> _______________________________________________
> mapserver-dev mailing list
> mapserver-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-dev
>
>
>
> _______________________________________________
> mapserver-dev mailing list
> mapserver-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-dev


More information about the mapserver-dev mailing list