Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I try to merge the some shapefiles into one by using ArcEngine java platform. But it seem like that parameters of my merge class is wrong ,i google it a long time and got nothing. Pls figure my problem out .The Error is :Invalid value type for parameter inputs.

public static  IGeoProcessorResult mergeTool(String shpPath,String[] shpNames,  String outFile) 
    //Initialize the geoprocessorResult object
    //IGeoProcessorResult vGeoPR = null;
    // Initialize the geoprocessor.
    GeoProcessor vGeoP = null;
    IGeoProcessorResult vGeoPR = null;
    try {
        vGeoP = new GeoProcessor();
        IWorkspaceFactory vWSpaceFactory =new ShapefileWorkspaceFactory();
        //IFeatureClass vFeaCls = vFeatureWSpace.openFeatureClass(ShapeName);
       IWorkspace vWorkSpace; 
       IFeatureWorkspace vFeatureWSpace = null;
       vWorkSpace = vWSpaceFactory.openFromFile(shpPath, 0);
    vFeatureWSpace = (IFeatureWorkspace)vWorkSpace;
        IFeatureClass vFeaCls = null; 

        ArrayList<IFeatureClass> vInArray = new ArrayList<IFeatureClass>();
        for(int i=0;i<shpNames.length;i++)

            vFeaCls= vFeatureWSpace.openFeatureClass(shpNames[i]);
        //vGeoP.addMessage("I will overwrite your file if name exits!");
      // vGeoP.setEnvironmentValue("workSpace", vFeatureWSpace);
         Merge  vMerge = new Merge(vInArray,outFile);
            return vGeoPR;
share|improve this question
up vote 1 down vote accepted

I found out one way to solve this problem.We should set the input parameter format like this:

 String inputString = inputDir1+";"+inputDir2;
           Merge  vMerge = new Merge(inputString ,outFile);
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.