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

Lessons Learned #4

Open
geowurster opened this issue Mar 9, 2016 · 3 comments
Open

Lessons Learned #4

geowurster opened this issue Mar 9, 2016 · 3 comments

Comments

@geowurster
Copy link

I was hoping someone would take vector text rendering to this level. Using the QGIS API is pretty clever.

I hope this isn't an unwanted suggestion, but one lesson I learned from gj2ascii is that adding an empty space after each character (effectively between "pixels") produces a graphic that looks less squished. Ideally this empty space would be the same character as the "pixel" to produce a more continuous graphic although I have not tried this. An area that is two characters wide and one line tall is closer to being square than an area one character wide and one line tall. The big trade off is that you can't render as much data in each rendered view because you have to cut the vertical width in half. The array2ascii() function handles this if you're interested.

If (when?) I do another pass through gj2ascii I would also use Numpy arrays wherever possible, which should be faster than the list-of-lists arrays.

@NathanW2
Copy link
Owner

NathanW2 commented Mar 9, 2016

Thanks for the advice. Much appreciated. Happy to take any and all feedback.

Here is a update using the double row idea. Thanks it looks heaps better.

image

image

I'm going to try numpy once I get a chance to learn it. Hopefully it's a easy drop in. Have never really used it before.

@geowurster
Copy link
Author

Ah yeah the double pixel thing works! I'll try to find a couple minutes sometime in the next few days to sketch out at least layer stacking with Numpy.

@NathanW2
Copy link
Owner

That would be cool. I have added some timing around the code now so I will try to get it down to as fast as I can

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