-
Notifications
You must be signed in to change notification settings - Fork 91
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
New MvtTileDecoder to allow parsing mvt pbf tiles #481
Conversation
BTW I also received an issue when running:
|
BTW: An alternative library to use could be this one. I haven't compared them in detail, this library hasn't been updated since mid 2016, but has more stars. Both libraries are under Apache2 and use JTS at its core. |
I did some more digging regarding the Polygon issue and saw that the reason is probably in the used library and create an issue. |
Thanks to @ShibaBandit I was able to resolve the Polygon issue, the maps look perfect (or at least similar to our current geojson endpoint) now from what I can see. Performance feels good, didn't run any detailed performance comparisons. |
I guess a good next step would be to move the new code into it's own package to avoid additional dependencies in the core? |
Thanks, will check it! It's nice that there are still people willing to share work with the community. 🙂 |
Definitely, |
Sure, please feel free to go ahead :) |
That could be due to many |
}; | ||
File f = new File("vtm-tests/resources/mvt-test.pbf"); | ||
System.out.println(f.getAbsolutePath()); | ||
decoder.decode(tile, sink, new FileInputStream(f)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For Gradle build also to pass, better use here:
decoder.decode(tile, sink, getClass().getResourceAsStream("/mvt-test.pbf"));
I'll include it in merge.
Thanks for the very nice work! I introduced |
This PR adds a new MvtTileDecoder, using this nice project. The above mentioned project apparantly does not work with older Android version, that's why I used a fork (which will be hopefully merged soon) that supports older Android versions as well (the issue is that the project used some JDK8 methods, see here). I tried the new decoder with Mapzen and OMT, both basically work.
There is an issue with decoding Polygons. Probably I made a mistake when creating the new decoder or maybe the MvtReader does something odd? Maybe someone can have a look? I think there might be something messed up with holes and the outer shell, but I don't know what.
Screenshots from OMT:
![omt-pbf-munich](https://user-images.githubusercontent.com/1553525/34852023-c7aedcbe-f780-11e7-8ba5-4d5fb4f19361.png)
![omt-pbf-central-europe](https://user-images.githubusercontent.com/1553525/34852024-c7eb0a7c-f780-11e7-87ba-3172e318653c.png)
![omt-pbf-world](https://user-images.githubusercontent.com/1553525/34852025-c827019e-f780-11e7-807d-7b066d44fd30.png)
Screenshots from Mapzen:
![mapzen-pbf-munich](https://user-images.githubusercontent.com/1553525/34852030-cebc2dd6-f780-11e7-952d-7dc85f27e73e.png)
![mapzen-pbf-central-europe](https://user-images.githubusercontent.com/1553525/34852032-d029b846-f780-11e7-8479-ee7f4fd57561.png)
![mapzen-pbf-world](https://user-images.githubusercontent.com/1553525/34852033-d0d3bc74-f780-11e7-8400-4db65b002f6d.png)