OGR WRAP character
Julien-Samuel Lacroix
jlacroix at DMSOLUTIONS.CA
Thu Jul 7 15:43:09 EDT 2005
Hi All,
I guess this is more for Frank, but it can interest other people.
MapInfo files have a way to indicate that there's a new line in labels.
They stock the character 10 internally (a \n) for the TAB format.
Normally in a MapServer mapfile we would put WRAP " " in our LABEL
definition t have multiple lines. However, OGR (read: the MITAB driver)
convert all '\n' into a '\' and a 'n' and all '\' into '\\'. This is to
get a readable StyleString I guess. Also, the spec of the MapInfo MIF
format says that it stores the new line character as a '\' and a 'n'
(two characters).
This cause a problem in the MapServer context where the WRAP keyword
takes only one character. With any MapInfo files, the multiline text
can't be multiline because of this \n issue.
My questions:
Does other OGR drivers have this kind of problem? Or is MITAB a special
case?
Is there a unified way to return the end of line in strings? Or should
be there one unified way?
In any case, the MIF file format two characters is still an issue, but
maybe it's not used enough to worth any change...
Possible solutions:
- Modify MapServer to get all the '\'+'n' characters that comes from OGR
strings converted into "\n" (LF). Via the PROCESSING keyword maybe.
- Modify The WRAP keyword to accept string. This will enable any strings
to be wrapped on multiple characters. Anyone beside me is interested in
this?
- Modify MITAB to return "\n" in it's StyleString. But I don't know how
much impact it can have on the library and it does not fix the MIF file
issue.
- Others
Any thought?
Thanks
Julien
--
------------------------------------------------------------
Julien-Samuel Lacroix jlacroix at dmsolutions.ca
DM Solutions Group http://www.dmsolutions.ca/
------------------------------------------------------------
More information about the mapserver-dev
mailing list