Easier
2008-08-21T16:53:24Z | Comments: 0
Mateusz's post about marshaling geometries from hex-encoded WKB strings in C++ reminds me how easy this is in Python using built-in string methods and Shapely:
>>> from shapely.wkb import loads >>> g = loads('01010000005839B4C876BEF33F83C0CAA145B61640'.decode('hex')) >>> g.wkt 'POINT (1.2340000000000000 5.6779999999999999)'
My only regret about switching to dynamic languages for (almost) all my development is that I didn't go straight to Python. Last weekend I ran into a former co-worker at the Fort Collins downtown street festival and was reminded about the enormous Perl legacy I left behind at that shop.
