Gene's answer pointed me in the right direction. The simple answer seems to be that the data in PostGIS is in Web Mercator (EPSG 3786) and so if I want lat/long it needs to be re-projected (or de-projected...), with an SRID like EPSG 4326.

call (["ogr2ogr", "-f", "GeoJSON", record[1] + ".json",  'PG:dbname=\'gis\'', "-sql", 'SELECT route_name,osm_id,tags::hstore-&gt;\'state\' as state,way from planet_osm_line where osm_id=%d' % record[0], "-t_srs", "EPSG: 4326"])




EDIT
Turns out you need to explicitly state the source SRS as well:

call (["ogr2ogr", "-f", "GeoJSON", record[1] + ".json",  'PG:dbname=\'gis\'', "-sql", 'SELECT ...', "-t_srs", "EPSG: 4326", "-s_srs", "EPSG:3857"])


PostGIS to GeoJSON with GDAL: how to get lat/longs?
Are there lock products out there specifically designed for easy handling when locked unlocked dozens of times a day?

I'm using a normal, chain-based lock at the moment and I'm annoyed because


I'm doing constant slight damage to the frame when removing the lock from the bicycle
I need to carry a key at all times, fumble it from my pocket when it's time to go (often in a thankless, noisy, roadside environment), and fumble the lock back onto the bicycle


Are there any solutions out there that make frequent use as painless, and still as secure, as possible? I'm thinking about something that works like a remote-controlled car door lock. It should, however, still be possible to attach the bike to an object to prevent it from getting carried away.


  Related: best bike lock

