code: public static SimpleFeature tofeature( LasRecord r, Integer featureId, CoordinateReferenceSystem crs ) {
          final Point point = toGeometry(r);
          double elev = r.z;
          if (!Double.isNaN(r.groundElevation)) {
              elev = r.groundElevation;
          }
          if (featureId == null) {
              featureId = -1;
          }
          final Object[] values = new Object[]{point, featureId, elev, r.intensity, r.classification, r.returnNumber,
                  r.numberOfReturns};
          SimpleFeatureBuilder lasFeatureBuilder = getLasFeatureBuilder(crs);
          lasFeatureBuilder.addAll(values);
          final SimpleFeature feature = lasFeatureBuilder.buildFeature(null);
          return feature;
      }
docs: Convert a record to a feature.
  
  @param r the record to convert.
  @param featureId an optional feature id, if not available, the id is set to -1.
  @param crs the crs to apply.
  @return the feature.