code: def getAsWkt(self, session):
          
          statement = """
                      SELECT ST_AsText({0}) AS wkt
                      FROM {1}
                      WHERE id={2};
                      """.format(self.geometryColumnName,
                                 self.tableName,
                                 self.id)
  
          result = session.execute(statement)
  
          for row in result:
              return row.wkt
docs: Retrieve the geometry in Well Known Text format.
  
          This method is a veneer for an SQL query that calls the ``ST_AsText()`` function on the geometry column.
  
          Args:
              session (:mod:`sqlalchemy.orm.session.Session`): SQLAlchemy session object bound to PostGIS enabled database.
  
          Returns:
              str: Well Known Text string representation of geometry.