psql -tA -F $'\t'  'host=um-pg01e.maps.yandex.ru port=5432 user=mapspro password=****' \
-c "SELECT object_revision.object_id, \
ST_AsText(ST_Transform(geometry.contents, 4326)), \
attributes.contents->'transport_stop:bus_route', \
attributes.contents->'transport_stop:trolley_route', \
attributes.contents->'transport_stop:tram_route', \
attributes.contents->'transport_stop:taxi_route' \
FROM revision.geometry, revision.commit, revision.object_revision, revision.attributes \
WHERE attributes_id=attributes.id \
AND commit_id=commit.id \
AND attributes.contents?'cat:transport_stop' \
AND next_commit_id=0 \
AND deleted=false \
AND geometry_id=geometry.id \
AND (attributes.contents?'transport_stop:tram_route'
    OR attributes.contents?'transport_stop:trolley_route' \
    OR attributes.contents?'transport_stop:bus_route'
    OR attributes.contents?'transport_stop:taxi_route');" \
>stops.txt
