code: public static List<LasRecord> getLasRecordsFromFeatureCollection( SimpleFeatureCollection lasCollection,
              boolean elevIsGround ) {
          List<SimpleFeature> featuresList = FeatureUtilities.featureCollectionToList(lasCollection);
          List<LasRecord> lasList = new ArrayList<LasRecord>();
          for( SimpleFeature lasFeature : featuresList ) {
              LasRecord r = new LasRecord();
              Coordinate coordinate = ((Geometry) lasFeature.getDefaultGeometry()).getCoordinate();
              r.x = coordinate.x;
              r.y = coordinate.y;
              double elevation = ((Number) lasFeature.getAttribute(ELEVATION)).doubleValue();
              r.z = elevation;
              if (elevIsGround) {
                  r.groundElevation = elevation;
              }
              short intensity = ((Number) lasFeature.getAttribute(INTENSITY)).shortValue();
              r.intensity = intensity;
              byte classification = ((Number) lasFeature.getAttribute(CLASSIFICATION)).byteValue();
              r.classification = classification;
              short impulse = ((Number) lasFeature.getAttribute(IMPULSE)).shortValue();
              r.returnNumber = impulse;
              short numOfImpulses = ((Number) lasFeature.getAttribute(NUM_OF_IMPULSES)).shortValue();
              r.numberOfReturns = numOfImpulses;
              lasList.add(r);
          }
          return lasList;
      }
docs: Create a {@link LasRecord} from a collection.
  
  <p><b>The collection has to be created with the methods of this class previously,
  else some fields will be missing.</b>
  
  @param lasCollection the collection to convert.
  @param elevIsGround if <code>true</code>, the elevation is the ground height.
  @return the list of las records.