[Proj] quoting +nadgrids ?

Glynn Clements glynn at gclements.plus.com
Sun Aug 1 10:30:22 EST 2010

Frank Warmerdam wrote:

> Based on this, I'm starting to think that the PROJ.4
> parameter parser just ought to have a special escape
> sequence for embedding a space.  Ideally something not
> likely to "activate" other escape sequence parsers.
> Something like:
> +nadgrids=C:\Program@@@space@@@Files\GRASS...
> If you would like me to incorporate such a change, let me know
> via a proj.4 ticket and I'll proceed.

Personally, I'm not inclined to suggest that PROJ should be
introducing this sort of workaround for issues with software which
uses it.

However, if you decide to go that route, URL encoding (%##, e.g. %20
for space) serves roughly this purpose (although the use of '+' for
space wouldn't be desirable here). This assumes that % is uncommon in
PROJ parameter values.

Another option would be to provide utility functions to convert
between an argument list (i.e. a list of strings) and a string. This
would make it easier for GDAL (etc) to "do it right".

The two options aren't mutually exclusive, although the latter would
eliminate the need to perform encoding/decoding of arguments when
invoking proj or cs2cs directly.

Glynn Clements <glynn at gclements.plus.com>

More information about the Proj mailing list