ascii_qgis icon indicating copy to clipboard operation
ascii_qgis copied to clipboard

Lessons Learned

Open geowurster opened this issue 9 years ago • 3 comments
trafficstars

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.

geowurster avatar Mar 09 '16 16:03 geowurster

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.

NathanW2 avatar Mar 09 '16 22:03 NathanW2

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.

geowurster avatar Mar 10 '16 15:03 geowurster

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

NathanW2 avatar Mar 11 '16 01:03 NathanW2