Hi Martin, Hi all,
in Geoserver I'm in a situation where I would
like to have CRS WKT generation indented, or placed in a
single line, on a case by case basis. Unfortunately
toWKT and toString do not offer customization, and the
global Formattable indentation setting does not seem
very appealing (since this really is a case by case
problem).

Would it be possible to have a CRS method that allows
for WKT formatting, specifying indentation and wheter
the formatting should be strict?
Making Formattable.toWKT(Citation, indentation, strict) public
would do the trick, with the remaining issue that Citation
may be unknown (it seems Citations.OGC is the one used by
default thought).

At the moment I'm doing a myCrs.toString().replaceAll("[\\r\\n ]+", " 
")) but the solution is certainly fragile (it may remove
white spaces in identifiers too, shall the ids have by accident
multiple ones...). Yet, I don't want to incur in exceptions,
toString() seems the only way to get a non strict behaviour.

Cheers
Andrea

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to