Skip to main content

The Mapbox vector tiles (MVT) writer has parameters for minzoom and maxzoom.

Is it possible to make the writer read these parameters from an attribute in incoming features? In addition to z0 - z22 , you can also select "Source" in the writer parameters, but there is no documentation on what "Source" means.

Hi @mbu​ ,

Generally speaking here, in most cases, parameter values can be set using attribute values when you use a FeatureWriter instead of a traditional writer. The FeatureWriter is simply the transformer version of a writer and in most cases, when you look at the parameters, you'll have the option to set parameter values using attribute values. Although this is not true with every parameter it applies to most.

 

One thing to keep in mind with this, since tile levels are using coded values (i.e. 0 - The Earth, 12 - Roads) you'll likely need to get the value named as it is specified in the parameters. Not too familiar with the MVT format but worth a shot 🙂


Sorry for reviving my own question, but I haven't had a chance to test this for a while.

 

I tried creating attributes mvt_min_zoom and mvt_max_zoom on features entering the MVT FeatureWriter. I tried setting the values as strings ("0 - The Earth") in addition to integers, but the writer refuses to accept them, and just uses default values.

 

It really does seem like "Source" should allow min/maxzoom from an attribute, but can anyone at Safe explain what it actually does?


Same question here. I've even opened a case, because there is no info about the "Source" option in the documentation.

 

C689163


Reply