We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c5a1796 commit 707595dCopy full SHA for 707595d
geoscript/src/main/scala/projection/Projection.scala
@@ -45,7 +45,25 @@ package object projection {
45
}
46
47
package projection {
48
+ import org.geoscript.serialize._
49
+
50
class RichProjection(p: Projection) {
51
def id = CRS.lookupIdentifier(p, true)
52
53
54
+ object WKT extends Format[Projection] {
55
+ def readFrom(in: java.io.Reader): Projection = {
56
+ val accum = new StringBuilder()
57
+ val buff = Array.ofDim[Char](4096)
58
+ var len = 0
59
+ while ({ len = in.read(buff) ; len >= 0 }) {
60
+ accum.appendAll(buff, 0, len)
61
+ }
62
+ CRS.parseWKT(accum.toString)
63
64
65
+ def writeTo(out: java.io.Writer, p: Projection): Unit = {
66
+ out.write(p.toWKT)
67
68
69
0 commit comments