Skip to content
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

Clarification of the current status #23

Closed
lasconic opened this issue Jan 21, 2025 · 3 comments
Closed

Clarification of the current status #23

lasconic opened this issue Jan 21, 2025 · 3 comments

Comments

@lasconic
Copy link

lasconic commented Jan 21, 2025

Hi,

I'm trying to use this project to generate vector tiles from microjson. I'm not sure I understand the current status of the project.
Pypi has a version 0.4.1 and link to this repository. This repository doesn't have the version 0.4.1 but https://github.com/bengtl/microjson does. Maybe, the PR #21 needs to be merged.

Then, I'm trying to generate tiles, but I can't get access to the TileHandler from outside of the module. It probably needs to be imported in init.py. I will work from the source in the meantime but it would be convenient if the module on pypi could be used to convert microjson to VT/PVB.

@bengtl
Copy link
Member

bengtl commented Jan 21, 2025

Hi,
you are correct, the Pypi version is reflecting the unmerged branch "tileborder" from the fork, it will be merged soon, our apologies for the delay. :)
The TileHandler class is the abstract class, you should use the concrete TileWriter class, please see the example:
https://github.com/bengtl/microjson/blob/tilingborder/src/microjson/examples/tiling.py
Please let me know if you have further issues, or if you have any additional feedback, it is much appreciated!

@lasconic
Copy link
Author

Thank you for your quick answer and for all your work on this project!

OK. I understand better the state of the project. I will try to work with the pypi version and let you know. I hope I can use the tiles with deck.gl.

@bengtl bengtl closed this as completed Jan 22, 2025
@lasconic
Copy link
Author

I might not understand something but I still can't see how to use the pypi package to create tiles. TileWriter looks good but it's not available since it's nit imported in https://github.com/bengtl/microjson/blob/tilingborder/src/microjson/__init__.py

Sorry to abuse this thread, let me know if you prefer several issues or another communication channel.
I manage to run the example from within the source code with a handcrafted microjson file. I included a big rectangle and a small rectangle and I generated json tiles. At lower zoom, the small rectangle becomes 0 but it still included in the tile. Is that expected ? In my use case, I have a few dozens "big" rectangles but millions of smaller ones. The tiles at lower zoom would contain a lot of unused data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants