code: public static ALasDataManager getDataManager( File dataFile, GridCoverage2D inDem, double elevThreshold,
              CoordinateReferenceSystem inCrs ) {
          String lcName = dataFile.getName().toLowerCase();
          if (lcName.endsWith(".las")) {
              return new LasFileDataManager(dataFile, inDem, elevThreshold, inCrs);
          } else if (lcName.equals(LasIndexer.INDEX_LASFOLDER)) {
              return new LasFolderIndexDataManager(dataFile, inDem, elevThreshold, inCrs);
          } else {
              try {
                  EDb edb = EDb.fromFileDesktop(dataFile);
                  if (edb != null && edb.isSpatial()) {
                      return new DatabaseLasDataManager(dataFile, inDem, elevThreshold, inCrs);
                  }
              } catch (Exception e) {
                  // ignore, will be handled
              }
  
              throw new IllegalArgumentException("Can only read .las and " + LasIndexer.INDEX_LASFOLDER + " files.");
          }
      }
docs: Factory method to create {@link ALasDataManager}.
  
  @param lasFile the las file or las folder index file.
  @param inDem a dem to normalize the elevation. If <code>!null</code>, the height over the dtm is added as {@link LasRecord#groundElevation}.
  @param elevThreshold a threshold to use for the elevation normalization.
  @param inCrs the data {@link org.opengis.referencing.crs.CoordinateReferenceSystem}. if null, the one of the dem is read, if available.