All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.scalakml.example.ReadWriteExample1.scala Maven / Gradle / Ivy

The newest version!
package com.scalakml.example

import com.scalakml.io.{KmlFileReader, KmlPrintWriter}

import xml.{PrettyPrinter, XML}
import com.scalakml.io._
import com.scalaxal.io.{XalFileReader, XalPrintWriter}

/**
 * author: Ringo Wathelet
 * Date: 23/01/13 
 * Version: 1
 */

object ReadWriteExample1 {

  def main(args: Array[String]) {
    println("....ReadWriteExample1 start...\n")

    // read a kml file into a kml root object
    val kml = new KmlFileReader().getKmlFromFile("./kml-files/Sydney-oz.kml")

    // write the kml to an output file.
//    if (kml.isDefined) new KmlPrintWriter("./kml-files/KML_Samples.kml").write(kml, new PrettyPrinter(80, 3))

    // write the kml to System.out
    if (kml.isDefined) new KmlPrintWriter().write(kml, new PrettyPrinter(80, 3))

    println("\n....ReadWriteExample1 done...")
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy