Open brnkhy opened 7 years ago
First of all, I thought we were using clipper for 16+ levels. It seems like it's working at 16 as well?
No, usage of clipper is based on the buffer
parameter passed to eg GetFeature()
or ToGeoJson()
.
Passing any not-null
value triggers clipper.
We currently pass 0
.
Do we need it at 16- levels?
Yes, with the current implementation of the mapbox-unity-sdk
(no feature filtering or feature de-duping across tile borders) it is needed to prevent duplicates features.
All vector tiles z0 -> zMax
contain data that extends beyond the actual tile borders.
You could speed things up a bit (10-30% depending on the data of the vt) by passing validate = false
here or here.
With validate = false
some extensive checks if the tile itself and its data is valid are skipped.
@BergWerkGIS is mapbox data always valid?
@brnkhy
is mapbox data always valid?
😄 yes it should always be valid.
I've enabled the validate
flag as default mainly for data from other sources that users known what's going and don't think the this library is faulty.
@BergWerkGIS ah I see, it's good to know though as it's small but yet another point of perf improvement when someone asks. I know these are quite small compared to mesh gen performance issues but still it's good to keep track ;)
I was testing my own changes&performance and decided to share this as well.
This frame took 981ms GetFeature takes 153 of that. Few things to note;
I'll post if I can find anything else!
cc @BergWerkGIS