title: Feature Layer is getting null bounds with featurecollection derived from RasterToVectorProcess
body: <p>Null Pinter Exception simply means that it is because of value is getting null. But In case of using APis such as GeoTiff it becomes annoying to find out the error in usage.</p>
  
  <p>My code is as follows:</p>
  
  <pre><code>System.out.println("vectorization starts");
  
  GridCoverage2D srcCoverage = new GeoTiffReader(new File("E:/output/ll_processed.TIFF")).read(new GeneralParameterValue[]{policy, gridsize, useJaiRead});
  
  SimpleFeatureCollection fc = RasterToVectorProcess.process(srcCoverage, 3, cov.getEnvelope(), Collections.singletonList(0.0d), true, null);
  
  System.out.println("process ends");
  System.out.println("vectorization ends");
  //MapContext map = new DefaultMapContext();
  //map.setTitle("raster to vector conversion");
  Style style = SLD.createPolygonStyle(Color.BLUE, Color.CYAN, 1.0f);
  //map.addLayer(fc, style);
  //map.getLayerBounds();
  //JMapFrame.showMap(map);
  
  MapContent mapContent= new MapContent();
  mapContent.setTitle("Illegal Mining");
  Layer layer = new FeatureLayer(fc, style,"VectorLayer");
  
  //int boundary = 10;
  // ReferencedEnvelope env2 = new  ReferencedEnvelope(srcCoverage.getEnvelope().getMinimum(0) - boundary, srcCoverage.getEnvelope().getMaximum(0) + boundary,
      //srcCoverage.getEnvelope().getMinimum(1) - boundary, srcCoverage.getEnvelope().getMaximum(1) + boundary, srcCoverage.getCoordinateReferenceSystem());
  
  //mapContent.getViewport().setBounds(fc.getBounds());
  Line 199 : if(layer.getBounds()!=null) // here the error is coming also tried with if(layer != null &amp;&amp; layer.getBounds()!=null) 
   {
      mapContent.addLayer(layer);
  }else{
      System.out.println("Layer bounds are null");
  }
  mapContent.getViewport().setCoordinateReferenceSystem(
          DefaultGeographicCRS.WGS84);
  </code></pre>
  
  <p>Error</p>
  
  <blockquote>
    <p>at org.geotools.map.FeatureLayer.getBounds(FeatureLayer.java:199)</p>
  </blockquote>
  
  <p>I am trying to convert Tiff to Vector image and Then I want to store it on disk.</p>