bradfitz / latlong

The latlong package maps from a latitude and longitude to a timezone.
Apache License 2.0
384 stars 41 forks source link

Upgrade the code #3

Closed ksimka closed 7 years ago

ksimka commented 8 years ago

I tried to update db with latest tzworld using make and failed several times :)

First of all, "code.google.com/p/freetype-go/freetype/raster" was moved to github and now it's "github.com/golang/freetype/raster". And more than that: they changed some type names. But that's ok, I did it.

The worst thing - it didn't work as expected after that. I rendered image, and it was whole blue, z_gen_tables.go was nearly empty. Then I spent many hours trying to understand wtf. Finally, success: it was broken MonochromePainter - golang/freetype#22 . But till it's not merged I created fixed tmp implementation of MonochromePainter (mono_painter_tmp.go) that must be removed after that PR will be merged.

So, finally, it works now, and I added generated z_gen_tables for 2015g db.

But it's not the end of story. Now when I generate z_gen_tables I get tests not passed sometimes (rarely but still). And even if I generation was OK, I get image that slightly differs from your example (G+ post). Look, those big white squares (on your image they are way smaller).

regions

Any help is appreciated :) And by the way, thanks for the great library.

ksimka commented 8 years ago

Bump.

azr commented 7 years ago

Hey there ! It seems the monochrome painter pr was merged !

Does this fix needs update then ?

ksimka commented 7 years ago

@azr The whole project looks abandoned, so I don't think the fix still matters.

azr commented 7 years ago

@ksimka yup, seems like it. But I kinda need the features ! This project seems good enough to me. Do you know any similar golang project that does it otherwise ? I might as well just fork this one and maintain it also.

bradfitz commented 7 years ago

@ksimka, sorry, this fell off my radar.

Unfortunately I can't accept changes without people signing the Google CLA. Have you done https://cla.developers.google.com/ ?

ksimka commented 7 years ago

@bradfitz Yes, I signed it when https://github.com/golang/freetype/pull/22 had to be merged.

If you're going to accept this PR I need some time to make changes (since standard monochrome painter works now) and test the whole thing again.

bradfitz commented 7 years ago

Thanks. Please do, and let me know when it's ready for a look.

azr commented 7 years ago

hey @ksimka If you're busy I can rebase it for you if you want :)

ksimka commented 7 years ago

@azr Sure. I can try to do this only tomorrow at best.