@itwin/core-orbitgt 5.0.0-dev.8 → 5.0.0-dev.83
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +46 -1
- package/lib/cjs/pointcloud/format/opc/AttributeMask.js +4 -0
- package/lib/cjs/pointcloud/format/opc/AttributeMask.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/BlockRecord.js +2 -2
- package/lib/cjs/pointcloud/format/opc/BlockRecord.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/ContainerFile.js +10 -2
- package/lib/cjs/pointcloud/format/opc/ContainerFile.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/ContainerFilePart.js +8 -0
- package/lib/cjs/pointcloud/format/opc/ContainerFilePart.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/DirectoryReader.js +12 -0
- package/lib/cjs/pointcloud/format/opc/DirectoryReader.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/DirectoryRecord.js +6 -0
- package/lib/cjs/pointcloud/format/opc/DirectoryRecord.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/EmbeddedAttributeReader.js +21 -0
- package/lib/cjs/pointcloud/format/opc/EmbeddedAttributeReader.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/FileAccess.js +6 -0
- package/lib/cjs/pointcloud/format/opc/FileAccess.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/FileReader.js +16 -2
- package/lib/cjs/pointcloud/format/opc/FileReader.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/FileRecord.js +14 -0
- package/lib/cjs/pointcloud/format/opc/FileRecord.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/GeometryReader.js +14 -6
- package/lib/cjs/pointcloud/format/opc/GeometryReader.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/GeometryRecord.js +4 -0
- package/lib/cjs/pointcloud/format/opc/GeometryRecord.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/OPCReader.js +6 -0
- package/lib/cjs/pointcloud/format/opc/OPCReader.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/TileReadBuffer.js +4 -0
- package/lib/cjs/pointcloud/format/opc/TileReadBuffer.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/TileRecord.js +2 -2
- package/lib/cjs/pointcloud/format/opc/TileRecord.js.map +1 -1
- package/lib/cjs/pointcloud/model/AttributeTypes.js +16 -16
- package/lib/cjs/pointcloud/model/AttributeTypes.js.map +1 -1
- package/lib/cjs/pointcloud/model/AttributeValue.js +14 -4
- package/lib/cjs/pointcloud/model/AttributeValue.js.map +1 -1
- package/lib/cjs/pointcloud/model/BlockIndex.js +18 -0
- package/lib/cjs/pointcloud/model/BlockIndex.js.map +1 -1
- package/lib/cjs/pointcloud/model/CloudPoint.js +22 -2
- package/lib/cjs/pointcloud/model/CloudPoint.js.map +1 -1
- package/lib/cjs/pointcloud/model/Grid.js +4 -0
- package/lib/cjs/pointcloud/model/Grid.js.map +1 -1
- package/lib/cjs/pointcloud/model/GridIndex.js +6 -0
- package/lib/cjs/pointcloud/model/GridIndex.js.map +1 -1
- package/lib/cjs/pointcloud/model/PointAttribute.js +14 -0
- package/lib/cjs/pointcloud/model/PointAttribute.js.map +1 -1
- package/lib/cjs/pointcloud/model/PointData.js +4 -0
- package/lib/cjs/pointcloud/model/PointData.js.map +1 -1
- package/lib/cjs/pointcloud/model/PointDataRaw.js +8 -2
- package/lib/cjs/pointcloud/model/PointDataRaw.js.map +1 -1
- package/lib/cjs/pointcloud/model/ReadRequest.js +28 -6
- package/lib/cjs/pointcloud/model/ReadRequest.js.map +1 -1
- package/lib/cjs/pointcloud/model/StandardAttributes.js +21 -21
- package/lib/cjs/pointcloud/model/StandardAttributes.js.map +1 -1
- package/lib/cjs/pointcloud/model/TileIndex.js +16 -0
- package/lib/cjs/pointcloud/model/TileIndex.js.map +1 -1
- package/lib/cjs/pointcloud/render/Block.js +6 -0
- package/lib/cjs/pointcloud/render/Block.js.map +1 -1
- package/lib/cjs/pointcloud/render/DataManager.js +36 -6
- package/lib/cjs/pointcloud/render/DataManager.js.map +1 -1
- package/lib/cjs/pointcloud/render/FrameData.js +8 -0
- package/lib/cjs/pointcloud/render/FrameData.js.map +1 -1
- package/lib/cjs/pointcloud/render/Level.js +12 -0
- package/lib/cjs/pointcloud/render/Level.js.map +1 -1
- package/lib/cjs/pointcloud/render/TileLoadSorter.js +9 -4
- package/lib/cjs/pointcloud/render/TileLoadSorter.js.map +1 -1
- package/lib/cjs/pointcloud/render/ViewTree.js +12 -4
- package/lib/cjs/pointcloud/render/ViewTree.js.map +1 -1
- package/lib/cjs/spatial/crs/CRSManager.js +2 -2
- package/lib/cjs/spatial/crs/CRSManager.js.map +1 -1
- package/lib/cjs/spatial/ecrs/Axis.js +12 -0
- package/lib/cjs/spatial/ecrs/Axis.js.map +1 -1
- package/lib/cjs/spatial/ecrs/CRS.js +68 -34
- package/lib/cjs/spatial/ecrs/CRS.js.map +1 -1
- package/lib/cjs/spatial/ecrs/CoordinateSystem.js +20 -2
- package/lib/cjs/spatial/ecrs/CoordinateSystem.js.map +1 -1
- package/lib/cjs/spatial/ecrs/DataFileUnit.js +1 -1
- package/lib/cjs/spatial/ecrs/DataFileUnit.js.map +1 -1
- package/lib/cjs/spatial/ecrs/Datum.js +16 -4
- package/lib/cjs/spatial/ecrs/Datum.js.map +1 -1
- package/lib/cjs/spatial/ecrs/Ellipsoid.js +18 -0
- package/lib/cjs/spatial/ecrs/Ellipsoid.js.map +1 -1
- package/lib/cjs/spatial/ecrs/OnlineEngine.js +2 -0
- package/lib/cjs/spatial/ecrs/OnlineEngine.js.map +1 -1
- package/lib/cjs/spatial/ecrs/OnlineRegistry.js +6 -2
- package/lib/cjs/spatial/ecrs/OnlineRegistry.js.map +1 -1
- package/lib/cjs/spatial/ecrs/Operation.js +28 -6
- package/lib/cjs/spatial/ecrs/Operation.js.map +1 -1
- package/lib/cjs/spatial/ecrs/OperationMethod.js +6 -0
- package/lib/cjs/spatial/ecrs/OperationMethod.js.map +1 -1
- package/lib/cjs/spatial/ecrs/ParameterValue.js +6 -0
- package/lib/cjs/spatial/ecrs/ParameterValue.js.map +1 -1
- package/lib/cjs/spatial/ecrs/ParameterValueList.js +2 -0
- package/lib/cjs/spatial/ecrs/ParameterValueList.js.map +1 -1
- package/lib/cjs/spatial/ecrs/PrimeMeridian.js +8 -0
- package/lib/cjs/spatial/ecrs/PrimeMeridian.js.map +1 -1
- package/lib/cjs/spatial/ecrs/Registry.js +17 -17
- package/lib/cjs/spatial/ecrs/Registry.js.map +1 -1
- package/lib/cjs/spatial/ecrs/Transform.js +11 -11
- package/lib/cjs/spatial/ecrs/Transform.js.map +1 -1
- package/lib/cjs/spatial/ecrs/Unit.js +40 -24
- package/lib/cjs/spatial/ecrs/Unit.js.map +1 -1
- package/lib/cjs/spatial/ecrs/WellKnownText.js +8 -8
- package/lib/cjs/spatial/ecrs/WellKnownText.js.map +1 -1
- package/lib/cjs/spatial/ecrs/WellKnownTextNode.js +4 -0
- package/lib/cjs/spatial/ecrs/WellKnownTextNode.js.map +1 -1
- package/lib/cjs/spatial/ecrs/projection/HotineObliqueMercator.js +36 -2
- package/lib/cjs/spatial/ecrs/projection/HotineObliqueMercator.js.map +1 -1
- package/lib/cjs/spatial/ecrs/projection/KrovakObliqueConformalConic.js +23 -2
- package/lib/cjs/spatial/ecrs/projection/KrovakObliqueConformalConic.js.map +1 -1
- package/lib/cjs/spatial/ecrs/projection/KrovakObliqueConformalConicEN.js +4 -2
- package/lib/cjs/spatial/ecrs/projection/KrovakObliqueConformalConicEN.js.map +1 -1
- package/lib/cjs/spatial/ecrs/projection/LambertConical1SP.js +12 -2
- package/lib/cjs/spatial/ecrs/projection/LambertConical1SP.js.map +1 -1
- package/lib/cjs/spatial/ecrs/projection/LambertConical2SP.js +29 -6
- package/lib/cjs/spatial/ecrs/projection/LambertConical2SP.js.map +1 -1
- package/lib/cjs/spatial/ecrs/projection/Mercator1SP.js +14 -4
- package/lib/cjs/spatial/ecrs/projection/Mercator1SP.js.map +1 -1
- package/lib/cjs/spatial/ecrs/projection/ObliqueMercator.js +38 -4
- package/lib/cjs/spatial/ecrs/projection/ObliqueMercator.js.map +1 -1
- package/lib/cjs/spatial/ecrs/projection/ObliqueStereographic.js +24 -4
- package/lib/cjs/spatial/ecrs/projection/ObliqueStereographic.js.map +1 -1
- package/lib/cjs/spatial/ecrs/projection/TransverseMercator.js +28 -4
- package/lib/cjs/spatial/ecrs/projection/TransverseMercator.js.map +1 -1
- package/lib/cjs/spatial/ecrs/transformation/PositionVector.js +12 -2
- package/lib/cjs/spatial/ecrs/transformation/PositionVector.js.map +1 -1
- package/lib/cjs/spatial/geom/Bounds.js +3 -0
- package/lib/cjs/spatial/geom/Bounds.js.map +1 -1
- package/lib/cjs/spatial/geom/Coordinate.js +3 -0
- package/lib/cjs/spatial/geom/Coordinate.js.map +1 -1
- package/lib/cjs/spatial/geom/Line.js +4 -0
- package/lib/cjs/spatial/geom/Line.js.map +1 -1
- package/lib/cjs/spatial/geom/Transform.js +2 -0
- package/lib/cjs/spatial/geom/Transform.js.map +1 -1
- package/lib/cjs/system/buffer/ABuffer.js +4 -0
- package/lib/cjs/system/buffer/ABuffer.js.map +1 -1
- package/lib/cjs/system/buffer/Float32Buffer.js +8 -2
- package/lib/cjs/system/buffer/Float32Buffer.js.map +1 -1
- package/lib/cjs/system/buffer/Uint16Buffer.js +8 -2
- package/lib/cjs/system/buffer/Uint16Buffer.js.map +1 -1
- package/lib/cjs/system/buffer/Uint8Buffer.js +8 -2
- package/lib/cjs/system/buffer/Uint8Buffer.js.map +1 -1
- package/lib/cjs/system/collection/AList.js +1 -0
- package/lib/cjs/system/collection/AList.js.map +1 -1
- package/lib/cjs/system/collection/IntMap.js +1 -0
- package/lib/cjs/system/collection/IntMap.js.map +1 -1
- package/lib/cjs/system/collection/StringMap.js +1 -0
- package/lib/cjs/system/collection/StringMap.js.map +1 -1
- package/lib/cjs/system/io/ABufferInStream.js +5 -0
- package/lib/cjs/system/io/ABufferInStream.js.map +1 -1
- package/lib/cjs/system/runtime/ALong.js +30 -26
- package/lib/cjs/system/runtime/ALong.js.map +1 -1
- package/lib/cjs/system/runtime/ASystem.js +1 -1
- package/lib/cjs/system/runtime/ASystem.js.map +1 -1
- package/lib/cjs/system/runtime/Downloader.js +2 -2
- package/lib/cjs/system/runtime/Downloader.js.map +1 -1
- package/lib/cjs/system/runtime/Message.js +2 -2
- package/lib/cjs/system/runtime/Message.js.map +1 -1
- package/lib/cjs/system/runtime/Numbers.js +6 -6
- package/lib/cjs/system/runtime/Numbers.js.map +1 -1
- package/lib/cjs/system/runtime/Strings.js +14 -14
- package/lib/cjs/system/runtime/Strings.js.map +1 -1
- package/lib/cjs/system/storage/CacheList.js +8 -0
- package/lib/cjs/system/storage/CacheList.js.map +1 -1
- package/lib/cjs/system/storage/CachedItem.js +6 -0
- package/lib/cjs/system/storage/CachedItem.js.map +1 -1
- package/lib/cjs/system/storage/ContentLoader.js +14 -2
- package/lib/cjs/system/storage/ContentLoader.js.map +1 -1
- package/lib/cjs/system/storage/FileContent.js +4 -0
- package/lib/cjs/system/storage/FileContent.js.map +1 -1
- package/lib/cjs/system/storage/FileRange.js +4 -0
- package/lib/cjs/system/storage/FileRange.js.map +1 -1
- package/lib/cjs/system/storage/PageCachedFile.js +8 -0
- package/lib/cjs/system/storage/PageCachedFile.js.map +1 -1
- package/lib/cjs/system/storage/UrlFS.js +6 -0
- package/lib/cjs/system/storage/UrlFS.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/AttributeMask.js +4 -0
- package/lib/esm/pointcloud/format/opc/AttributeMask.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/BlockRecord.js +2 -2
- package/lib/esm/pointcloud/format/opc/BlockRecord.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/ContainerFile.js +10 -2
- package/lib/esm/pointcloud/format/opc/ContainerFile.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/ContainerFilePart.js +8 -0
- package/lib/esm/pointcloud/format/opc/ContainerFilePart.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/DirectoryReader.js +12 -0
- package/lib/esm/pointcloud/format/opc/DirectoryReader.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/DirectoryRecord.js +6 -0
- package/lib/esm/pointcloud/format/opc/DirectoryRecord.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/EmbeddedAttributeReader.js +21 -0
- package/lib/esm/pointcloud/format/opc/EmbeddedAttributeReader.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/FileAccess.js +6 -0
- package/lib/esm/pointcloud/format/opc/FileAccess.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/FileReader.js +16 -2
- package/lib/esm/pointcloud/format/opc/FileReader.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/FileRecord.js +14 -0
- package/lib/esm/pointcloud/format/opc/FileRecord.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/GeometryReader.js +14 -6
- package/lib/esm/pointcloud/format/opc/GeometryReader.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/GeometryRecord.js +4 -0
- package/lib/esm/pointcloud/format/opc/GeometryRecord.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/OPCReader.js +6 -0
- package/lib/esm/pointcloud/format/opc/OPCReader.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/TileReadBuffer.js +4 -0
- package/lib/esm/pointcloud/format/opc/TileReadBuffer.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/TileRecord.js +2 -2
- package/lib/esm/pointcloud/format/opc/TileRecord.js.map +1 -1
- package/lib/esm/pointcloud/model/AttributeTypes.js +16 -16
- package/lib/esm/pointcloud/model/AttributeTypes.js.map +1 -1
- package/lib/esm/pointcloud/model/AttributeValue.js +14 -4
- package/lib/esm/pointcloud/model/AttributeValue.js.map +1 -1
- package/lib/esm/pointcloud/model/BlockIndex.js +18 -0
- package/lib/esm/pointcloud/model/BlockIndex.js.map +1 -1
- package/lib/esm/pointcloud/model/CloudPoint.js +22 -2
- package/lib/esm/pointcloud/model/CloudPoint.js.map +1 -1
- package/lib/esm/pointcloud/model/Grid.js +4 -0
- package/lib/esm/pointcloud/model/Grid.js.map +1 -1
- package/lib/esm/pointcloud/model/GridIndex.js +6 -0
- package/lib/esm/pointcloud/model/GridIndex.js.map +1 -1
- package/lib/esm/pointcloud/model/PointAttribute.js +14 -0
- package/lib/esm/pointcloud/model/PointAttribute.js.map +1 -1
- package/lib/esm/pointcloud/model/PointData.js +4 -0
- package/lib/esm/pointcloud/model/PointData.js.map +1 -1
- package/lib/esm/pointcloud/model/PointDataRaw.js +8 -2
- package/lib/esm/pointcloud/model/PointDataRaw.js.map +1 -1
- package/lib/esm/pointcloud/model/ReadRequest.js +28 -6
- package/lib/esm/pointcloud/model/ReadRequest.js.map +1 -1
- package/lib/esm/pointcloud/model/StandardAttributes.js +21 -21
- package/lib/esm/pointcloud/model/StandardAttributes.js.map +1 -1
- package/lib/esm/pointcloud/model/TileIndex.js +16 -0
- package/lib/esm/pointcloud/model/TileIndex.js.map +1 -1
- package/lib/esm/pointcloud/render/Block.js +6 -0
- package/lib/esm/pointcloud/render/Block.js.map +1 -1
- package/lib/esm/pointcloud/render/DataManager.js +36 -6
- package/lib/esm/pointcloud/render/DataManager.js.map +1 -1
- package/lib/esm/pointcloud/render/FrameData.js +8 -0
- package/lib/esm/pointcloud/render/FrameData.js.map +1 -1
- package/lib/esm/pointcloud/render/Level.js +12 -0
- package/lib/esm/pointcloud/render/Level.js.map +1 -1
- package/lib/esm/pointcloud/render/TileLoadSorter.js +9 -4
- package/lib/esm/pointcloud/render/TileLoadSorter.js.map +1 -1
- package/lib/esm/pointcloud/render/ViewTree.js +12 -4
- package/lib/esm/pointcloud/render/ViewTree.js.map +1 -1
- package/lib/esm/spatial/crs/CRSManager.js +2 -2
- package/lib/esm/spatial/crs/CRSManager.js.map +1 -1
- package/lib/esm/spatial/ecrs/Axis.js +12 -0
- package/lib/esm/spatial/ecrs/Axis.js.map +1 -1
- package/lib/esm/spatial/ecrs/CRS.js +68 -34
- package/lib/esm/spatial/ecrs/CRS.js.map +1 -1
- package/lib/esm/spatial/ecrs/CoordinateSystem.js +20 -2
- package/lib/esm/spatial/ecrs/CoordinateSystem.js.map +1 -1
- package/lib/esm/spatial/ecrs/DataFileUnit.js +1 -1
- package/lib/esm/spatial/ecrs/DataFileUnit.js.map +1 -1
- package/lib/esm/spatial/ecrs/Datum.js +16 -4
- package/lib/esm/spatial/ecrs/Datum.js.map +1 -1
- package/lib/esm/spatial/ecrs/Ellipsoid.js +18 -0
- package/lib/esm/spatial/ecrs/Ellipsoid.js.map +1 -1
- package/lib/esm/spatial/ecrs/OnlineEngine.js +2 -0
- package/lib/esm/spatial/ecrs/OnlineEngine.js.map +1 -1
- package/lib/esm/spatial/ecrs/OnlineRegistry.js +6 -2
- package/lib/esm/spatial/ecrs/OnlineRegistry.js.map +1 -1
- package/lib/esm/spatial/ecrs/Operation.js +28 -6
- package/lib/esm/spatial/ecrs/Operation.js.map +1 -1
- package/lib/esm/spatial/ecrs/OperationMethod.js +6 -0
- package/lib/esm/spatial/ecrs/OperationMethod.js.map +1 -1
- package/lib/esm/spatial/ecrs/ParameterValue.js +6 -0
- package/lib/esm/spatial/ecrs/ParameterValue.js.map +1 -1
- package/lib/esm/spatial/ecrs/ParameterValueList.js +2 -0
- package/lib/esm/spatial/ecrs/ParameterValueList.js.map +1 -1
- package/lib/esm/spatial/ecrs/PrimeMeridian.js +8 -0
- package/lib/esm/spatial/ecrs/PrimeMeridian.js.map +1 -1
- package/lib/esm/spatial/ecrs/Registry.js +17 -17
- package/lib/esm/spatial/ecrs/Registry.js.map +1 -1
- package/lib/esm/spatial/ecrs/Transform.js +11 -11
- package/lib/esm/spatial/ecrs/Transform.js.map +1 -1
- package/lib/esm/spatial/ecrs/Unit.js +40 -24
- package/lib/esm/spatial/ecrs/Unit.js.map +1 -1
- package/lib/esm/spatial/ecrs/WellKnownText.js +8 -8
- package/lib/esm/spatial/ecrs/WellKnownText.js.map +1 -1
- package/lib/esm/spatial/ecrs/WellKnownTextNode.js +4 -0
- package/lib/esm/spatial/ecrs/WellKnownTextNode.js.map +1 -1
- package/lib/esm/spatial/ecrs/projection/HotineObliqueMercator.js +36 -2
- package/lib/esm/spatial/ecrs/projection/HotineObliqueMercator.js.map +1 -1
- package/lib/esm/spatial/ecrs/projection/KrovakObliqueConformalConic.js +23 -2
- package/lib/esm/spatial/ecrs/projection/KrovakObliqueConformalConic.js.map +1 -1
- package/lib/esm/spatial/ecrs/projection/KrovakObliqueConformalConicEN.js +4 -2
- package/lib/esm/spatial/ecrs/projection/KrovakObliqueConformalConicEN.js.map +1 -1
- package/lib/esm/spatial/ecrs/projection/LambertConical1SP.js +12 -2
- package/lib/esm/spatial/ecrs/projection/LambertConical1SP.js.map +1 -1
- package/lib/esm/spatial/ecrs/projection/LambertConical2SP.js +29 -6
- package/lib/esm/spatial/ecrs/projection/LambertConical2SP.js.map +1 -1
- package/lib/esm/spatial/ecrs/projection/Mercator1SP.js +14 -4
- package/lib/esm/spatial/ecrs/projection/Mercator1SP.js.map +1 -1
- package/lib/esm/spatial/ecrs/projection/ObliqueMercator.js +38 -4
- package/lib/esm/spatial/ecrs/projection/ObliqueMercator.js.map +1 -1
- package/lib/esm/spatial/ecrs/projection/ObliqueStereographic.js +24 -4
- package/lib/esm/spatial/ecrs/projection/ObliqueStereographic.js.map +1 -1
- package/lib/esm/spatial/ecrs/projection/TransverseMercator.js +28 -4
- package/lib/esm/spatial/ecrs/projection/TransverseMercator.js.map +1 -1
- package/lib/esm/spatial/ecrs/transformation/PositionVector.js +12 -2
- package/lib/esm/spatial/ecrs/transformation/PositionVector.js.map +1 -1
- package/lib/esm/spatial/geom/Bounds.js +3 -0
- package/lib/esm/spatial/geom/Bounds.js.map +1 -1
- package/lib/esm/spatial/geom/Coordinate.js +3 -0
- package/lib/esm/spatial/geom/Coordinate.js.map +1 -1
- package/lib/esm/spatial/geom/Line.js +4 -0
- package/lib/esm/spatial/geom/Line.js.map +1 -1
- package/lib/esm/spatial/geom/Transform.js +2 -0
- package/lib/esm/spatial/geom/Transform.js.map +1 -1
- package/lib/esm/system/buffer/ABuffer.js +4 -0
- package/lib/esm/system/buffer/ABuffer.js.map +1 -1
- package/lib/esm/system/buffer/Float32Buffer.js +8 -2
- package/lib/esm/system/buffer/Float32Buffer.js.map +1 -1
- package/lib/esm/system/buffer/Uint16Buffer.js +8 -2
- package/lib/esm/system/buffer/Uint16Buffer.js.map +1 -1
- package/lib/esm/system/buffer/Uint8Buffer.js +8 -2
- package/lib/esm/system/buffer/Uint8Buffer.js.map +1 -1
- package/lib/esm/system/collection/AList.js +1 -0
- package/lib/esm/system/collection/AList.js.map +1 -1
- package/lib/esm/system/collection/IntMap.js +1 -0
- package/lib/esm/system/collection/IntMap.js.map +1 -1
- package/lib/esm/system/collection/StringMap.js +1 -0
- package/lib/esm/system/collection/StringMap.js.map +1 -1
- package/lib/esm/system/io/ABufferInStream.js +5 -0
- package/lib/esm/system/io/ABufferInStream.js.map +1 -1
- package/lib/esm/system/runtime/ALong.js +30 -26
- package/lib/esm/system/runtime/ALong.js.map +1 -1
- package/lib/esm/system/runtime/ASystem.js +1 -1
- package/lib/esm/system/runtime/ASystem.js.map +1 -1
- package/lib/esm/system/runtime/Downloader.js +2 -2
- package/lib/esm/system/runtime/Downloader.js.map +1 -1
- package/lib/esm/system/runtime/Message.js +2 -2
- package/lib/esm/system/runtime/Message.js.map +1 -1
- package/lib/esm/system/runtime/Numbers.js +6 -6
- package/lib/esm/system/runtime/Numbers.js.map +1 -1
- package/lib/esm/system/runtime/Strings.js +14 -14
- package/lib/esm/system/runtime/Strings.js.map +1 -1
- package/lib/esm/system/storage/CacheList.js +8 -0
- package/lib/esm/system/storage/CacheList.js.map +1 -1
- package/lib/esm/system/storage/CachedItem.js +6 -0
- package/lib/esm/system/storage/CachedItem.js.map +1 -1
- package/lib/esm/system/storage/ContentLoader.js +14 -2
- package/lib/esm/system/storage/ContentLoader.js.map +1 -1
- package/lib/esm/system/storage/FileContent.js +4 -0
- package/lib/esm/system/storage/FileContent.js.map +1 -1
- package/lib/esm/system/storage/FileRange.js +4 -0
- package/lib/esm/system/storage/FileRange.js.map +1 -1
- package/lib/esm/system/storage/PageCachedFile.js +8 -0
- package/lib/esm/system/storage/PageCachedFile.js.map +1 -1
- package/lib/esm/system/storage/UrlFS.js +6 -0
- package/lib/esm/system/storage/UrlFS.js.map +1 -1
- package/package.json +10 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PointData.js","sourceRoot":"","sources":["../../../../src/pointcloud/model/PointData.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAcH;;GAEG;AACH,gBAAgB;AAChB,MAAa,SAAS;
|
|
1
|
+
{"version":3,"file":"PointData.js","sourceRoot":"","sources":["../../../../src/pointcloud/model/PointData.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAcH;;GAEG;AACH,gBAAgB;AAChB,MAAa,SAAS;IACrB,wBAAwB;IACjB,SAAS,CAAY;IAC5B,iCAAiC;IAC1B,MAAM,CAAS;IAEtB;;OAEG;IACH,YAAmB,SAAoB,EAAE,MAAc;QACtD,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACtB,CAAC;CACD;AAbD,8BAaC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module OrbitGT\n */\n\n//package orbitgt.pointcloud.model;\n\ntype int8 = number;\ntype int16 = number;\ntype int32 = number;\ntype float32 = number;\ntype float64 = number;\n\n\nimport { Bounds } from \"../../spatial/geom/Bounds\";\nimport { TileIndex } from \"./TileIndex\";\n\n/**\n * Abstract class PointData stores the data of the points in a tile.\n */\n/** @internal */\nexport class PointData {\n\t// the index of the tile\n\tpublic tileIndex: TileIndex;\n\t// the spatial bounds of the tile\n\tpublic bounds: Bounds;\n\n\t/**\n\t * Create new point data.\n\t */\n\tpublic constructor(tileIndex: TileIndex, bounds: Bounds) {\n\t\tthis.tileIndex = tileIndex;\n\t\tthis.bounds = bounds;\n\t}\n}\n"]}
|
|
@@ -14,6 +14,14 @@ const PointData_1 = require("./PointData");
|
|
|
14
14
|
*/
|
|
15
15
|
/** @internal */
|
|
16
16
|
class PointDataRaw extends PointData_1.PointData {
|
|
17
|
+
// the identifier of this data format
|
|
18
|
+
static TYPE = 1;
|
|
19
|
+
// the 16-bit XYZ geometries (length tileIndex.pointCount)
|
|
20
|
+
points16;
|
|
21
|
+
// the 8-bit XYZ geometries (length tileIndex.pointCount)
|
|
22
|
+
points8;
|
|
23
|
+
// the 24-bit BGR colors (length tileIndex.pointCount)
|
|
24
|
+
colors;
|
|
17
25
|
/**
|
|
18
26
|
* Create new point data.
|
|
19
27
|
*/
|
|
@@ -65,6 +73,4 @@ class PointDataRaw extends PointData_1.PointData {
|
|
|
65
73
|
}
|
|
66
74
|
}
|
|
67
75
|
exports.PointDataRaw = PointDataRaw;
|
|
68
|
-
// the identifier of this data format
|
|
69
|
-
PointDataRaw.TYPE = 1;
|
|
70
76
|
//# sourceMappingURL=PointDataRaw.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PointDataRaw.js","sourceRoot":"","sources":["../../../../src/pointcloud/model/PointDataRaw.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAcH,2CAAwC;AAGxC;;GAEG;AACH,gBAAgB;AAChB,MAAa,YAAa,SAAQ,qBAAS;
|
|
1
|
+
{"version":3,"file":"PointDataRaw.js","sourceRoot":"","sources":["../../../../src/pointcloud/model/PointDataRaw.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAcH,2CAA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GAAY,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC;QAC/D,IAAI,IAAI,GAAY,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;QACxD,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAClH,CAAC;IAEM,MAAM,CAAC,UAAiB;QAC9B,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU,GAAG,CAAC,CAAC,CAAC;IAC5C,CAAC;IAEM,QAAQ,CAAC,UAAiB;QAChC,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU,GAAG,CAAC,CAAC,CAAC;IAC5C,CAAC;IAEM,OAAO,CAAC,UAAiB;QAC/B,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU,GAAG,CAAC,CAAC,CAAC;IAC5C,CAAC;;AAjEF,oCAkEC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module OrbitGT\n */\n\n//package orbitgt.pointcloud.model;\n\ntype int8 = number;\ntype int16 = number;\ntype int32 = number;\ntype float32 = number;\ntype float64 = number;\n\nimport { Bounds } from \"../../spatial/geom/Bounds\";\nimport { ABuffer } from \"../../system/buffer/ABuffer\";\nimport { Uint16Buffer } from \"../../system/buffer/Uint16Buffer\";\nimport { Uint8Buffer } from \"../../system/buffer/Uint8Buffer\";\nimport { PointData } from \"./PointData\";\nimport { TileIndex } from \"./TileIndex\";\n\n/**\n * Class PointDataRaw stores point data with 8 or 16-bit XYZ geometry and 24-bit BGR color precision.\n */\n/** @internal */\nexport class PointDataRaw extends PointData {\n\t// the identifier of this data format\n\tpublic static readonly TYPE: int32 = 1;\n\n\t// the 16-bit XYZ geometries (length tileIndex.pointCount)\n\tpublic points16: Uint16Buffer;\n\t// the 8-bit XYZ geometries (length tileIndex.pointCount)\n\tpublic points8: Uint8Buffer;\n\t// the 24-bit BGR colors (length tileIndex.pointCount)\n\tpublic colors: Uint8Buffer;\n\n\t/**\n\t * Create new point data.\n\t */\n\tpublic constructor(tileIndex: TileIndex, bounds: Bounds, points16: Uint16Buffer, points8: Uint8Buffer, colors: Uint8Buffer) {\n\t\tsuper(tileIndex, bounds);\n\t\tthis.bounds = bounds;\n\t\tthis.points16 = points16;\n\t\tthis.points8 = points8;\n\t\tthis.colors = colors;\n\t}\n\n\tpublic getRawX(pointIndex: int32): int32 {\n\t\tif (this.points16 == null) return this.points8.get(3 * pointIndex + 0);\n\t\treturn this.points16.get(3 * pointIndex + 0);\n\t}\n\n\tpublic getRawY(pointIndex: int32): int32 {\n\t\tif (this.points16 == null) return this.points8.get(3 * pointIndex + 1);\n\t\treturn this.points16.get(3 * pointIndex + 1);\n\t}\n\n\tpublic getRawZ(pointIndex: int32): int32 {\n\t\tif (this.points16 == null) return this.points8.get(3 * pointIndex + 2);\n\t\treturn this.points16.get(3 * pointIndex + 2);\n\t}\n\n\tpublic getX(pointIndex: int32): float64 {\n\t\tlet range: float64 = (this.points16 == null) ? 256.0 : 65536.0;\n\t\tlet bias: float64 = (this.points16 == null) ? 0.5 : 0.0;\n\t\treturn this.bounds.min.x + ((this.getRawX(pointIndex) + bias) / range) * (this.bounds.max.x - this.bounds.min.x);\n\t}\n\n\tpublic getY(pointIndex: int32): float64 {\n\t\tlet range: float64 = (this.points16 == null) ? 256.0 : 65536.0;\n\t\tlet bias: float64 = (this.points16 == null) ? 0.5 : 0.0;\n\t\treturn this.bounds.min.y + ((this.getRawY(pointIndex) + bias) / range) * (this.bounds.max.y - this.bounds.min.y);\n\t}\n\n\tpublic getZ(pointIndex: int32): float64 {\n\t\tlet range: float64 = (this.points16 == null) ? 256.0 : 65536.0;\n\t\tlet bias: float64 = (this.points16 == null) ? 0.5 : 0.0;\n\t\treturn this.bounds.min.z + ((this.getRawZ(pointIndex) + bias) / range) * (this.bounds.max.z - this.bounds.min.z);\n\t}\n\n\tpublic getRed(pointIndex: int32): int32 {\n\t\treturn this.colors.get(3 * pointIndex + 2);\n\t}\n\n\tpublic getGreen(pointIndex: int32): int32 {\n\t\treturn this.colors.get(3 * pointIndex + 1);\n\t}\n\n\tpublic getBlue(pointIndex: int32): int32 {\n\t\treturn this.colors.get(3 * pointIndex + 0);\n\t}\n}\n"]}
|
|
@@ -18,6 +18,34 @@ const Strings_1 = require("../../system/runtime/Strings");
|
|
|
18
18
|
*/
|
|
19
19
|
/** @internal */
|
|
20
20
|
class ReadRequest {
|
|
21
|
+
/** The request to only read the geometry */
|
|
22
|
+
static READ_GEOMETRY = ReadRequest.getGeometry();
|
|
23
|
+
/** The request to only read the geometry and color */
|
|
24
|
+
static READ_GEOMETRY_AND_COLOR = ReadRequest.getGeometryAndColor();
|
|
25
|
+
/** The request to read geometry and attributes */
|
|
26
|
+
static READ_ALL = ReadRequest.getGeometryAndAttributes();
|
|
27
|
+
/** Should the geometry be read? */
|
|
28
|
+
_readGeometryAttribute;
|
|
29
|
+
/** Should the color be read? */
|
|
30
|
+
_readColorAttribute;
|
|
31
|
+
/** Should the intensity be read? */
|
|
32
|
+
_readIntensityAttribute;
|
|
33
|
+
/** Should the weight be read? */
|
|
34
|
+
_readWeightAttribute;
|
|
35
|
+
/** Should thinning be used? */
|
|
36
|
+
_thinning;
|
|
37
|
+
/** The list of extra attributes that should be read */
|
|
38
|
+
_extraAttributes;
|
|
39
|
+
/** Should the deleted points be read as well? */
|
|
40
|
+
_readDeletedAttribute;
|
|
41
|
+
/** An optional 2D area to filter */
|
|
42
|
+
_areaFilter;
|
|
43
|
+
/** The number read transactions */
|
|
44
|
+
_dataTransactions;
|
|
45
|
+
/** The number of bytes read for this request */
|
|
46
|
+
_dataSize;
|
|
47
|
+
/** The number of nanoseconds spent reading data */
|
|
48
|
+
_dataReadTime;
|
|
21
49
|
/**
|
|
22
50
|
* Create a new request to read all data (geometry and attributes) (except deleted points).
|
|
23
51
|
*/
|
|
@@ -231,10 +259,4 @@ class ReadRequest {
|
|
|
231
259
|
}
|
|
232
260
|
}
|
|
233
261
|
exports.ReadRequest = ReadRequest;
|
|
234
|
-
/** The request to only read the geometry */
|
|
235
|
-
ReadRequest.READ_GEOMETRY = ReadRequest.getGeometry();
|
|
236
|
-
/** The request to only read the geometry and color */
|
|
237
|
-
ReadRequest.READ_GEOMETRY_AND_COLOR = ReadRequest.getGeometryAndColor();
|
|
238
|
-
/** The request to read geometry and attributes */
|
|
239
|
-
ReadRequest.READ_ALL = ReadRequest.getGeometryAndAttributes();
|
|
240
262
|
//# sourceMappingURL=ReadRequest.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReadRequest.js","sourceRoot":"","sources":["../../../../src/pointcloud/model/ReadRequest.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAWH,yDAAsD;AACtD,sDAAmD;AACnD,0DAAuD;AAEvD;;;;GAIG;AACH,gBAAgB;AAChB,MAAa,WAAW;IAiCpB;;OAEG;IACH;QACI,uBAAuB;QACvB,IAAI,CAAC,sBAAsB,GAAG,IAAI,CAAC;QACnC,kCAAkC;QAClC,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC;QAChC,IAAI,CAAC,uBAAuB,GAAG,IAAI,CAAC;QACpC,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAC;QACjC,IAAI,C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---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module OrbitGT\n */\n\n//package orbitgt.pointcloud.model;\n\ntype int8 = number;\ntype int16 = number;\ntype int32 = number;\ntype float32 = number;\ntype float64 = number;\n\nimport { Bounds } from \"../../spatial/geom/Bounds\";\nimport { AList } from \"../../system/collection/AList\";\nimport { ALong } from \"../../system/runtime/ALong\";\nimport { Strings } from \"../../system/runtime/Strings\";\n\n/**\n * Class ReadRequest allows selective reading of information from a point cloud file.\n *\n * @version 1.0 December 2011\n */\n/** @internal */\nexport class ReadRequest {\n /** The request to only read the geometry */\n public static readonly READ_GEOMETRY: ReadRequest = ReadRequest.getGeometry();\n /** The request to only read the geometry and color */\n public static readonly READ_GEOMETRY_AND_COLOR: ReadRequest = ReadRequest.getGeometryAndColor();\n /** The request to read geometry and attributes */\n public static readonly READ_ALL: ReadRequest = ReadRequest.getGeometryAndAttributes();\n\n /** Should the geometry be read? */\n private _readGeometryAttribute: boolean;\n /** Should the color be read? */\n private _readColorAttribute: boolean;\n /** Should the intensity be read? */\n private _readIntensityAttribute: boolean;\n /** Should the weight be read? */\n private _readWeightAttribute: boolean;\n /** Should thinning be used? */\n private _thinning: int32;\n /** The list of extra attributes that should be read */\n private _extraAttributes: AList<string>;\n /** Should the deleted points be read as well? */\n private _readDeletedAttribute: boolean;\n\n /** An optional 2D area to filter */\n private _areaFilter: Bounds;\n\n /** The number read transactions */\n private _dataTransactions: int32;\n /** The number of bytes read for this request */\n private _dataSize: ALong;\n /** The number of nanoseconds spent reading data */\n private _dataReadTime: ALong;\n\n /**\n * Create a new request to read all data (geometry and attributes) (except deleted points).\n */\n public constructor() {\n /* Read the geometry */\n this._readGeometryAttribute = true;\n /* Read all standard attributes */\n this._readColorAttribute = true;\n this._readIntensityAttribute = true;\n this._readWeightAttribute = true;\n this._thinning = 0;\n /* Read all extra attributes */\n this._extraAttributes = new AList<string>();\n this._extraAttributes.add(\"*\");\n /* Default to not reading deleted points */\n this._readDeletedAttribute = false;\n /* Clear */\n this._areaFilter = null;\n this._dataTransactions = 0;\n this._dataSize = ALong.ZERO;\n this._dataReadTime = ALong.ZERO;\n }\n\n /**\n * Create a new request.\n * @param readColor should the color be read?\n * @param readIntensity should the intensity be read?\n * @param readWeight should the weight be read?\n * @param thinning should thinning be used?\n */\n public static create(readColor: boolean, readIntensity: boolean, readWeight: boolean, thinning: int32): ReadRequest {\n let request: ReadRequest = new ReadRequest();\n request._readColorAttribute = readColor;\n request._readIntensityAttribute = readIntensity;\n request._readWeightAttribute = readWeight;\n request._thinning = thinning;\n request._extraAttributes.clear();\n return request;\n }\n\n /**\n * Create the request to only read the geometry.\n * @return the request.\n */\n public static getGeometry(): ReadRequest {\n return ReadRequest.create(false/*color*/, false/*intensity*/, false/*weight*/, 0/*thinning*/);\n }\n\n /**\n * Create the request to only read the geometry and colot.\n * @return the request.\n */\n public static getGeometryAndColor(): ReadRequest {\n return ReadRequest.create(true/*color*/, false/*intensity*/, false/*weight*/, 0/*thinning*/);\n }\n\n /**\n * Create the request to read the full geometry and all attributes.\n * @return the request.\n */\n public static getGeometryAndAttributes(): ReadRequest {\n return new ReadRequest();\n }\n\n /**\n * Should the geometry be read?\n * @return true if it should be read.\n */\n public readGeometry(): boolean {\n return this._readGeometryAttribute;\n }\n\n /**\n * Should the geometry be read?\n * @param read true if it should be read.\n */\n public setReadGeometry(read: boolean): void {\n this._readGeometryAttribute = read;\n }\n\n /**\n * Should the color be read?\n * @return true if it should be read.\n */\n public readColor(): boolean {\n return this._readColorAttribute;\n }\n\n /**\n * Should the intensity be read?\n * @return true if it should be read.\n */\n public readIntensity(): boolean {\n return this._readIntensityAttribute;\n }\n\n /**\n * Should the weight be read?\n * @return true if it should be read.\n */\n public readWeight(): boolean {\n return this._readWeightAttribute;\n }\n\n /**\n * Should thinning be used?\n * @return the thinning factor.\n */\n public getThinning(): int32 {\n return this._thinning;\n }\n\n /**\n * Should the deleted points be read?\n * @return true if they should be read.\n */\n public readDeleted(): boolean {\n return this._readDeletedAttribute;\n }\n\n /**\n * Should the deleted points be read?\n * @param read true if they should be read.\n */\n public setReadDeleted(read: boolean): void {\n this._readDeletedAttribute = read;\n }\n\n /**\n * Should all extra attributes be read?\n * @return true if all extra attribute should be read.\n */\n public readAllExtraAttributes(): boolean {\n if (this._extraAttributes.size() != 1) return false;\n let extraAttribute: string = this._extraAttributes.get(0);\n return Strings.equals(extraAttribute, \"*\");\n }\n\n /**\n * Get the list of extra attributes to read.\n * @return the list of extra attributes to read.\n */\n public getExtraAttributes(): AList<string> {\n return this._extraAttributes;\n }\n\n /**\n * Set the list of extra attributes to read.\n * @param list the list of extra attributes to read.\n */\n public setExtraAttributes(list: AList<string>): void {\n this._extraAttributes = list;\n }\n\n /**\n * Add the name of an extra attribute to read.\n * @param attributeName the name of the attribute to read.\n * @return this request for convenient chaining.\n */\n public addExtraAttribute(attributeName: string): ReadRequest {\n this._extraAttributes.add(attributeName);\n return this;\n }\n\n /**\n * Get the area filter.\n * @return the area filter.\n */\n public getAreaFilter(): Bounds {\n return this._areaFilter;\n }\n\n /**\n * Set the area filter.\n * @param filter the new area filter.\n */\n public setAreaFilter(filter: Bounds): void {\n this._areaFilter = filter;\n }\n\n /**\n * Add a number of bytes to the data size.\n * @param size the number of bytes.\n */\n public addDataSize(size: int32): void {\n this._dataSize = this._dataSize.addInt(size);\n this._dataTransactions++;\n }\n\n /**\n * Get the data size of the request.\n * @return the number of bytes.\n */\n public getDataSize(): ALong {\n return this._dataSize;\n }\n\n /**\n * Clear the data size of the request.\n */\n public clearDataSize(): void {\n this._dataSize = ALong.ZERO;\n this._dataTransactions = 0;\n }\n\n /**\n * Get the number of data transactions.\n * @return the number of data transactions.\n */\n public getDataTransactions(): int32 {\n return this._dataTransactions;\n }\n\n /**\n * Add a number of nanoseconds to the data read time.\n * @param time the number of nanoseconds.\n */\n public addDataReadTime(time: ALong): void {\n this._dataReadTime = this._dataReadTime.add(time);\n }\n\n /**\n * Get the data read time of the request.\n * @return the number of nanoseconds.\n */\n public getDataReadTime(): ALong {\n return this._dataReadTime;\n }\n\n /**\n * Clear the data read time of the request.\n */\n public clearDataReadTime(): void {\n this._dataReadTime = ALong.ZERO;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ReadRequest.js","sourceRoot":"","sources":["../../../../src/pointcloud/model/ReadRequest.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAWH,yDAAsD;AACtD,sDAAmD;AACnD,0DAAuD;AAEvD;;;;GAIG;AACH,gBAAgB;AAChB,MAAa,WAAW;IACpB,4CAA4C;IACrC,MAAM,CAAU,aAAa,GAAgB,WAAW,CAAC,WAAW,EAAE,CAAC;IAC9E,sDAAsD;IAC/C,MAAM,CAAU,uBAAuB,GAAgB,WAAW,CAAC,mBAAmB,EAAE,CAAC;IAChG,kDAAkD;IAC3C,MAAM,CAAU,QAAQ,GAAgB,WAAW,CAAC,wBAAwB,EAAE,CAAC;IAEtF,mCAAmC;IAC3B,sBAAsB,CAAU;IACxC,gCAAgC;IACxB,mBAAmB,CAAU;IACrC,oCAAoC;IAC5B,uBAAuB,CAAU;IACzC,iCAAiC;IACzB,oBAAoB,CAAU;IACtC,+BAA+B;IACvB,SAAS,CAAQ;IACzB,uDAAuD;IAC/C,gBAAgB,CAAgB;IACxC,iDAAiD;IACzC,qBAAqB,CAAU;IAEvC,oCAAoC;IAC5B,WAAW,CAAS;IAE5B,mCAAmC;IAC3B,iBAAiB,CAAQ;IACjC,gDAAgD;IACxC,SAAS,CAAQ;IACzB,mDAAmD;IAC3C,aAAa,CAAQ;IAE7B;;OAEG;IACH;QACI,uBAAuB;QACvB,IAAI,CAAC,sBAAsB,GAAG,IAAI,CAAC;QACnC,kCAAkC;QAClC,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC;QAChC,IAAI,CAAC,uBAAuB,G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CAAC;IAED;;;;OAIG;IACI,iBAAiB,CAAC,aAAqB;QAC1C,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;QACzC,OAAO,IAAI,CAAC;IAChB,CAAC;IAED;;;OAGG;IACI,aAAa;QAChB,OAAO,IAAI,CAAC,WAAW,CAAC;IAC5B,CAAC;IAED;;;OAGG;IACI,aAAa,CAAC,MAAc;QAC/B,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC;IAC9B,CAAC;IAED;;;OAGG;IACI,WAAW,CAAC,IAAW;QAC1B,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAC7C,IAAI,CAAC,iBAAiB,EAAE,CAAC;IAC7B,CAAC;IAED;;;OAGG;IACI,WAAW;QACd,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;IAED;;OAEG;IACI,aAAa;QAChB,IAAI,CAAC,SAAS,GAAG,aAAK,CAAC,IAAI,CAAC;QAC5B,IAAI,CAAC,iBAAiB,GAAG,CAAC,CAAC;IAC/B,CAAC;IAED;;;OAGG;IACI,mBAAmB;QACtB,OAAO,IAAI,CAAC,iBAAiB,CAAC;IAClC,CAAC;IAED;;;OAGG;IACI,eAAe,CAAC,IAAW;QAC9B,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACtD,CAAC;IAED;;;OAGG;IACI,eAAe;QAClB,OAAO,IAAI,CAAC,aAAa,CAAC;IAC9B,CAAC;IAED;;OAEG;IACI,iBAAiB;QACpB,IAAI,CAAC,aAAa,GAAG,aAAK,CAAC,IAAI,CAAC;IACpC,CAAC;;AA3QL,kCA4QC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module OrbitGT\n */\n\n//package orbitgt.pointcloud.model;\n\ntype int8 = number;\ntype int16 = number;\ntype int32 = number;\ntype float32 = number;\ntype float64 = number;\n\nimport { Bounds } from \"../../spatial/geom/Bounds\";\nimport { AList } from \"../../system/collection/AList\";\nimport { ALong } from \"../../system/runtime/ALong\";\nimport { Strings } from \"../../system/runtime/Strings\";\n\n/**\n * Class ReadRequest allows selective reading of information from a point cloud file.\n *\n * @version 1.0 December 2011\n */\n/** @internal */\nexport class ReadRequest {\n /** The request to only read the geometry */\n public static readonly READ_GEOMETRY: ReadRequest = ReadRequest.getGeometry();\n /** The request to only read the geometry and color */\n public static readonly READ_GEOMETRY_AND_COLOR: ReadRequest = ReadRequest.getGeometryAndColor();\n /** The request to read geometry and attributes */\n public static readonly READ_ALL: ReadRequest = ReadRequest.getGeometryAndAttributes();\n\n /** Should the geometry be read? */\n private _readGeometryAttribute: boolean;\n /** Should the color be read? */\n private _readColorAttribute: boolean;\n /** Should the intensity be read? */\n private _readIntensityAttribute: boolean;\n /** Should the weight be read? */\n private _readWeightAttribute: boolean;\n /** Should thinning be used? */\n private _thinning: int32;\n /** The list of extra attributes that should be read */\n private _extraAttributes: AList<string>;\n /** Should the deleted points be read as well? */\n private _readDeletedAttribute: boolean;\n\n /** An optional 2D area to filter */\n private _areaFilter: Bounds;\n\n /** The number read transactions */\n private _dataTransactions: int32;\n /** The number of bytes read for this request */\n private _dataSize: ALong;\n /** The number of nanoseconds spent reading data */\n private _dataReadTime: ALong;\n\n /**\n * Create a new request to read all data (geometry and attributes) (except deleted points).\n */\n public constructor() {\n /* Read the geometry */\n this._readGeometryAttribute = true;\n /* Read all standard attributes */\n this._readColorAttribute = true;\n this._readIntensityAttribute = true;\n this._readWeightAttribute = true;\n this._thinning = 0;\n /* Read all extra attributes */\n this._extraAttributes = new AList<string>();\n this._extraAttributes.add(\"*\");\n /* Default to not reading deleted points */\n this._readDeletedAttribute = false;\n /* Clear */\n this._areaFilter = null;\n this._dataTransactions = 0;\n this._dataSize = ALong.ZERO;\n this._dataReadTime = ALong.ZERO;\n }\n\n /**\n * Create a new request.\n * @param readColor should the color be read?\n * @param readIntensity should the intensity be read?\n * @param readWeight should the weight be read?\n * @param thinning should thinning be used?\n */\n public static create(readColor: boolean, readIntensity: boolean, readWeight: boolean, thinning: int32): ReadRequest {\n let request: ReadRequest = new ReadRequest();\n request._readColorAttribute = readColor;\n request._readIntensityAttribute = readIntensity;\n request._readWeightAttribute = readWeight;\n request._thinning = thinning;\n request._extraAttributes.clear();\n return request;\n }\n\n /**\n * Create the request to only read the geometry.\n * @return the request.\n */\n public static getGeometry(): ReadRequest {\n return ReadRequest.create(false/*color*/, false/*intensity*/, false/*weight*/, 0/*thinning*/);\n }\n\n /**\n * Create the request to only read the geometry and colot.\n * @return the request.\n */\n public static getGeometryAndColor(): ReadRequest {\n return ReadRequest.create(true/*color*/, false/*intensity*/, false/*weight*/, 0/*thinning*/);\n }\n\n /**\n * Create the request to read the full geometry and all attributes.\n * @return the request.\n */\n public static getGeometryAndAttributes(): ReadRequest {\n return new ReadRequest();\n }\n\n /**\n * Should the geometry be read?\n * @return true if it should be read.\n */\n public readGeometry(): boolean {\n return this._readGeometryAttribute;\n }\n\n /**\n * Should the geometry be read?\n * @param read true if it should be read.\n */\n public setReadGeometry(read: boolean): void {\n this._readGeometryAttribute = read;\n }\n\n /**\n * Should the color be read?\n * @return true if it should be read.\n */\n public readColor(): boolean {\n return this._readColorAttribute;\n }\n\n /**\n * Should the intensity be read?\n * @return true if it should be read.\n */\n public readIntensity(): boolean {\n return this._readIntensityAttribute;\n }\n\n /**\n * Should the weight be read?\n * @return true if it should be read.\n */\n public readWeight(): boolean {\n return this._readWeightAttribute;\n }\n\n /**\n * Should thinning be used?\n * @return the thinning factor.\n */\n public getThinning(): int32 {\n return this._thinning;\n }\n\n /**\n * Should the deleted points be read?\n * @return true if they should be read.\n */\n public readDeleted(): boolean {\n return this._readDeletedAttribute;\n }\n\n /**\n * Should the deleted points be read?\n * @param read true if they should be read.\n */\n public setReadDeleted(read: boolean): void {\n this._readDeletedAttribute = read;\n }\n\n /**\n * Should all extra attributes be read?\n * @return true if all extra attribute should be read.\n */\n public readAllExtraAttributes(): boolean {\n if (this._extraAttributes.size() != 1) return false;\n let extraAttribute: string = this._extraAttributes.get(0);\n return Strings.equals(extraAttribute, \"*\");\n }\n\n /**\n * Get the list of extra attributes to read.\n * @return the list of extra attributes to read.\n */\n public getExtraAttributes(): AList<string> {\n return this._extraAttributes;\n }\n\n /**\n * Set the list of extra attributes to read.\n * @param list the list of extra attributes to read.\n */\n public setExtraAttributes(list: AList<string>): void {\n this._extraAttributes = list;\n }\n\n /**\n * Add the name of an extra attribute to read.\n * @param attributeName the name of the attribute to read.\n * @return this request for convenient chaining.\n */\n public addExtraAttribute(attributeName: string): ReadRequest {\n this._extraAttributes.add(attributeName);\n return this;\n }\n\n /**\n * Get the area filter.\n * @return the area filter.\n */\n public getAreaFilter(): Bounds {\n return this._areaFilter;\n }\n\n /**\n * Set the area filter.\n * @param filter the new area filter.\n */\n public setAreaFilter(filter: Bounds): void {\n this._areaFilter = filter;\n }\n\n /**\n * Add a number of bytes to the data size.\n * @param size the number of bytes.\n */\n public addDataSize(size: int32): void {\n this._dataSize = this._dataSize.addInt(size);\n this._dataTransactions++;\n }\n\n /**\n * Get the data size of the request.\n * @return the number of bytes.\n */\n public getDataSize(): ALong {\n return this._dataSize;\n }\n\n /**\n * Clear the data size of the request.\n */\n public clearDataSize(): void {\n this._dataSize = ALong.ZERO;\n this._dataTransactions = 0;\n }\n\n /**\n * Get the number of data transactions.\n * @return the number of data transactions.\n */\n public getDataTransactions(): int32 {\n return this._dataTransactions;\n }\n\n /**\n * Add a number of nanoseconds to the data read time.\n * @param time the number of nanoseconds.\n */\n public addDataReadTime(time: ALong): void {\n this._dataReadTime = this._dataReadTime.add(time);\n }\n\n /**\n * Get the data read time of the request.\n * @return the number of nanoseconds.\n */\n public getDataReadTime(): ALong {\n return this._dataReadTime;\n }\n\n /**\n * Clear the data read time of the request.\n */\n public clearDataReadTime(): void {\n this._dataReadTime = ALong.ZERO;\n }\n}\n"]}
|
|
@@ -18,31 +18,31 @@ const PointAttribute_1 = require("./PointAttribute");
|
|
|
18
18
|
*/
|
|
19
19
|
/** @internal */
|
|
20
20
|
class StandardAttributes {
|
|
21
|
+
/** The standard "color" attribute */
|
|
22
|
+
static COLOR = new PointAttribute_1.PointAttribute("Color", "The RGB color", AttributeTypes_1.AttributeTypes.TYPE_COLOR, AttributeValue_1.AttributeValue.createColor(0));
|
|
23
|
+
/** The standard "intensity" attribute */
|
|
24
|
+
static INTENSITY = new PointAttribute_1.PointAttribute("Intensity", "The reflection intensity", AttributeTypes_1.AttributeTypes.TYPE_INT2, AttributeValue_1.AttributeValue.createInt2(0));
|
|
25
|
+
/** The standard "gps-time" attribute */
|
|
26
|
+
static GPS_TIME = new PointAttribute_1.PointAttribute("GPSTime", "The registration time of the point", AttributeTypes_1.AttributeTypes.TYPE_FLOAT8, AttributeValue_1.AttributeValue.createFloat8(0.0));
|
|
27
|
+
/** The standard "weight" attribute */
|
|
28
|
+
static WEIGHT = new PointAttribute_1.PointAttribute("Weight", "The weight of a multi-resolution point", AttributeTypes_1.AttributeTypes.TYPE_INT4, AttributeValue_1.AttributeValue.createInt4(0));
|
|
29
|
+
/** The standard "clearance" attribute */
|
|
30
|
+
static CLEARANCE = new PointAttribute_1.PointAttribute("Clearance", "The vertical clearance of a bridge or road", AttributeTypes_1.AttributeTypes.TYPE_FLOAT4, AttributeValue_1.AttributeValue.createFloat4(0.0));
|
|
31
|
+
/** The standard "rutting" attribute */
|
|
32
|
+
static RUTTING = new PointAttribute_1.PointAttribute("Rutting", "The road deformation angle", AttributeTypes_1.AttributeTypes.TYPE_FLOAT4, AttributeValue_1.AttributeValue.createFloat4(0.0)); // range 0..90 deg
|
|
33
|
+
/** The standard "color-by" attribute */
|
|
34
|
+
static COLOR_BY = new PointAttribute_1.PointAttribute("ColorBy", "The attribute to modulate the point colors", AttributeTypes_1.AttributeTypes.TYPE_FLOAT4, AttributeValue_1.AttributeValue.createFloat4(0.0));
|
|
35
|
+
/** The default "gps-time" attribute value */
|
|
36
|
+
static DEFAULT_GPS_TIME = AttributeValue_1.AttributeValue.createFloat8(0.0);
|
|
37
|
+
/** The "adjusted" gps time offset (The offset moves the time back to near zero to improve floating point resolution).
|
|
38
|
+
See the "GPS Time Type" field in "LAS SPECIFICATION VERSION 1.3" */
|
|
39
|
+
static GPS_TIME_OFFSET = 1.0e9;
|
|
40
|
+
/** The number of seconds in a week (7*24*3600) */
|
|
41
|
+
static GPS_WEEK_SECONDS = 604800.0;
|
|
21
42
|
/**
|
|
22
43
|
* No instances.
|
|
23
44
|
*/
|
|
24
45
|
constructor() { }
|
|
25
46
|
}
|
|
26
47
|
exports.StandardAttributes = StandardAttributes;
|
|
27
|
-
/** The standard "color" attribute */
|
|
28
|
-
StandardAttributes.COLOR = new PointAttribute_1.PointAttribute("Color", "The RGB color", AttributeTypes_1.AttributeTypes.TYPE_COLOR, AttributeValue_1.AttributeValue.createColor(0));
|
|
29
|
-
/** The standard "intensity" attribute */
|
|
30
|
-
StandardAttributes.INTENSITY = new PointAttribute_1.PointAttribute("Intensity", "The reflection intensity", AttributeTypes_1.AttributeTypes.TYPE_INT2, AttributeValue_1.AttributeValue.createInt2(0));
|
|
31
|
-
/** The standard "gps-time" attribute */
|
|
32
|
-
StandardAttributes.GPS_TIME = new PointAttribute_1.PointAttribute("GPSTime", "The registration time of the point", AttributeTypes_1.AttributeTypes.TYPE_FLOAT8, AttributeValue_1.AttributeValue.createFloat8(0.0));
|
|
33
|
-
/** The standard "weight" attribute */
|
|
34
|
-
StandardAttributes.WEIGHT = new PointAttribute_1.PointAttribute("Weight", "The weight of a multi-resolution point", AttributeTypes_1.AttributeTypes.TYPE_INT4, AttributeValue_1.AttributeValue.createInt4(0));
|
|
35
|
-
/** The standard "clearance" attribute */
|
|
36
|
-
StandardAttributes.CLEARANCE = new PointAttribute_1.PointAttribute("Clearance", "The vertical clearance of a bridge or road", AttributeTypes_1.AttributeTypes.TYPE_FLOAT4, AttributeValue_1.AttributeValue.createFloat4(0.0));
|
|
37
|
-
/** The standard "rutting" attribute */
|
|
38
|
-
StandardAttributes.RUTTING = new PointAttribute_1.PointAttribute("Rutting", "The road deformation angle", AttributeTypes_1.AttributeTypes.TYPE_FLOAT4, AttributeValue_1.AttributeValue.createFloat4(0.0)); // range 0..90 deg
|
|
39
|
-
/** The standard "color-by" attribute */
|
|
40
|
-
StandardAttributes.COLOR_BY = new PointAttribute_1.PointAttribute("ColorBy", "The attribute to modulate the point colors", AttributeTypes_1.AttributeTypes.TYPE_FLOAT4, AttributeValue_1.AttributeValue.createFloat4(0.0));
|
|
41
|
-
/** The default "gps-time" attribute value */
|
|
42
|
-
StandardAttributes.DEFAULT_GPS_TIME = AttributeValue_1.AttributeValue.createFloat8(0.0);
|
|
43
|
-
/** The "adjusted" gps time offset (The offset moves the time back to near zero to improve floating point resolution).
|
|
44
|
-
See the "GPS Time Type" field in "LAS SPECIFICATION VERSION 1.3" */
|
|
45
|
-
StandardAttributes.GPS_TIME_OFFSET = 1.0e9;
|
|
46
|
-
/** The number of seconds in a week (7*24*3600) */
|
|
47
|
-
StandardAttributes.GPS_WEEK_SECONDS = 604800.0;
|
|
48
48
|
//# sourceMappingURL=StandardAttributes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StandardAttributes.js","sourceRoot":"","sources":["../../../../src/pointcloud/model/StandardAttributes.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAUH,qDAAkD;AAClD,qDAAkD;AAClD,qDAAkD;AAElD;;;;GAIG;AACH,gBAAgB;AAChB,MAAa,kBAAkB;
|
|
1
|
+
{"version":3,"file":"StandardAttributes.js","sourceRoot":"","sources":["../../../../src/pointcloud/model/StandardAttributes.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAUH,qDA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,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC;IAE5L,6CAA6C;IACtC,MAAM,CAAU,gBAAgB,GAAmB,+BAAc,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;IAE3F;2EACuE;IAChE,MAAM,CAAU,eAAe,GAAY,KAAK,CAAC;IACxD,kDAAkD;IAC3C,MAAM,CAAU,gBAAgB,GAAY,QAAQ,CAAC;IAE5D;;OAEG;IACH,gBAAwB,CAAC;;AA5B7B,gDA6BC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module OrbitGT\n */\n\n//package orbitgt.pointcloud.model;\n\ntype int8 = number;\ntype int16 = number;\ntype int32 = number;\ntype float32 = number;\ntype float64 = number;\n\nimport { AttributeTypes } from \"./AttributeTypes\";\nimport { AttributeValue } from \"./AttributeValue\";\nimport { PointAttribute } from \"./PointAttribute\";\n\n/**\n * Class StandardAttributes defines some common attributes for pointclouds.\n *\n * @version 1.0 October 2013\n */\n/** @internal */\nexport class StandardAttributes {\n /** The standard \"color\" attribute */\n public static readonly COLOR: PointAttribute = new PointAttribute(\"Color\", \"The RGB color\", AttributeTypes.TYPE_COLOR, AttributeValue.createColor(0));\n /** The standard \"intensity\" attribute */\n public static readonly INTENSITY: PointAttribute = new PointAttribute(\"Intensity\", \"The reflection intensity\", AttributeTypes.TYPE_INT2, AttributeValue.createInt2(0));\n /** The standard \"gps-time\" attribute */\n public static readonly GPS_TIME: PointAttribute = new PointAttribute(\"GPSTime\", \"The registration time of the point\", AttributeTypes.TYPE_FLOAT8, AttributeValue.createFloat8(0.0));\n /** The standard \"weight\" attribute */\n public static readonly WEIGHT: PointAttribute = new PointAttribute(\"Weight\", \"The weight of a multi-resolution point\", AttributeTypes.TYPE_INT4, AttributeValue.createInt4(0));\n /** The standard \"clearance\" attribute */\n public static readonly CLEARANCE: PointAttribute = new PointAttribute(\"Clearance\", \"The vertical clearance of a bridge or road\", AttributeTypes.TYPE_FLOAT4, AttributeValue.createFloat4(0.0));\n /** The standard \"rutting\" attribute */\n public static readonly RUTTING: PointAttribute = new PointAttribute(\"Rutting\", \"The road deformation angle\", AttributeTypes.TYPE_FLOAT4, AttributeValue.createFloat4(0.0)); // range 0..90 deg\n /** The standard \"color-by\" attribute */\n public static readonly COLOR_BY: PointAttribute = new PointAttribute(\"ColorBy\", \"The attribute to modulate the point colors\", AttributeTypes.TYPE_FLOAT4, AttributeValue.createFloat4(0.0));\n\n /** The default \"gps-time\" attribute value */\n public static readonly DEFAULT_GPS_TIME: AttributeValue = AttributeValue.createFloat8(0.0);\n\n /** The \"adjusted\" gps time offset (The offset moves the time back to near zero to improve floating point resolution).\n See the \"GPS Time Type\" field in \"LAS SPECIFICATION VERSION 1.3\" */\n public static readonly GPS_TIME_OFFSET: float64 = 1.0e9;\n /** The number of seconds in a week (7*24*3600) */\n public static readonly GPS_WEEK_SECONDS: float64 = 604800.0;\n\n /**\n * No instances.\n */\n private constructor() { }\n}\n"]}
|
|
@@ -15,6 +15,22 @@ exports.TileIndex = void 0;
|
|
|
15
15
|
*/
|
|
16
16
|
/** @internal */
|
|
17
17
|
class TileIndex {
|
|
18
|
+
/** The level */
|
|
19
|
+
level;
|
|
20
|
+
/** The unique key of the block */
|
|
21
|
+
key;
|
|
22
|
+
/** The index of the tile in the level */
|
|
23
|
+
index;
|
|
24
|
+
/** The grid index */
|
|
25
|
+
gridIndex;
|
|
26
|
+
/** The index of the first point in the tile (derived) */
|
|
27
|
+
pointIndex;
|
|
28
|
+
/** The point count */
|
|
29
|
+
pointCount;
|
|
30
|
+
/** The children */
|
|
31
|
+
children;
|
|
32
|
+
/** The last access time */
|
|
33
|
+
accessTime;
|
|
18
34
|
/**
|
|
19
35
|
* Create a new index.
|
|
20
36
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TileIndex.js","sourceRoot":"","sources":["../../../../src/pointcloud/model/TileIndex.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAcH;;;;GAIG;AACH,gBAAgB;AAChB,MAAa,SAAS;
|
|
1
|
+
{"version":3,"file":"TileIndex.js","sourceRoot":"","sources":["../../../../src/pointcloud/model/TileIndex.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAcH;;;;GAIG;AACH,gBAAgB;AAChB,MAAa,SAAS;IAClB,gBAAgB;IACT,KAAK,CAAQ;IACpB,kCAAkC;IAC3B,GAAG,CAAS;IACnB,yCAAyC;IAClC,KAAK,CAAQ;IACpB,qBAAqB;IACd,SAAS,CAAY;IAC5B,yDAAyD;IAClD,UAAU,CAAQ;IACzB,sBAAsB;IACf,UAAU,CAAQ;IACzB,mBAAmB;IACZ,QAAQ,CAAmB;IAClC,2BAA2B;IACpB,UAAU,CAAU;IAE3B;;OAEG;IACH,YAAmB,KAAY,EAAE,KAAY,EAAE,SAAoB,EAAE,UAAiB,EAAE,UAAiB;QACrG,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QACrB,IAAI,CAAC,UAAU,GAAG,GAAG,CAAC;QACtB,IAAI,CAAC,GAAG,GAAG,CAAC,GAAG,GAAG,IAAI,CAAC,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;IACvD,CAAC;IAED;;;;OAIG;IACI,IAAI,CAAC,KAAgB;QACxB,OAAO,CAAC,KAAK,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC;IACtE,CAAC;IAED;;;OAGG;IACI,MAAM;QACT,OAAO,GAAG,GAAG,IAAI,CAAC,KAAK,GAAG,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;IACvG,CAAC;CACJ;AAhDD,8BAgDC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module OrbitGT\n */\n\n//package orbitgt.pointcloud.model;\n\ntype int8 = number;\ntype int16 = number;\ntype int32 = number;\ntype float32 = number;\ntype float64 = number;\n\n\nimport { ALong } from \"../../system/runtime/ALong\";\nimport { GridIndex } from \"./GridIndex\";\n\n/**\n * Class TileIndex defines a tile index in a pointcloud file.\n *\n * @version 1.0 January 2014\n */\n/** @internal */\nexport class TileIndex {\n /** The level */\n public level: int32;\n /** The unique key of the block */\n public key: string;\n /** The index of the tile in the level */\n public index: int32;\n /** The grid index */\n public gridIndex: GridIndex;\n /** The index of the first point in the tile (derived) */\n public pointIndex: ALong;\n /** The point count */\n public pointCount: int32;\n /** The children */\n public children: Array<TileIndex>;\n /** The last access time */\n public accessTime: float64;\n\n /**\n * Create a new index.\n */\n public constructor(level: int32, index: int32, gridIndex: GridIndex, pointIndex: ALong, pointCount: int32) {\n this.level = level;\n this.index = index;\n this.gridIndex = gridIndex;\n this.pointIndex = pointIndex;\n this.pointCount = pointCount;\n this.children = null;\n this.accessTime = 0.0;\n this.key = (\"L\" + this.level + \",T:\" + this.index);\n }\n\n /**\n * Check if two indexes are the same.\n * @param other another index.\n * @return true if same.\n */\n public same(other: TileIndex): boolean {\n return (other.level == this.level) && (other.index == this.index);\n }\n\n /**\n * Get the unique key of the tile in the pointcloud file.\n * @return the unique key (combines level and grid index).\n */\n public getKey(): string {\n return \"T\" + this.level + \"/\" + this.gridIndex.x + \"/\" + this.gridIndex.y + \"/\" + this.gridIndex.z;\n }\n}\n"]}
|
|
@@ -16,6 +16,12 @@ const IntMap_1 = require("../../system/collection/IntMap");
|
|
|
16
16
|
*/
|
|
17
17
|
/** @internal */
|
|
18
18
|
class Block {
|
|
19
|
+
/** The index of the block */
|
|
20
|
+
_index;
|
|
21
|
+
/** The full list of tiles in the block (can be null if the tile-list has not been loaded) */
|
|
22
|
+
_tileList;
|
|
23
|
+
/** The map of tiles in the block */
|
|
24
|
+
_tileMap;
|
|
19
25
|
/**
|
|
20
26
|
* Create a new block.
|
|
21
27
|
* @param index the index of the block.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Block.js","sourceRoot":"","sources":["../../../../src/pointcloud/render/Block.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAYH,2DAAwD;AAMxD;;;;GAIG;AACH,gBAAgB;AAChB,MAAa,KAAK;
|
|
1
|
+
{"version":3,"file":"Block.js","sourceRoot":"","sources":["../../../../src/pointcloud/render/Block.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAYH,2DAAwD;AAMxD;;;;GAIG;AACH,gBAAgB;AAChB,MAAa,KAAK;IACjB,6BAA6B;IACrB,MAAM,CAAa;IAC3B,6FAA6F;IACrF,SAAS,CAAmB;IACpC,oCAAoC;IAC5B,QAAQ,CAAoC;IAEpD;;;OAGG;IACH,YAAmB,KAAiB;QACnC,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;QACtB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;IACtB,CAAC;IAED;;;OAGG;IACI,aAAa;QACnB,OAAO,IAAI,CAAC,MAAM,CAAC;IACpB,CAAC;IAED;;;;OAIG;IACI,cAAc,CAAC,KAAY;QACjC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C;YACxB,CAAC;YACD,IAAI,KAAK,GAAU,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;YACpC,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;QACvB,CAAC;IACF,CAAC;IAED;;;OAGG;IACI,QAAQ;QACd,OAAO,CAAC,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,CAAC;IACjC,CAAC;IAED;;;;OAIG;IACI,QAAQ,CAAC,YAA+B;QAC9C,IAAI,IAAI,CAAC,SAAS,IAAI,IAAI,EAAE,CAAC;YAC5B,KAAK,CAAC,aAAa,CAAC,YAAY,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;YAC/C,OAAO,IAAI,CAAC;QACb,CAAC;QACD,OAAO,IAAI,CAAC,SAAS,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACI,QAAQ,CAAC,aAAwB;QACvC,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI;YAAE,OAAO,IAAI,CAAC;QACvC,IAAI,KAAK,GAAU,aAAa,CAAC,CAAC,CAAC;QACnC,IAAI,KAAK,GAA8B,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QAChE,IAAI,KAAK,IAAI,IAAI;YAAE,OAAO,IAAI,CAAC;QAC/B,IAAI,KAAK,GAAU,aAAa,CAAC,CAAC,CAAC;QACnC,IAAI,IAAI,GAAsB,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QAC/C,IAAI,IAAI,IAAI,IAAI;YAAE,OAAO,IAAI,CAAC;QAC9B,IAAI,KAAK,GAAU,aAAa,CAAC,CAAC,CAAC;QACnC,OAAO,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACxB,CAAC;CACD;AA7GD,sBA6GC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module OrbitGT\n */\n\n//package orbitgt.pointcloud.render;\n\ntype int8 = number;\ntype int16 = number;\ntype int32 = number;\ntype float32 = number;\ntype float64 = number;\n\nimport { Bounds } from \"../../spatial/geom/Bounds\";\nimport { AList } from \"../../system/collection/AList\";\nimport { IntMap } from \"../../system/collection/IntMap\";\nimport { BlockIndex } from \"../model/BlockIndex\";\nimport { GridIndex } from \"../model/GridIndex\";\nimport { TileIndex } from \"../model/TileIndex\";\nimport { Level } from \"./Level\";\n\n/**\n * Class Block defines a block of tiles.\n *\n * @version 1.0 November 2015\n */\n/** @internal */\nexport class Block {\n\t/** The index of the block */\n\tprivate _index: BlockIndex;\n\t/** The full list of tiles in the block (can be null if the tile-list has not been loaded) */\n\tprivate _tileList: Array<TileIndex>;\n\t/** The map of tiles in the block */\n\tprivate _tileMap: IntMap<IntMap<IntMap<TileIndex>>>;\n\n\t/**\n\t * Create a new block.\n\t * @param index the index of the block.\n\t */\n\tpublic constructor(index: BlockIndex) {\n\t\tthis._index = index;\n\t\tthis._tileList = null;\n\t\tthis._tileMap = null;\n\t}\n\n\t/**\n\t * Get the index of the block.\n\t * @return the index of the block.\n\t */\n\tpublic getBlockIndex(): BlockIndex {\n\t\treturn this._index;\n\t}\n\n\t/**\n\t * Get the spatial bounds of the block.\n\t * @param level the level to which the block belongs.\n\t * @return the spatial bounds of the block.\n\t */\n\tpublic getBlockBounds(level: Level): Bounds {\n\t\treturn level.getBlockGrid().getCellBounds(this._index.gridIndex);\n\t}\n\n\t/**\n\t * Add a block to the list of blocks to load.\n * @param blocksToLoad the list of blocks to load.\n * @param block the block to add.\n */\n\tprivate static addToLoadList(blocksToLoad: AList<BlockIndex>, block: BlockIndex): void {\n\t\tfor (let i: number = 0; i < blocksToLoad.size(); i++) if (blocksToLoad.get(i).same(block)) return;\n\t\tblocksToLoad.add(block);\n\t}\n\n\t/**\n\t * Set the tiles in the block.\n\t * @param tileList the list of tiles.\n\t */\n\tpublic setTiles(tileList: Array<TileIndex>): void {\n\t\t/* Store the list */\n\t\tthis._tileList = tileList;\n\t\t/* Make the map */\n\t\tthis._tileMap = new IntMap<IntMap<IntMap<TileIndex>>>();\n\t\tfor (let tile of this._tileList) {\n\t\t\tlet tileX: int32 = tile.gridIndex.x;\n\t\t\tlet yzMap: IntMap<IntMap<TileIndex>> = this._tileMap.get(tileX);\n\t\t\tif (yzMap == null) {\n\t\t\t\tyzMap = new IntMap<IntMap<TileIndex>>();\n\t\t\t\tthis._tileMap.set(tileX, yzMap);\n\t\t\t}\n\t\t\tlet tileY: int32 = tile.gridIndex.y;\n\t\t\tlet zMap: IntMap<TileIndex> = yzMap.get(tileY);\n\t\t\tif (zMap == null) {\n\t\t\t\tzMap = new IntMap<TileIndex>();\n\t\t\t\tyzMap.set(tileY, zMap);\n\t\t\t}\n\t\t\tlet tileZ: int32 = tile.gridIndex.z;\n\t\t\tzMap.set(tileZ, tile);\n\t\t}\n\t}\n\n\t/**\n\t * Have the tiles been set?\n\t * @return true if the tiles have been set.\n\t */\n\tpublic hasTiles(): boolean {\n\t\treturn (this._tileList != null);\n\t}\n\n\t/**\n\t * List all tiles.\n * @param blocksToLoad the list of blocks to load.\n\t * @return all tiles (null if tiles are not loaded).\n\t */\n\tpublic getTiles(blocksToLoad: AList<BlockIndex>): Array<TileIndex> {\n\t\tif (this._tileList == null) {\n\t\t\tBlock.addToLoadList(blocksToLoad, this._index);\n\t\t\treturn null;\n\t\t}\n\t\treturn this._tileList;\n\t}\n\n\t/**\n\t * Find a tile.\n * @param tileGridIndex the grid index of the tile.\n\t * @return the tile (null if not found).\n\t */\n\tpublic findTile(tileGridIndex: GridIndex): TileIndex {\n\t\tif (this._tileMap == null) return null;\n\t\tlet tileX: int32 = tileGridIndex.x;\n\t\tlet yzMap: IntMap<IntMap<TileIndex>> = this._tileMap.get(tileX);\n\t\tif (yzMap == null) return null;\n\t\tlet tileY: int32 = tileGridIndex.y;\n\t\tlet zMap: IntMap<TileIndex> = yzMap.get(tileY);\n\t\tif (zMap == null) return null;\n\t\tlet tileZ: int32 = tileGridIndex.z;\n\t\treturn zMap.get(tileZ);\n\t}\n}\n"]}
|
|
@@ -24,6 +24,42 @@ const ViewTree_1 = require("./ViewTree");
|
|
|
24
24
|
*/
|
|
25
25
|
/** @internal */
|
|
26
26
|
class DataManager {
|
|
27
|
+
/** The name of this module */
|
|
28
|
+
static MODULE = "DataManager";
|
|
29
|
+
/** The maximum size of a single file-content request */
|
|
30
|
+
static MAX_FILE_CONTENT_SIZE = 128 * 1024;
|
|
31
|
+
/** The expire time to unload unused point data (seconds) */
|
|
32
|
+
static POINT_DATA_EXIRE_TIME = 5 * 60.0;
|
|
33
|
+
/** The reader of the pointcloud */
|
|
34
|
+
_pointCloudReader;
|
|
35
|
+
/*** The CRS of the pointcloud */
|
|
36
|
+
_pointCloudCRS;
|
|
37
|
+
/** The data format to read */
|
|
38
|
+
_dataFormat;
|
|
39
|
+
/** The spatial index */
|
|
40
|
+
_fileTileIndex;
|
|
41
|
+
/** The data pool */
|
|
42
|
+
_dataPool;
|
|
43
|
+
/** The set of levels we requested (index) */
|
|
44
|
+
_levelsLoading;
|
|
45
|
+
/** The set of levels we received (index) */
|
|
46
|
+
_levelsLoaded;
|
|
47
|
+
/** The set of blocks we requested (key) */
|
|
48
|
+
_blocksLoading;
|
|
49
|
+
/** The set of blocks we received (key) */
|
|
50
|
+
_blocksLoaded;
|
|
51
|
+
/** The set of tiles we requested (key) */
|
|
52
|
+
_tilesLoading;
|
|
53
|
+
/** The set of tiles we received (key) */
|
|
54
|
+
_tilesLoaded;
|
|
55
|
+
/** Is new data being loaded? */
|
|
56
|
+
_loadingData;
|
|
57
|
+
/** The time when the data loading stopped */
|
|
58
|
+
_loadedDataTime;
|
|
59
|
+
/** The total size of data that has been loaded */
|
|
60
|
+
_dataLoadSize;
|
|
61
|
+
/** The last garbage collection time */
|
|
62
|
+
_lastGarbageCollectTime;
|
|
27
63
|
/**
|
|
28
64
|
* Create a new data model (to be shared between different views).
|
|
29
65
|
* @param pointCloudReader the reader of the pointcloud file.
|
|
@@ -334,10 +370,4 @@ class DataManager {
|
|
|
334
370
|
}
|
|
335
371
|
}
|
|
336
372
|
exports.DataManager = DataManager;
|
|
337
|
-
/** The name of this module */
|
|
338
|
-
DataManager.MODULE = "DataManager";
|
|
339
|
-
/** The maximum size of a single file-content request */
|
|
340
|
-
DataManager.MAX_FILE_CONTENT_SIZE = 128 * 1024;
|
|
341
|
-
/** The expire time to unload unused point data (seconds) */
|
|
342
|
-
DataManager.POINT_DATA_EXIRE_TIME = 5 * 60.0;
|
|
343
373
|
//# sourceMappingURL=DataManager.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataManager.js","sourceRoot":"","sources":["../../../../src/pointcloud/render/DataManager.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAYH,yDAAsD;AACtD,iEAA8D;AAC9D,sDAAmD;AACnD,0DAAuD;AACvD,0DAAuD;AACvD,sEAAmE;AAMnE,mCAAgC;AAEhC,mCAAgC;AAChC,yCAAsC;AAEtC;;;;GAIG;AACH,gBAAgB;AAChB,MAAa,WAAW;IA0CvB;;;;;OAKG;IACH,YAAmB,gBAAkC,EAAE,aAAqB,EAAE,UAAiB;QAC9F,0BAA0B;QAC1B,IAAI,CAAC,iBAAiB,GAAG,gBAAgB,CAAC;QAC1C,IAAI,CAAC,cAAc,GAAG,aAAa,CAAC;QACpC,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;QAC9B,gBAAgB;QAChB,IAAI,IAAI,CAAC,cAAc,IAAI,IAAI;YAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,iBAAiB,CAAC,UAAU,EAAE,CAAC;QAC3F,WAAW;QACX,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,kBAAkB,EAAE,CAAC;QAChD,IAAI,CAAC,SAAS,GAAG,IAAI,qBAAS,EAAa,CAAC;QAC5C,IAAI,CAAC,cAAc,GA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AC;QAC7E,gCAAgC;QAChC,IAAI,IAAI,GAAG,IAAI,CAAC,uBAAuB,GAAG,IAAI;YAAE,OAAO;QACvD,IAAI,CAAC,uBAAuB,GAAG,IAAI,CAAC;QACpC,4BAA4B;QAC5B,IAAI,UAAU,GAAY,CAAC,IAAI,GAAG,WAAW,CAAC,qBAAqB,CAAC,CAAC;QACrE,4BAA4B;QAC5B,IAAI,SAAS,GAAU,CAAC,CAAC;QACzB,IAAI,QAAQ,GAAkB,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;QACpD,KAAK,IAAI,CAAC,GAAW,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC;YAClD,uBAAuB;YACvB,IAAI,OAAO,GAAW,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YACtC,IAAI,SAAS,GAAc,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;YACvD,cAAc;YACd,IAAI,SAAS,CAAC,SAAS,CAAC,UAAU,GAAG,UAAU,EAAE,CAAC;gBACjD,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;gBAC/B,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;gBAClC,SAAS,EAAE,CAAC;YACb,CAAC;QACF,CAAC;QACD,UAAU;QACV,IAAI,SAAS,GAAG,CAAC;YAAE,iBAAO,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,EAAE,4BAA4B,GAAG,SAAS,GAAG,QAAQ,CAAC,CAAC;IAC3G,CAAC;;AA5VF,kCA6VC;AA5VA,8BAA8B;AACN,kBAAM,GAAW,aAAa,CAAC;AAEvD,wDAAwD;AAChC,iCAAqB,GAAU,GAAG,GAAG,IAAI,CAAC;AAClE,4DAA4D;AACpC,iCAAqB,GAAY,CAAC,GAAG,IAAI,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module OrbitGT\n */\n\n//package orbitgt.pointcloud.render;\n\ntype int8 = number;\ntype int16 = number;\ntype int32 = number;\ntype float32 = number;\ntype float64 = number;\n\nimport { Bounds } from \"../../spatial/geom/Bounds\";\nimport { Transform } from \"../../spatial/geom/Transform\";\nimport { AList } from \"../../system/collection/AList\";\nimport { StringMap } from \"../../system/collection/StringMap\";\nimport { ALong } from \"../../system/runtime/ALong\";\nimport { ASystem } from \"../../system/runtime/ASystem\";\nimport { Message } from \"../../system/runtime/Message\";\nimport { ContentLoader } from \"../../system/storage/ContentLoader\";\nimport { BlockIndex } from \"../model/BlockIndex\";\nimport { Grid } from \"../model/Grid\";\nimport { PointCloudReader } from \"../model/PointCloudReader\";\nimport { PointData } from \"../model/PointData\";\nimport { TileIndex } from \"../model/TileIndex\";\nimport { Block } from \"./Block\";\nimport { FrameData } from \"./FrameData\";\nimport { Level } from \"./Level\";\nimport { ViewTree } from \"./ViewTree\";\n\n/**\n * Class DataManager manages the (shared) data model part of the rendering in multiple layers (see the CLOUD-461 issue).\n *\n * @version 1.0 December 2017\n */\n/** @internal */\nexport class DataManager {\n\t/** The name of this module */\n\tprivate static readonly MODULE: string = \"DataManager\";\n\n\t/** The maximum size of a single file-content request */\n\tprivate static readonly MAX_FILE_CONTENT_SIZE: int32 = 128 * 1024;\n\t/** The expire time to unload unused point data (seconds) */\n\tprivate static readonly POINT_DATA_EXIRE_TIME: float64 = 5 * 60.0;\n\n\t/** The reader of the pointcloud */\n\tprivate _pointCloudReader: PointCloudReader;\n\t/*** The CRS of the pointcloud */\n\tprivate _pointCloudCRS: string;\n\t/** The data format to read */\n\tprivate _dataFormat: int32;\n\n\t/** The spatial index */\n\tprivate _fileTileIndex: ViewTree;\n\t/** The data pool */\n\tprivate _dataPool: StringMap<PointData>;\n\t/** The set of levels we requested (index) */\n\tprivate _levelsLoading: StringMap<Level>;\n\t/** The set of levels we received (index) */\n\tprivate _levelsLoaded: StringMap<Level>;\n\t/** The set of blocks we requested (key) */\n\tprivate _blocksLoading: StringMap<BlockIndex>;\n\t/** The set of blocks we received (key) */\n\tprivate _blocksLoaded: StringMap<BlockIndex>;\n\t/** The set of tiles we requested (key) */\n\tprivate _tilesLoading: StringMap<TileIndex>;\n\t/** The set of tiles we received (key) */\n\tprivate _tilesLoaded: StringMap<TileIndex>;\n\t/** Is new data being loaded? */\n\tprivate _loadingData: boolean;\n\t/** The time when the data loading stopped */\n\tprivate _loadedDataTime: float64;\n\t/** The total size of data that has been loaded */\n\tprivate _dataLoadSize: ALong;\n\n\t/** The last garbage collection time */\n\tprivate _lastGarbageCollectTime: float64;\n\n\t/**\n\t * Create a new data model (to be shared between different views).\n\t * @param pointCloudReader the reader of the pointcloud file.\n\t * @param pointCloudCRS the CRS of the point cloud.\n\t * @param dataFormat the requested data format to load point data (PointDataRaw.TYPE for example).\n\t */\n\tpublic constructor(pointCloudReader: PointCloudReader, pointCloudCRS: string, dataFormat: int32) {\n\t\t/* Store the parameters */\n\t\tthis._pointCloudReader = pointCloudReader;\n\t\tthis._pointCloudCRS = pointCloudCRS;\n\t\tthis._dataFormat = dataFormat;\n\t\t/* Initialize */\n\t\tif (this._pointCloudCRS == null) this._pointCloudCRS = this._pointCloudReader.getFileCRS();\n\t\t/* Clear */\n\t\tthis._fileTileIndex = this.createSpatialIndex();\n\t\tthis._dataPool = new StringMap<PointData>();\n\t\tthis._levelsLoading = new StringMap<Level>();\n\t\tthis._levelsLoaded = new StringMap<Level>();\n\t\tthis._blocksLoading = new StringMap<BlockIndex>();\n\t\tthis._blocksLoaded = new StringMap<BlockIndex>();\n\t\tthis._tilesLoading = new StringMap<TileIndex>();\n\t\tthis._tilesLoaded = new StringMap<TileIndex>();\n\t\tthis._loadingData = false;\n\t\tthis._loadedDataTime = 0.0;\n\t\tthis._dataLoadSize = ALong.ZERO;\n\t\tthis._lastGarbageCollectTime = 0.0;\n\t\t/* Log */\n\t\tMessage.print(DataManager.MODULE, \"Pointcloud CRS is \" + this._pointCloudCRS);\n\t}\n\n\t/**\n\t * Close the data model.\n\t */\n\tpublic close(): void {\n\t\tif (this._pointCloudReader != null) {\n\t\t\tthis._pointCloudReader.close();\n\t\t\tthis._pointCloudReader = null;\n\t\t}\n\t\tthis._fileTileIndex = null;\n\t\tthis._dataPool.clear();\n\t\tthis._levelsLoading.clear();\n\t\tthis._levelsLoaded.clear();\n\t\tthis._blocksLoading.clear();\n\t\tthis._blocksLoaded.clear();\n\t\tthis._tilesLoading.clear();\n\t\tthis._tilesLoaded.clear();\n\t}\n\n\t/**\n\t * Create a spatial index of a pointcloud.\n\t * @return the spatial index.\n\t */\n\tprivate createSpatialIndex(): ViewTree {\n\t\t/* Create the levels */\n\t\tMessage.print(DataManager.MODULE, \"Creating pointcloud spatial index\");\n\t\tlet levels: Array<Level> = new Array<Level>(this._pointCloudReader.getLevelCount());\n\t\tfor (let i: number = 0; i < levels.length; i++) {\n\t\t\t/* Get the grids */\n\t\t\tlet blockGrid: Grid = this._pointCloudReader.getLevelBlockGrid(i);\n\t\t\tlet tileGrid: Grid = this._pointCloudReader.getLevelTileGrid(i);\n\t\t\t/* Get the blocks */\n\t\t\tlet blockIndexes: Array<BlockIndex> = this._pointCloudReader.peekBlockIndexes(i);\n\t\t\tlet blockList: Array<Block> = new Array<Block>(blockIndexes.length);\n\t\t\tfor (let j: number = 0; j < blockList.length; j++) blockList[j] = new Block(blockIndexes[j]);\n\t\t\t/* Create the level */\n\t\t\tlevels[i] = new Level(i, blockGrid, tileGrid, blockList);\n\t\t\tMessage.print(DataManager.MODULE, \"Level \" + i + \" has \" + blockList.length + \" blocks\");\n\t\t}\n\t\t/* Get the data bounds */\n\t\tlet dataBounds: Bounds = this._pointCloudReader.getFileBounds();\n\t\tMessage.print(DataManager.MODULE, \"The data bounds are \" + dataBounds);\n\t\t/* Return a new spatial index */\n\t\treturn new ViewTree(this, levels, dataBounds);\n\t}\n\n\t/**\n\t * Get the pointcloud reader.\n\t * @return the pointcloud reader.\n\t */\n\tpublic getPointCloudReader(): PointCloudReader {\n\t\treturn this._pointCloudReader;\n\t}\n\n\t/**\n\t * Get the pointcloud CRS.\n\t * @return the pointcloud CRS.\n\t */\n\tpublic getPointCloudCRS(): string {\n\t\treturn this._pointCloudCRS;\n\t}\n\n\t/**\n\t * Get the bounds of the data.\n\t * @return the bounds of the data.\n\t */\n\tpublic getPointCloudBounds(): Bounds {\n\t\treturn this._pointCloudReader.getFileBounds();\n\t}\n\n\t/**\n\t * Get the spatial index.\n\t * @return the spatial index.\n\t */\n\tpublic getViewTree(): ViewTree {\n\t\treturn this._fileTileIndex;\n\t}\n\n\t/**\n\t * Check if a tile has been loaded to the data pool.\n\t * @param tileIndex the index of the tile.\n\t * @return the point data if loaded, null otherwise.\n\t */\n\tpublic isTileLoaded(tileIndex: TileIndex): PointData {\n\t\treturn this._dataPool.get(tileIndex.key);\n\t}\n\n\t/**\n\t * Is the model loading data?\n\t * @return true when loading data.\n\t */\n\tpublic isLoadingData(): boolean {\n\t\treturn this._loadingData;\n\t}\n\n\t/**\n\t * Get the size of the loaded data.\n\t * @return the size of the loaded data.\n\t */\n\tpublic getDataLoadSize(): ALong {\n\t\treturn this._dataLoadSize;\n\t}\n\n\t/**\n\t * Filter the list of blocks and tiles that should be loaded.\n\t * @param levelsToLoad the list of levels to load.\n\t * @param blocksToLoad the list of blocks to load.\n\t * @param tilesToLoad the list of tiles to load.\n\t * @param levelList the filtered list of levels to load.\n\t * @param blockList the filtered list of blocks to load.\n\t * @param tileList the filtered list of tiles to load.\n\t */\n\tpublic filterLoadList(levelsToLoad: AList<Level>, blocksToLoad: AList<BlockIndex>, tilesToLoad: AList<TileIndex>, levelList: AList<Level>, blockList: AList<BlockIndex>, tileList: AList<TileIndex>): void {\n\t\t/* Filter the levels to load */\n\t\tfor (let i: number = 0; i < levelsToLoad.size(); i++) {\n\t\t\t/* Do not request the same level twice */\n\t\t\tlet level: Level = levelsToLoad.get(i);\n\t\t\tif (this._levelsLoading.contains(level.getKey())) continue;\n\t\t\tif (this._levelsLoaded.contains(level.getKey())) continue;\n\t\t\t/* Add the level */\n\t\t\tlevelList.add(level);\n\t\t}\n\t\tlevelsToLoad.clear();\n\t\t/* Filter the blocks to load */\n\t\tfor (let i: number = 0; i < blocksToLoad.size(); i++) {\n\t\t\t/* Do not request the same block twice */\n\t\t\tlet blockIndex: BlockIndex = blocksToLoad.get(i);\n\t\t\tif (this._blocksLoading.contains(blockIndex.key)) continue;\n\t\t\tif (this._blocksLoaded.contains(blockIndex.key)) continue;\n\t\t\t/* Add the block */\n\t\t\tblockList.add(blockIndex);\n\t\t}\n\t\tblocksToLoad.clear();\n\t\t/* Filter the tiles to load */\n\t\tfor (let i: number = 0; i < tilesToLoad.size(); i++) {\n\t\t\t/* Do not request the same tile twice */\n\t\t\tlet tileIndex: TileIndex = tilesToLoad.get(i);\n\t\t\tif (this._tilesLoading.contains(tileIndex.key)) continue;\n\t\t\tif (this._tilesLoaded.contains(tileIndex.key)) continue;\n\t\t\t/* Add the tile */\n\t\t\ttileList.add(tileIndex);\n\t\t}\n\t\ttilesToLoad.clear();\n\t}\n\n\t/**\n\t * Load blocks and tiles.\n\t * @param layer the layer requesting the load.\n\t * @param levelList the filtered list of levels to load.\n\t * @param blockList the filtered list of blocks to load.\n\t * @param tileList the filtered list of tiles to load.\n\t * @return the data model.\n\t */\n\tpublic async loadData(frameData: FrameData): Promise<FrameData> {\n\t\t/* No data to load? */\n\t\tif (frameData.hasMissingData() == false) return frameData;\n\t\t/* Do not make overlapping load requests */\n\t\tif (this._loadingData) return frameData;\n\t\tthis._loadingData = true;\n\t\t/* Log */\n\t\tlet levelList: AList<Level> = frameData.levelsToLoad;\n\t\tlet blockList: AList<BlockIndex> = frameData.blocksToLoad;\n\t\tlet tileList: AList<TileIndex> = frameData.tilesToLoad;\n\t\t//\t\tMessage.print(MODULE,\"Loading \"+levelList.size()+\" levels, \"+blockList.size()+\" blocks and \"+tileList.size()+\" tiles\");\n\t\t//\t\tMessage.print(MODULE,\"Already loaded \"+this._blocksLoaded.size()+\" blocks\");\n\t\t//\t\tMessage.print(MODULE,\"Already loading \"+this._blocksLoading.size()+\" blocks\");\n\t\t//\t\tMessage.print(MODULE,\"Already loaded \"+this._tilesLoaded.size()+\" tiles\");\n\t\t//\t\tMessage.print(MODULE,\"Already loading \"+this._tilesLoading.size()+\" tiles\");\n\t\t/* Define the content we are going to need */\n\t\tlet loadTime: float64 = ASystem.time();\n\t\tlet fileContents: ContentLoader = new ContentLoader(this._pointCloudReader.getFileStorage(), this._pointCloudReader.getFileName());\n\t\t/* Prepare the loading of the levels */\n\t\tfor (let i: number = 0; i < levelList.size(); i++) {\n\t\t\t/* Prepare to load the block */\n\t\t\tlet level: Level = levelList.get(i);\n\t\t\tthis._levelsLoading.set(level.getKey(), level);\n\t\t\tthis._pointCloudReader.readBlockIndexes(level.getIndex(), fileContents);\n\t\t\tMessage.print(DataManager.MODULE, \"Loading level \" + level.getIndex());\n\t\t}\n\t\t/* Prepare the loading of the blocks */\n\t\tfor (let i: number = 0; i < blockList.size(); i++) {\n\t\t\t/* Prepare to load the block */\n\t\t\tlet blockIndex: BlockIndex = blockList.get(i);\n\t\t\tthis._blocksLoading.set(blockIndex.key, blockIndex);\n\t\t\tthis._pointCloudReader.readTileIndexes(blockIndex, fileContents);\n\t\t}\n\t\t/* Prepare the loading of the tiles */\n\t\tlet loadTileCount: int32 = 0;\n\t\tfor (let i: number = 0; i < tileList.size(); i++) {\n\t\t\t/* Prepare to load the tile */\n\t\t\tlet tileIndex: TileIndex = tileList.get(i);\n\t\t\tthis._tilesLoading.set(tileIndex.key, tileIndex);\n\t\t\tthis._pointCloudReader.readPointData(tileIndex, this._dataFormat, loadTime, fileContents);\n\t\t\tloadTileCount++;\n\t\t\t/* Do not load too many tiles at once */\n\t\t\tif (fileContents.getTotalRequestSize() > DataManager.MAX_FILE_CONTENT_SIZE) {\n\t\t\t\t/* Stop loading tiles */\n\t\t\t\tMessage.print(DataManager.MODULE, \"Limited pointcloud content load request to \" + fileContents.getTotalRequestSize() + \" bytes\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t/* Log */\n\t\tMessage.print(DataManager.MODULE, \"Loading of \" + blockList.size() + \" blocks, \" + loadTileCount + \"/\" + tileList.size() + \" tiles, \" + fileContents.getTotalRequestSize() + \" bytes\");\n\t\t/* Load the data */\n\t\tthis._dataLoadSize = this._dataLoadSize.addInt(fileContents.getTotalRequestSize());\n\t\tfileContents = await fileContents.load();\n\t\t//Message.print(MODULE,\"Creating \"+blockList.size()+\" blocks and \"+tileList.size()+\" tiles\");\n\t\t/* Load the levels */\n\t\tfor (let i: number = 0; i < levelList.size(); i++) {\n\t\t\t/* Load the block list */\n\t\t\tlet level: Level = levelList.get(i);\n\t\t\tthis._levelsLoaded.set(level.getKey(), level);\n\t\t\tthis._levelsLoading.remove(level.getKey());\n\t\t\tlet blockIndexes: Array<BlockIndex> = this._pointCloudReader.readBlockIndexes(level.getIndex(), fileContents);\n\t\t\t/* Add the blocks */\n\t\t\tthis._fileTileIndex.setLevelBlocks(level, blockIndexes);\n\t\t}\n\t\t/* Load the blocks */\n\t\tfor (let i: number = 0; i < blockList.size(); i++) {\n\t\t\t/* Load the block */\n\t\t\tlet blockIndex: BlockIndex = blockList.get(i);\n\t\t\tthis._blocksLoaded.set(blockIndex.key, blockIndex);\n\t\t\tthis._blocksLoading.remove(blockIndex.key);\n\t\t\tlet tileIndexes: Array<TileIndex> = this._pointCloudReader.readTileIndexes(blockIndex, fileContents);\n\t\t\t/* Add the block */\n\t\t\tthis._fileTileIndex.setBlockTiles(blockIndex, tileIndexes);\n\t\t}\n\t\t/* Load the tiles */\n\t\tlet newTiles: AList<TileIndex> = new AList<TileIndex>();\n\t\tfor (let i: number = 0; i < loadTileCount; i++) {\n\t\t\t/* Get the next tile */\n\t\t\tlet tileIndex: TileIndex = tileList.get(i);\n\t\t\tnewTiles.add(tileIndex);\n\t\t\t/* Load the tile */\n\t\t\tthis._tilesLoaded.set(tileIndex.key, tileIndex);\n\t\t\tthis._tilesLoading.remove(tileIndex.key);\n\t\t\tlet pointData: PointData = this._pointCloudReader.readPointData(tileIndex, this._dataFormat, loadTime, fileContents);\n\t\t\t/* Add the tile */\n\t\t\tthis._dataPool.set(tileIndex.key, pointData);\n\t\t}\n\t\t/* We stopped loading */\n\t\tthis._loadingData = false;\n\t\tthis._loadedDataTime = ASystem.time();\n\t\t/* Log */\n\t\tMessage.print(DataManager.MODULE, \"Created \" + blockList.size() + \" blocks and \" + loadTileCount + \" tiles\");\n\t\t/* Return the frame data */\n\t\treturn frameData;\n\t}\n\n\t/**\n\t * Do a garbage collect (this method can be called often, it throttles itself to once per minute).\n\t * @param time the current time.\n\t */\n\tpublic doGarbageCollect(time: float64): void {\n\t\t/* First call? */\n\t\tif (this._lastGarbageCollectTime == 0.0) this._lastGarbageCollectTime = time;\n\t\t/* Throttle to one per minute */\n\t\tif (time < this._lastGarbageCollectTime + 60.0) return;\n\t\tthis._lastGarbageCollectTime = time;\n\t\t/* Define the expire time */\n\t\tlet expireTime: float64 = (time - DataManager.POINT_DATA_EXIRE_TIME);\n\t\t/* Check all loaded tiles */\n\t\tlet dropCount: int32 = 0;\n\t\tlet dataKeys: AList<string> = this._dataPool.keys();\n\t\tfor (let i: number = 0; i < dataKeys.size(); i++) {\n\t\t\t/* Get the next tile */\n\t\t\tlet tileKey: string = dataKeys.get(i);\n\t\t\tlet pointData: PointData = this._dataPool.get(tileKey);\n\t\t\t/* Expired? */\n\t\t\tif (pointData.tileIndex.accessTime < expireTime) {\n\t\t\t\tthis._dataPool.remove(tileKey);\n\t\t\t\tthis._tilesLoaded.remove(tileKey);\n\t\t\t\tdropCount++;\n\t\t\t}\n\t\t}\n\t\t/* Log? */\n\t\tif (dropCount > 0) Message.print(DataManager.MODULE, \"Dropped the point data of \" + dropCount + \" tiles\");\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"DataManager.js","sourceRoot":"","sources":["../../../../src/pointcloud/render/DataManager.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAYH,yDAAsD;AACtD,iEAA8D;AAC9D,sDAAmD;AACnD,0DAAuD;AACvD,0DAAuD;AACvD,sEAAmE;AAMnE,mCAAgC;AAEhC,mCAAgC;AAChC,yCAAsC;AAEtC;;;;GAIG;AACH,gBAAgB;AAChB,MAAa,WAAW;IACvB,8BAA8B;IACtB,MAAM,CAAU,MAAM,GAAW,aAAa,CAAC;IAEvD,wDAAwD;IAChD,MAAM,CAAU,qBAAqB,GAAU,GAAG,GAAG,IAAI,CAAC;IAClE,4DAA4D;IACpD,MAAM,CAAU,qBAAqB,GAAY,CAAC,GAAG,IAAI,CAAC;IAElE,mCAAmC;IAC3B,iBAAiB,CAAmB;IAC5C,iCAAiC;IACzB,cAAc,CAAS;IAC/B,8BAA8B;IACtB,WAAW,CAAQ;IAE3B,wBAAwB;IAChB,cAAc,CAAW;IACjC,oBAAoB;IACZ,SAAS,CAAuB;IACxC,6CAA6C;IACrC,cAAc,CAAmB;IACzC,4CAA4C;IACpC,aAAa,CAAmB;IACxC,2CAA2C;IACnC,cAAc,CAAwB;IAC9C,0CAA0C;IAClC,aAAa,CAAwB;IAC7C,0CAA0C;IAClC,aAAa,CAAuB;IAC5C,yCAAyC;IACjC,YAAY,CAAuB;IAC3C,gCAAgC;IACxB,YAAY,CAAU;IAC9B,6CAA6C;IACrC,eAAe,CAAU;IACjC,kDAAkD;IAC1C,aAAa,CAAQ;IAE7B,uCAAuC;IAC/B,uBAAuB,CAAU;IAEzC;;;;;OAKG;IACH,YAAmB,gBAAkC,EAAE,aAAqB,EAAE,UAAiB;QAC9F,0BAA0B;QAC1B,IAAI,CAAC,iBAAiB,GAAG,gBAAgB,CAAC;QAC1C,IAAI,CAAC,cAAc,GAAG,aAAa,CAAC;QACpC,IAAI,C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CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,EAAE,4BAA4B,GAAG,SAAS,GAAG,QAAQ,CAAC,CAAC;IAC3G,CAAC;;AA5VF,kCA6VC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module OrbitGT\n */\n\n//package orbitgt.pointcloud.render;\n\ntype int8 = number;\ntype int16 = number;\ntype int32 = number;\ntype float32 = number;\ntype float64 = number;\n\nimport { Bounds } from \"../../spatial/geom/Bounds\";\nimport { Transform } from \"../../spatial/geom/Transform\";\nimport { AList } from \"../../system/collection/AList\";\nimport { StringMap } from \"../../system/collection/StringMap\";\nimport { ALong } from \"../../system/runtime/ALong\";\nimport { ASystem } from \"../../system/runtime/ASystem\";\nimport { Message } from \"../../system/runtime/Message\";\nimport { ContentLoader } from \"../../system/storage/ContentLoader\";\nimport { BlockIndex } from \"../model/BlockIndex\";\nimport { Grid } from \"../model/Grid\";\nimport { PointCloudReader } from \"../model/PointCloudReader\";\nimport { PointData } from \"../model/PointData\";\nimport { TileIndex } from \"../model/TileIndex\";\nimport { Block } from \"./Block\";\nimport { FrameData } from \"./FrameData\";\nimport { Level } from \"./Level\";\nimport { ViewTree } from \"./ViewTree\";\n\n/**\n * Class DataManager manages the (shared) data model part of the rendering in multiple layers (see the CLOUD-461 issue).\n *\n * @version 1.0 December 2017\n */\n/** @internal */\nexport class DataManager {\n\t/** The name of this module */\n\tprivate static readonly MODULE: string = \"DataManager\";\n\n\t/** The maximum size of a single file-content request */\n\tprivate static readonly MAX_FILE_CONTENT_SIZE: int32 = 128 * 1024;\n\t/** The expire time to unload unused point data (seconds) */\n\tprivate static readonly POINT_DATA_EXIRE_TIME: float64 = 5 * 60.0;\n\n\t/** The reader of the pointcloud */\n\tprivate _pointCloudReader: PointCloudReader;\n\t/*** The CRS of the pointcloud */\n\tprivate _pointCloudCRS: string;\n\t/** The data format to read */\n\tprivate _dataFormat: int32;\n\n\t/** The spatial index */\n\tprivate _fileTileIndex: ViewTree;\n\t/** The data pool */\n\tprivate _dataPool: StringMap<PointData>;\n\t/** The set of levels we requested (index) */\n\tprivate _levelsLoading: StringMap<Level>;\n\t/** The set of levels we received (index) */\n\tprivate _levelsLoaded: StringMap<Level>;\n\t/** The set of blocks we requested (key) */\n\tprivate _blocksLoading: StringMap<BlockIndex>;\n\t/** The set of blocks we received (key) */\n\tprivate _blocksLoaded: StringMap<BlockIndex>;\n\t/** The set of tiles we requested (key) */\n\tprivate _tilesLoading: StringMap<TileIndex>;\n\t/** The set of tiles we received (key) */\n\tprivate _tilesLoaded: StringMap<TileIndex>;\n\t/** Is new data being loaded? */\n\tprivate _loadingData: boolean;\n\t/** The time when the data loading stopped */\n\tprivate _loadedDataTime: float64;\n\t/** The total size of data that has been loaded */\n\tprivate _dataLoadSize: ALong;\n\n\t/** The last garbage collection time */\n\tprivate _lastGarbageCollectTime: float64;\n\n\t/**\n\t * Create a new data model (to be shared between different views).\n\t * @param pointCloudReader the reader of the pointcloud file.\n\t * @param pointCloudCRS the CRS of the point cloud.\n\t * @param dataFormat the requested data format to load point data (PointDataRaw.TYPE for example).\n\t */\n\tpublic constructor(pointCloudReader: PointCloudReader, pointCloudCRS: string, dataFormat: int32) {\n\t\t/* Store the parameters */\n\t\tthis._pointCloudReader = pointCloudReader;\n\t\tthis._pointCloudCRS = pointCloudCRS;\n\t\tthis._dataFormat = dataFormat;\n\t\t/* Initialize */\n\t\tif (this._pointCloudCRS == null) this._pointCloudCRS = this._pointCloudReader.getFileCRS();\n\t\t/* Clear */\n\t\tthis._fileTileIndex = this.createSpatialIndex();\n\t\tthis._dataPool = new StringMap<PointData>();\n\t\tthis._levelsLoading = new StringMap<Level>();\n\t\tthis._levelsLoaded = new StringMap<Level>();\n\t\tthis._blocksLoading = new StringMap<BlockIndex>();\n\t\tthis._blocksLoaded = new StringMap<BlockIndex>();\n\t\tthis._tilesLoading = new StringMap<TileIndex>();\n\t\tthis._tilesLoaded = new StringMap<TileIndex>();\n\t\tthis._loadingData = false;\n\t\tthis._loadedDataTime = 0.0;\n\t\tthis._dataLoadSize = ALong.ZERO;\n\t\tthis._lastGarbageCollectTime = 0.0;\n\t\t/* Log */\n\t\tMessage.print(DataManager.MODULE, \"Pointcloud CRS is \" + this._pointCloudCRS);\n\t}\n\n\t/**\n\t * Close the data model.\n\t */\n\tpublic close(): void {\n\t\tif (this._pointCloudReader != null) {\n\t\t\tthis._pointCloudReader.close();\n\t\t\tthis._pointCloudReader = null;\n\t\t}\n\t\tthis._fileTileIndex = null;\n\t\tthis._dataPool.clear();\n\t\tthis._levelsLoading.clear();\n\t\tthis._levelsLoaded.clear();\n\t\tthis._blocksLoading.clear();\n\t\tthis._blocksLoaded.clear();\n\t\tthis._tilesLoading.clear();\n\t\tthis._tilesLoaded.clear();\n\t}\n\n\t/**\n\t * Create a spatial index of a pointcloud.\n\t * @return the spatial index.\n\t */\n\tprivate createSpatialIndex(): ViewTree {\n\t\t/* Create the levels */\n\t\tMessage.print(DataManager.MODULE, \"Creating pointcloud spatial index\");\n\t\tlet levels: Array<Level> = new Array<Level>(this._pointCloudReader.getLevelCount());\n\t\tfor (let i: number = 0; i < levels.length; i++) {\n\t\t\t/* Get the grids */\n\t\t\tlet blockGrid: Grid = this._pointCloudReader.getLevelBlockGrid(i);\n\t\t\tlet tileGrid: Grid = this._pointCloudReader.getLevelTileGrid(i);\n\t\t\t/* Get the blocks */\n\t\t\tlet blockIndexes: Array<BlockIndex> = this._pointCloudReader.peekBlockIndexes(i);\n\t\t\tlet blockList: Array<Block> = new Array<Block>(blockIndexes.length);\n\t\t\tfor (let j: number = 0; j < blockList.length; j++) blockList[j] = new Block(blockIndexes[j]);\n\t\t\t/* Create the level */\n\t\t\tlevels[i] = new Level(i, blockGrid, tileGrid, blockList);\n\t\t\tMessage.print(DataManager.MODULE, \"Level \" + i + \" has \" + blockList.length + \" blocks\");\n\t\t}\n\t\t/* Get the data bounds */\n\t\tlet dataBounds: Bounds = this._pointCloudReader.getFileBounds();\n\t\tMessage.print(DataManager.MODULE, \"The data bounds are \" + dataBounds);\n\t\t/* Return a new spatial index */\n\t\treturn new ViewTree(this, levels, dataBounds);\n\t}\n\n\t/**\n\t * Get the pointcloud reader.\n\t * @return the pointcloud reader.\n\t */\n\tpublic getPointCloudReader(): PointCloudReader {\n\t\treturn this._pointCloudReader;\n\t}\n\n\t/**\n\t * Get the pointcloud CRS.\n\t * @return the pointcloud CRS.\n\t */\n\tpublic getPointCloudCRS(): string {\n\t\treturn this._pointCloudCRS;\n\t}\n\n\t/**\n\t * Get the bounds of the data.\n\t * @return the bounds of the data.\n\t */\n\tpublic getPointCloudBounds(): Bounds {\n\t\treturn this._pointCloudReader.getFileBounds();\n\t}\n\n\t/**\n\t * Get the spatial index.\n\t * @return the spatial index.\n\t */\n\tpublic getViewTree(): ViewTree {\n\t\treturn this._fileTileIndex;\n\t}\n\n\t/**\n\t * Check if a tile has been loaded to the data pool.\n\t * @param tileIndex the index of the tile.\n\t * @return the point data if loaded, null otherwise.\n\t */\n\tpublic isTileLoaded(tileIndex: TileIndex): PointData {\n\t\treturn this._dataPool.get(tileIndex.key);\n\t}\n\n\t/**\n\t * Is the model loading data?\n\t * @return true when loading data.\n\t */\n\tpublic isLoadingData(): boolean {\n\t\treturn this._loadingData;\n\t}\n\n\t/**\n\t * Get the size of the loaded data.\n\t * @return the size of the loaded data.\n\t */\n\tpublic getDataLoadSize(): ALong {\n\t\treturn this._dataLoadSize;\n\t}\n\n\t/**\n\t * Filter the list of blocks and tiles that should be loaded.\n\t * @param levelsToLoad the list of levels to load.\n\t * @param blocksToLoad the list of blocks to load.\n\t * @param tilesToLoad the list of tiles to load.\n\t * @param levelList the filtered list of levels to load.\n\t * @param blockList the filtered list of blocks to load.\n\t * @param tileList the filtered list of tiles to load.\n\t */\n\tpublic filterLoadList(levelsToLoad: AList<Level>, blocksToLoad: AList<BlockIndex>, tilesToLoad: AList<TileIndex>, levelList: AList<Level>, blockList: AList<BlockIndex>, tileList: AList<TileIndex>): void {\n\t\t/* Filter the levels to load */\n\t\tfor (let i: number = 0; i < levelsToLoad.size(); i++) {\n\t\t\t/* Do not request the same level twice */\n\t\t\tlet level: Level = levelsToLoad.get(i);\n\t\t\tif (this._levelsLoading.contains(level.getKey())) continue;\n\t\t\tif (this._levelsLoaded.contains(level.getKey())) continue;\n\t\t\t/* Add the level */\n\t\t\tlevelList.add(level);\n\t\t}\n\t\tlevelsToLoad.clear();\n\t\t/* Filter the blocks to load */\n\t\tfor (let i: number = 0; i < blocksToLoad.size(); i++) {\n\t\t\t/* Do not request the same block twice */\n\t\t\tlet blockIndex: BlockIndex = blocksToLoad.get(i);\n\t\t\tif (this._blocksLoading.contains(blockIndex.key)) continue;\n\t\t\tif (this._blocksLoaded.contains(blockIndex.key)) continue;\n\t\t\t/* Add the block */\n\t\t\tblockList.add(blockIndex);\n\t\t}\n\t\tblocksToLoad.clear();\n\t\t/* Filter the tiles to load */\n\t\tfor (let i: number = 0; i < tilesToLoad.size(); i++) {\n\t\t\t/* Do not request the same tile twice */\n\t\t\tlet tileIndex: TileIndex = tilesToLoad.get(i);\n\t\t\tif (this._tilesLoading.contains(tileIndex.key)) continue;\n\t\t\tif (this._tilesLoaded.contains(tileIndex.key)) continue;\n\t\t\t/* Add the tile */\n\t\t\ttileList.add(tileIndex);\n\t\t}\n\t\ttilesToLoad.clear();\n\t}\n\n\t/**\n\t * Load blocks and tiles.\n\t * @param layer the layer requesting the load.\n\t * @param levelList the filtered list of levels to load.\n\t * @param blockList the filtered list of blocks to load.\n\t * @param tileList the filtered list of tiles to load.\n\t * @return the data model.\n\t */\n\tpublic async loadData(frameData: FrameData): Promise<FrameData> {\n\t\t/* No data to load? */\n\t\tif (frameData.hasMissingData() == false) return frameData;\n\t\t/* Do not make overlapping load requests */\n\t\tif (this._loadingData) return frameData;\n\t\tthis._loadingData = true;\n\t\t/* Log */\n\t\tlet levelList: AList<Level> = frameData.levelsToLoad;\n\t\tlet blockList: AList<BlockIndex> = frameData.blocksToLoad;\n\t\tlet tileList: AList<TileIndex> = frameData.tilesToLoad;\n\t\t//\t\tMessage.print(MODULE,\"Loading \"+levelList.size()+\" levels, \"+blockList.size()+\" blocks and \"+tileList.size()+\" tiles\");\n\t\t//\t\tMessage.print(MODULE,\"Already loaded \"+this._blocksLoaded.size()+\" blocks\");\n\t\t//\t\tMessage.print(MODULE,\"Already loading \"+this._blocksLoading.size()+\" blocks\");\n\t\t//\t\tMessage.print(MODULE,\"Already loaded \"+this._tilesLoaded.size()+\" tiles\");\n\t\t//\t\tMessage.print(MODULE,\"Already loading \"+this._tilesLoading.size()+\" tiles\");\n\t\t/* Define the content we are going to need */\n\t\tlet loadTime: float64 = ASystem.time();\n\t\tlet fileContents: ContentLoader = new ContentLoader(this._pointCloudReader.getFileStorage(), this._pointCloudReader.getFileName());\n\t\t/* Prepare the loading of the levels */\n\t\tfor (let i: number = 0; i < levelList.size(); i++) {\n\t\t\t/* Prepare to load the block */\n\t\t\tlet level: Level = levelList.get(i);\n\t\t\tthis._levelsLoading.set(level.getKey(), level);\n\t\t\tthis._pointCloudReader.readBlockIndexes(level.getIndex(), fileContents);\n\t\t\tMessage.print(DataManager.MODULE, \"Loading level \" + level.getIndex());\n\t\t}\n\t\t/* Prepare the loading of the blocks */\n\t\tfor (let i: number = 0; i < blockList.size(); i++) {\n\t\t\t/* Prepare to load the block */\n\t\t\tlet blockIndex: BlockIndex = blockList.get(i);\n\t\t\tthis._blocksLoading.set(blockIndex.key, blockIndex);\n\t\t\tthis._pointCloudReader.readTileIndexes(blockIndex, fileContents);\n\t\t}\n\t\t/* Prepare the loading of the tiles */\n\t\tlet loadTileCount: int32 = 0;\n\t\tfor (let i: number = 0; i < tileList.size(); i++) {\n\t\t\t/* Prepare to load the tile */\n\t\t\tlet tileIndex: TileIndex = tileList.get(i);\n\t\t\tthis._tilesLoading.set(tileIndex.key, tileIndex);\n\t\t\tthis._pointCloudReader.readPointData(tileIndex, this._dataFormat, loadTime, fileContents);\n\t\t\tloadTileCount++;\n\t\t\t/* Do not load too many tiles at once */\n\t\t\tif (fileContents.getTotalRequestSize() > DataManager.MAX_FILE_CONTENT_SIZE) {\n\t\t\t\t/* Stop loading tiles */\n\t\t\t\tMessage.print(DataManager.MODULE, \"Limited pointcloud content load request to \" + fileContents.getTotalRequestSize() + \" bytes\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t/* Log */\n\t\tMessage.print(DataManager.MODULE, \"Loading of \" + blockList.size() + \" blocks, \" + loadTileCount + \"/\" + tileList.size() + \" tiles, \" + fileContents.getTotalRequestSize() + \" bytes\");\n\t\t/* Load the data */\n\t\tthis._dataLoadSize = this._dataLoadSize.addInt(fileContents.getTotalRequestSize());\n\t\tfileContents = await fileContents.load();\n\t\t//Message.print(MODULE,\"Creating \"+blockList.size()+\" blocks and \"+tileList.size()+\" tiles\");\n\t\t/* Load the levels */\n\t\tfor (let i: number = 0; i < levelList.size(); i++) {\n\t\t\t/* Load the block list */\n\t\t\tlet level: Level = levelList.get(i);\n\t\t\tthis._levelsLoaded.set(level.getKey(), level);\n\t\t\tthis._levelsLoading.remove(level.getKey());\n\t\t\tlet blockIndexes: Array<BlockIndex> = this._pointCloudReader.readBlockIndexes(level.getIndex(), fileContents);\n\t\t\t/* Add the blocks */\n\t\t\tthis._fileTileIndex.setLevelBlocks(level, blockIndexes);\n\t\t}\n\t\t/* Load the blocks */\n\t\tfor (let i: number = 0; i < blockList.size(); i++) {\n\t\t\t/* Load the block */\n\t\t\tlet blockIndex: BlockIndex = blockList.get(i);\n\t\t\tthis._blocksLoaded.set(blockIndex.key, blockIndex);\n\t\t\tthis._blocksLoading.remove(blockIndex.key);\n\t\t\tlet tileIndexes: Array<TileIndex> = this._pointCloudReader.readTileIndexes(blockIndex, fileContents);\n\t\t\t/* Add the block */\n\t\t\tthis._fileTileIndex.setBlockTiles(blockIndex, tileIndexes);\n\t\t}\n\t\t/* Load the tiles */\n\t\tlet newTiles: AList<TileIndex> = new AList<TileIndex>();\n\t\tfor (let i: number = 0; i < loadTileCount; i++) {\n\t\t\t/* Get the next tile */\n\t\t\tlet tileIndex: TileIndex = tileList.get(i);\n\t\t\tnewTiles.add(tileIndex);\n\t\t\t/* Load the tile */\n\t\t\tthis._tilesLoaded.set(tileIndex.key, tileIndex);\n\t\t\tthis._tilesLoading.remove(tileIndex.key);\n\t\t\tlet pointData: PointData = this._pointCloudReader.readPointData(tileIndex, this._dataFormat, loadTime, fileContents);\n\t\t\t/* Add the tile */\n\t\t\tthis._dataPool.set(tileIndex.key, pointData);\n\t\t}\n\t\t/* We stopped loading */\n\t\tthis._loadingData = false;\n\t\tthis._loadedDataTime = ASystem.time();\n\t\t/* Log */\n\t\tMessage.print(DataManager.MODULE, \"Created \" + blockList.size() + \" blocks and \" + loadTileCount + \" tiles\");\n\t\t/* Return the frame data */\n\t\treturn frameData;\n\t}\n\n\t/**\n\t * Do a garbage collect (this method can be called often, it throttles itself to once per minute).\n\t * @param time the current time.\n\t */\n\tpublic doGarbageCollect(time: float64): void {\n\t\t/* First call? */\n\t\tif (this._lastGarbageCollectTime == 0.0) this._lastGarbageCollectTime = time;\n\t\t/* Throttle to one per minute */\n\t\tif (time < this._lastGarbageCollectTime + 60.0) return;\n\t\tthis._lastGarbageCollectTime = time;\n\t\t/* Define the expire time */\n\t\tlet expireTime: float64 = (time - DataManager.POINT_DATA_EXIRE_TIME);\n\t\t/* Check all loaded tiles */\n\t\tlet dropCount: int32 = 0;\n\t\tlet dataKeys: AList<string> = this._dataPool.keys();\n\t\tfor (let i: number = 0; i < dataKeys.size(); i++) {\n\t\t\t/* Get the next tile */\n\t\t\tlet tileKey: string = dataKeys.get(i);\n\t\t\tlet pointData: PointData = this._dataPool.get(tileKey);\n\t\t\t/* Expired? */\n\t\t\tif (pointData.tileIndex.accessTime < expireTime) {\n\t\t\t\tthis._dataPool.remove(tileKey);\n\t\t\t\tthis._tilesLoaded.remove(tileKey);\n\t\t\t\tdropCount++;\n\t\t\t}\n\t\t}\n\t\t/* Log? */\n\t\tif (dropCount > 0) Message.print(DataManager.MODULE, \"Dropped the point data of \" + dropCount + \" tiles\");\n\t}\n}\n"]}
|
|
@@ -14,6 +14,14 @@ const AList_1 = require("../../system/collection/AList");
|
|
|
14
14
|
*/
|
|
15
15
|
/** @internal */
|
|
16
16
|
class FrameData {
|
|
17
|
+
/** The list of tiles that have been loaded and need to be rendered */
|
|
18
|
+
tilesToRender;
|
|
19
|
+
/** The levels of which the block indexes need to be loaded */
|
|
20
|
+
levelsToLoad;
|
|
21
|
+
/** The blocks of which the tile indexes need to be loaded */
|
|
22
|
+
blocksToLoad;
|
|
23
|
+
/** The tiles of which the points need to be loaded */
|
|
24
|
+
tilesToLoad;
|
|
17
25
|
/**
|
|
18
26
|
* Create a new frame data holder.
|
|
19
27
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FrameData.js","sourceRoot":"","sources":["../../../../src/pointcloud/render/FrameData.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAWH,yDAAsD;AAMtD;;GAEG;AACH,gBAAgB;AAChB,MAAa,SAAS;
|
|
1
|
+
{"version":3,"file":"FrameData.js","sourceRoot":"","sources":["../../../../src/pointcloud/render/FrameData.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAWH,yDAAsD;AAMtD;;GAEG;AACH,gBAAgB;AAChB,MAAa,SAAS;IAClB,sEAAsE;IAC/D,aAAa,CAAmB;IACvC,8DAA8D;IACvD,YAAY,CAAe;IAClC,6DAA6D;IACtD,YAAY,CAAoB;IACvC,sDAAsD;IAC/C,WAAW,CAAmB;IAErC;;OAEG;IACH;QACI,IAAI,CAAC,aAAa,GAAG,IAAI,aAAK,EAAa,CAAC;QAC5C,IAAI,CAAC,YAAY,GAAG,IAAI,aAAK,EAAS,CAAC;QACvC,IAAI,CAAC,YAAY,GAAG,IAAI,aAAK,EAAc,CAAC;QAC5C,IAAI,CAAC,WAAW,GAAG,IAAI,aAAK,EAAa,CAAC;IAC9C,CAAC;IAED;;OAEG;IACI,cAAc;QACjB,IAAI,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,GAAG,CAAC;YAAE,OAAO,IAAI,CAAC;QAC9C,IAAI,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,GAAG,CAAC;YAAE,OAAO,IAAI,CAAC;QAC9C,IAAI,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,CAAC;YAAE,OAAO,IAAI,CAAC;QAC7C,OAAO,KAAK,CAAC;IACjB,CAAC;CACJ;AA7BD,8BA6BC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module OrbitGT\n */\n\n//package orbitgt.pointcloud.render;\n\ntype int8 = number;\ntype int16 = number;\ntype int32 = number;\ntype float32 = number;\ntype float64 = number;\n\n\nimport { AList } from \"../../system/collection/AList\";\nimport { BlockIndex } from \"../model/BlockIndex\";\nimport { PointData } from \"../model/PointData\";\nimport { TileIndex } from \"../model/TileIndex\";\nimport { Level } from \"./Level\";\n\n/**\n * Class FrameData bundles the data needed to render a certain view, some data is available, some data needs to be loaded.\n */\n/** @internal */\nexport class FrameData {\n /** The list of tiles that have been loaded and need to be rendered */\n public tilesToRender: AList<PointData>;\n /** The levels of which the block indexes need to be loaded */\n public levelsToLoad: AList<Level>;\n /** The blocks of which the tile indexes need to be loaded */\n public blocksToLoad: AList<BlockIndex>;\n /** The tiles of which the points need to be loaded */\n public tilesToLoad: AList<TileIndex>;\n\n /**\n * Create a new frame data holder.\n */\n public constructor() {\n this.tilesToRender = new AList<PointData>();\n this.levelsToLoad = new AList<Level>();\n this.blocksToLoad = new AList<BlockIndex>();\n this.tilesToLoad = new AList<TileIndex>();\n }\n\n /**\n * Is frame data missing? (so a data load is needed).\n */\n public hasMissingData(): boolean {\n if (this.levelsToLoad.size() > 0) return true;\n if (this.blocksToLoad.size() > 0) return true;\n if (this.tilesToLoad.size() > 0) return true;\n return false;\n }\n}\n"]}
|
|
@@ -16,6 +16,18 @@ const StringMap_1 = require("../../system/collection/StringMap");
|
|
|
16
16
|
*/
|
|
17
17
|
/** @internal */
|
|
18
18
|
class Level {
|
|
19
|
+
/** The index of the level */
|
|
20
|
+
_index;
|
|
21
|
+
/** The unique key of the level */
|
|
22
|
+
_key;
|
|
23
|
+
/** The grid of the blocks */
|
|
24
|
+
_blockGrid;
|
|
25
|
+
/** The grid of the tiles */
|
|
26
|
+
_tileGrid;
|
|
27
|
+
/** The list of blocks */
|
|
28
|
+
_blockList;
|
|
29
|
+
/** The map of blocks */
|
|
30
|
+
_blockMap;
|
|
19
31
|
/**
|
|
20
32
|
* Create a new level.
|
|
21
33
|
* @param index the index of the level.
|