public class ShpTest {

	final static String shpName="data/2pole_tco.shp";
	
	public ShpTest() {
		super();
		ShapeFile shp = new ShapeFile();
		shp.setFileName(shpName);
		shp.setCrsEPSG("EPSG:32740");

		KmlExport kml = new KmlExport();
        kml.setShapeFile(shp);
//        kml.defIconStyle("size1","Ratatouille.png",1.0,0.0);
//        kml.defIconStyle("size3","Ratatouille.png",3.0,60.0);
        kml.defStyle("exmares", 1, "FF00CC99", "EF00CC99");
		
        int i=0;
		while (shp.hasNextRecord()) {
            ShpRecord onerec = shp.getNextRecord();
//            boolean tf=onerec.isMPoints();
//            System.out.println("tf="+tf);
//            int id = onerec.getIntAttribute("ID");
            Integer yr = new Integer(2002);
            String deb = "" + yr + "-01-01";
            String fin = "" + yr + "-12-31";
 //           if (i< 55) {kml.addStyledRecord("Vil"+id, deb, fin, onerec, "size1");}
 //           else {kml.addStyledRecord("Vil"+id, deb, fin, onerec, "size3");}
            i = i+1;
//            kml.addStyledRecordEx2("pole_"+i, deb, fin, onerec, "pole", 50*i,150);
            kml.addStyledRecordEx("2pole_"+i, deb, fin, onerec, "pole", 150);

		}
        System.out.println("Saving the kml file in output ....");
        kml.saveAsKml("output/Pole_2002-2011.kml");
//        System.out.println("Saving the shp file in output ....");
//        shp.saveAsShp("output/Anko.shp");
        System.out.println("done.");
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		ShpTest st = new ShpTest();
		
	}

}
