/* ********************************************************************** */ import java.io.*; import java.util.*; import com.bbn.openmap.omGraphics.*; import com.bbn.openmap.plugin.*; import com.bbn.openmap.plugin.esri.*; import com.bbn.openmap.plugin.esri.output.*; /** * This is a utility to merge shapefiles */ public class Merge { File dbf; File shp; File shx; EsriGraphicList l1; EsriGraphicList l2; EsriPlugIn p1; EsriPlugIn p2; public Merge () { try { dbf = new File("./data/dataset1.dbf"); shp = new File("./data/dataset1.shp"); shx = new File("./data/dataset1.shx"); p1 = new EsriPlugIn("l1", dbf.toURL(), shp.toURL(), shx.toURL()); dbf = new File("./data/dataset2.dbf"); shp = new File("./data/dataset2.shp"); shx = new File("./data/dataset2.shx"); p2 = new EsriPlugIn("l2", dbf.toURL(), shp.toURL(), shx.toURL()); EsriGraphicList l2=p2.getEsriGraphicList(); DbfTableModel d2=p2.getModel(); OMGraphicList recs=(OMGraphicList)(l2.getOMGraphicAt(0)); for (int i=0;i