-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement 'scale' for geometries #30
Comments
@brnkhy @david-rhodes I hacked together a quick working fix: https://github.com/mapbox/vector-tile-cs/tree/BergWerkGIS-implement-scale All LatLng/GeoJson related stuff is commented - would need more work. Request a feature like this: var feat = layer.GetFeature<float>(idxFeat, 0, 1.75f);
^ ^ scale factor
| clip hard at border and then
Is this what you need? |
@BergWerkGIS if you can check the vector2d branch, I'm doing that scaling in VectorFeatureUnity constructor as well. Now doing it in GetFeature would be even better but if it returns I also have another question you might know. Yesterday I realized that traffic vector tile coordinates work different and not in 0-4096 range. They are probably not relative to the tile and scaling them simply doesn't work (converting to wsg84 does though). Do you know about that issue? I asked in traffic channel but haven't got any answer yet. Edit: I just realized ector3 means UnityEngine dependency, we can return Vector2d but that won't change the issue either. So maybe it's just a good idea to do that scaling in unity side? I mean in the sdk of course, we can have an overload to provide that functionality but not use in SDK |
I suppose
Have you looked at |
Ah ok now this makes sense. I totally didn't know that exists but it'll probably solve the issue right away. Thanks @BergWerkGIS, will edit this if it works out. Edit: Yep! Worked out beautifully, thanks Willy! |
Splitting into a dedicated issue from #18 (comment)
/cc @david-rhodes @brnkhy
Thought this would be quick and started here: BergWerkGIS-implement-scale
But it's not and needs more work.
Friction:
long
)scale
triggersPoint2d
to be made generic (<T>
): beinglong
currently but by applying scale we most likely would want to get backfloat
ordouble
.T/float/double
for geometries conflicts with the clipping (needslong
).Clipping was always intended to be a temporary solution only, to be removed again after we have feature merging/deduping in place, but I don't expect that any time soon so we have to keep clipping a while longer.
Ideas:
Point2dLong
andPoint2dFloat
Point2d<T>
I have to think a bit about this ...
The text was updated successfully, but these errors were encountered: