Skip to content

Instantly share code, notes, and snippets.

@pomadchin
Created August 22, 2018 07:36
Show Gist options
  • Save pomadchin/9e459a6b7c9f1063a2e0927e7c45a7df to your computer and use it in GitHub Desktop.
Save pomadchin/9e459a6b7c9f1063a2e0927e7c45a7df to your computer and use it in GitHub Desktop.
GeoTrellis WKT Parser test for @wsf1990
package geotrellis.proj4.io.wkt
import org.scalatest.FunSpec
class WKTParserTest extends FunSpec {
it("GCS_WGS_1984") {
val strip = WKTParser("""|GEOGCS["GCS_WGS_1984",
|DATUM["D_WGS_1984", SPHEROID["WGS_1984", 6378137.0, 298.257223563]],
|PRIMEM["Greenwich", 0.0],
|UNIT["degree", 0.017453292519943295],
|AXIS["Longitude", "EAST"],
|AXIS["Latitude", "NORTH"]]""".stripMargin.replaceAll("\n",""))
val single = WKTParser("""GEOGCS["GCS_WGS_1984", DATUM["D_WGS_1984", SPHEROID["WGS_1984", 6378137.0, 298.257223563]],PRIMEM["Greenwich", 0.0],UNIT["degree", 0.017453292519943295],AXIS["Longitude", "EAST"],AXIS["Latitude", "NORTH"]]""")
assert(strip == single)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment