Search in sources :

Example 1 with LazDecompressGpsTime11V1

use of com.revolsys.elevation.cloud.las.zip.LazDecompressGpsTime11V1 in project com.revolsys.open by revolsys.

the class LasPointCloud method newLazDecompressors.

public LazDecompress[] newLazDecompressors(final LasZipHeader lasZipHeader, final ArithmeticDecoder decoder) {
    final int numItems = lasZipHeader.getNumItems();
    final LazDecompress[] pointDecompressors = new LazDecompress[numItems];
    for (int i = 0; i < numItems; i++) {
        final LazItemType type = lasZipHeader.getType(i);
        final int version = lasZipHeader.getVersion(i);
        if (version < 1 || version > 2) {
            throw new RuntimeException(version + " not yet supported");
        }
        switch(type) {
            case POINT10:
                if (version == 1) {
                    pointDecompressors[i] = new LazDecompressPoint10V1(this, decoder);
                } else {
                    pointDecompressors[i] = new LazDecompressPoint10V2(this, decoder);
                }
                break;
            case GPSTIME11:
                if (version == 1) {
                    pointDecompressors[i] = new LazDecompressGpsTime11V1(decoder);
                } else {
                    pointDecompressors[i] = new LazDecompressGpsTime11V2(decoder);
                }
                break;
            case RGB12:
                if (version == 1) {
                    pointDecompressors[i] = new LazDecompressRgb12V1(decoder);
                } else {
                    pointDecompressors[i] = new LazDecompressRgb12V2(decoder);
                }
                break;
            default:
                throw new RuntimeException(type + " not yet supported");
        }
    }
    return pointDecompressors;
}
Also used : LazDecompress(com.revolsys.elevation.cloud.las.zip.LazDecompress) LazDecompressRgb12V2(com.revolsys.elevation.cloud.las.zip.LazDecompressRgb12V2) LazDecompressRgb12V1(com.revolsys.elevation.cloud.las.zip.LazDecompressRgb12V1) LazDecompressPoint10V1(com.revolsys.elevation.cloud.las.zip.LazDecompressPoint10V1) LazDecompressPoint10V2(com.revolsys.elevation.cloud.las.zip.LazDecompressPoint10V2) LazItemType(com.revolsys.elevation.cloud.las.zip.LazItemType) LasPoint(com.revolsys.elevation.cloud.las.pointformat.LasPoint) Point(com.revolsys.geometry.model.Point) LazDecompressGpsTime11V1(com.revolsys.elevation.cloud.las.zip.LazDecompressGpsTime11V1) LazDecompressGpsTime11V2(com.revolsys.elevation.cloud.las.zip.LazDecompressGpsTime11V2)

Aggregations

LasPoint (com.revolsys.elevation.cloud.las.pointformat.LasPoint)1 LazDecompress (com.revolsys.elevation.cloud.las.zip.LazDecompress)1 LazDecompressGpsTime11V1 (com.revolsys.elevation.cloud.las.zip.LazDecompressGpsTime11V1)1 LazDecompressGpsTime11V2 (com.revolsys.elevation.cloud.las.zip.LazDecompressGpsTime11V2)1 LazDecompressPoint10V1 (com.revolsys.elevation.cloud.las.zip.LazDecompressPoint10V1)1 LazDecompressPoint10V2 (com.revolsys.elevation.cloud.las.zip.LazDecompressPoint10V2)1 LazDecompressRgb12V1 (com.revolsys.elevation.cloud.las.zip.LazDecompressRgb12V1)1 LazDecompressRgb12V2 (com.revolsys.elevation.cloud.las.zip.LazDecompressRgb12V2)1 LazItemType (com.revolsys.elevation.cloud.las.zip.LazItemType)1 Point (com.revolsys.geometry.model.Point)1