def to_proj4(self, as_dict=False, toplevel=True):
<EOL>if toplevel:<EOL><INDENT>string = "<STR_LIT>" % (self.datum.to_proj4(), self.prime_mer.to_proj4())<EOL><DEDENT>else:<EOL><INDENT>string = "<STR_LIT>" % (self.datum.to_proj4(), self.prime_mer.to_proj4())<EOL><DEDENT>if as_dict:<EOL><INDENT>return dict([<EOL>entry.lstrip('<STR_LIT:+>').split('<STR_LIT:=>')<EOL>for entry in string.split()<EOL>if entry != "<STR_LIT>"<EOL>])<EOL><DEDENT>else:<EOL><INDENT>return string<EOL><DEDENT>
Returns the CS as a proj4 formatted string or dict.

Arguments:

- **as_dict** (optional): If True, returns the proj4 string as a dict (defaults to False).
- **toplevel** (optional): If True, treats this CS as the final toplevel CS and adds the necessary proj4 elements (defaults to True).