title: JAVA: Convert IEnvelope to Shapefile
body: <p>I am currently attempting to convert an IEnvelope to a Shapefile and am at a stand still. I am at a point where I have retrieved the IEnvelope from the Shapefile but am not sure how to go about converting to a Shapefile object. The relevant code I have is listed below:</p>
  
  <pre><code>  private final ResultsMenuAction createLayerAction = new ResultsMenuAction("uiCreateLayer") {
      protected void doActionPerformed(ActionEvent e) {
          System.out.println("Button hit!");
          try {
              ImmutableSet&lt;FeatureWrapper&gt; features = getFeatures();
              Iterator itr = features.iterator();
              while(itr.hasNext()){
                  FeatureWrapper wrapper = (FeatureWrapper) itr.next();
                  IGeometry geom = wrapper.getOriginalShape();
                  IEnvelope envelope = geom.getEnvelope();
              }
              System.out.println("Done");
          } catch (ArcEngineException e1) {
              e1.printStackTrace();
          } catch (AutomationException e1) {
              e1.printStackTrace();
          } catch (IOException e1) {
              e1.printStackTrace();
          }
  
      }
  
  };
  </code></pre>