make-surface icon indicating copy to clipboard operation
make-surface copied to clipboard

Integer values for attributes

Open dnomadb opened this issue 10 years ago • 0 comments

Using integers for most output attributes might reduce vector tile file size in a number of ways. First off, an integer in and of itself is stored more efficiently than other, higher precision formats. Secondly, @yhahn indicated in conversation that if attributes are repeated across features within a vt, that value is effectively only stored once.

I see two ways to handle this:

  1. Always force integers. Downside of this is attributes with actual higher precisions (eg a field that ranges from -1 to 1, as do many pixel indices). Of course, this could be handled by the user scaling these values before encoding, but.
  2. Build into the variable --> band mapping. Right now, to specifically map a band, we pass an option like so: -b <var name> <band no> We could easily make this into: -b <var name> <band no> <precision>

cc @ian29 @MateoV

dnomadb avatar Jan 30 '15 22:01 dnomadb