Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
MVT combine: Fix value offset bug #263
Could (urg) expose some functions to read a two MVT bytea and return a combined MVT bytea. This is where having the MVT stuff ported into liblwgeom would help (I could pick up that old project and try to complete it, but it's ugly for other reasons and seems to necessarily involve extra copying. Something to talk about at the sprint.)
Anyways, as long as MVT is in ./postgis, the only testing is going to be integration testing, so maybe a _postgis_mvt_combine(bytea,bytea) is the "best" way.
I'm not a fan of making internal functions public so they can be tested but with what we have it does seem the only/best way to do it. I also abhor testing with bytea since the only thing that you are testing is that it doesn't change binary wise and to check it you (and whoever comes next) have to do it manually.
For the future, I'd like to have functions to work with MVTs (decode, combine, extract layers/features...) but it isn't an easy task and I don't know how useful they'd be apart from testing, as I don't expect people to store final MVTs in a column. Something like MVT as a geometry type.
Another option would be to have a different test framework for MVTs and use external tools to do the validation, which is basically automating what I've been doing manually. This would either force us to bring dependencies in or build the framework out.
This is certainly something that requires more thinking and that I don't expect to achieve in any case for 2.5 so I'll get this fix merged and create a trac issue so this can be considered in the future.