Point cloud files are large and expensive to transfer uncompressed. OSS integrates with Intelligent Media Management (IMM) to compress PCD files directly in your bucket using the x-oss-process query parameter — no preprocessing pipeline required.
Use cases
Autonomous driving: Compress point cloud data generated by radar scans.
Digital cultural heritage: Compress point cloud data of cultural relics for digital preservation.
Smart city: Compress point cloud data from 3D city reconstruction for smooth rendering and display.
Mixed reality: Compress point cloud data with real-time encoding and decoding support.
Prerequisites
Before you begin, make sure you have:
An OSS bucket with an IMM project attached. See Quick Start (console) or AttachOSSBucket (API)
The required permissions to use point cloud compression. See Permissions
A PCD file stored in the bucket
Anonymous access is denied. Authenticated requests are required.
Choose a compression method
OSS supports two compression methods. Choose based on your precision and file size requirements:
| Octree | K-d tree | |
|---|---|---|
| Compression library | PCL (Point Cloud Library) | Draco (Google's open-source 3D data compression library) |
| Required parameters | None (all optional) | cl, qb |
| Key trade-off | Balance compression speed and spatial precision via voxel and resolution settings | Balance compression ratio and point detail via compression level and quantization bits |
| Best for | Flexible spatial compression with downsampling support | High compression ratio with fine-grained quality control |
Parameters
Action: pointcloud/compress
Common parameters
These parameters apply to both compression methods.
| Parameter | Type | Required | Description |
|---|---|---|---|
f | string | No | PCD file format. Only pcd is supported. |
m | string | Yes | Compression method. Valid values: octree, kdtree. |
fs | string | No | PCD property fields to compress, and their compression order. Only xyz is supported. Must be URL-safe Base64 encoded. For example, encode xyz as eHl6. |
Octree parameters
Append these parameters after /octree in the request.
| Parameter | Type | Required | Description |
|---|---|---|---|
lib | string | No | Compression library. Only pcl is supported. |
pr | float | No | Point cloud resolution. Controls the precision of point coordinates during encoding. Default: 0.01. Range: 0–1. |
or | float | No | Minimum octree block size (voxel edge length). Default: 0.01. Range: 0–1. |
d | int | No | Downsampling. Set to 1 to enable downsampling. Downsampling is enabled by default. |
K-d tree parameters
Append these parameters after /kdtree in the request.
| Parameter | Type | Required | Description |
|---|---|---|---|
lib | string | No | Compression library. Only draco is supported. |
cl | int | Yes | Compression level. A higher value retains more point detail. Range: 0–10. |
qb | int | Yes | Number of quantization bits. A higher value retains more point detail. Range: 1–31. |
Compress a point cloud file
Point cloud compression supports only synchronous processing using the x-oss-process query parameter.
Octree method
This example compresses example.pcd using the Octree method with PCL, a point cloud resolution of 0.001, a voxel size of 0.001, downsampling enabled, and the xyz fields compressed.
Request parameter string:
x-oss-process=pointcloud/compress,m_octree,fs_eHl6/octree,or_0.001,pr_0.001,d_1,lib_pclFull request:
GET /example.pcd?x-oss-process=pointcloud/compress,m_octree,fs_eHl6/octree,or_0.001,pr_0.001,d_1,lib_pcl HTTP/1.1
Host: file-demo.oss-cn-hangzhou.aliyuncs.com
Date: Fri, 28 Oct 2022 06:40:10 GMT
Authorization: OSS4-HMAC-SHA256 Credential=LTAI********************/20250417/cn-hangzhou/oss/aliyun_v4_request,Signature=a7c3554c729d71929e0b84489addee6b2e8d5cb48595adfc51868c299c0c218eResponse:
HTTP/1.1 200 OK
Server: AliyunOSS
Date: Wed, 25 May 2022 12:15:44 GMT
Content-Type: application/octet-stream
Transfer-Encoding: chunked
Connection: keep-alive
x-oss-request-id: 628E1DEF184E20BB21000004
x-oss-transfer-acc-type: acc-none
x-oss-data-location: oss-cn-hangzhou-a
ETag: "E168EDBFAB5130BCA80EDF84E4E10B59"
Last-Modified: Sat, 02 Apr 2022 11:53:20 GMT
x-oss-object-type: Normal
x-oss-hash-crc64ecma: 5454933848876226229
x-oss-storage-class: Standard
x-oss-server-time: 865
{{Binary data of the compressed file}}K-d tree method
This example compresses example.pcd using the K-d tree method with Draco, a compression level of 0, 0 quantization bits, and the xyz fields compressed.
Request parameter string:
x-oss-process=pointcloud/compress,m_kdtree,fs_eHl6/kdtree,cl_0,qb_0,lib_dracoFull request:
GET /example.pcd?x-oss-process=pointcloud/compress,m_kdtree,fs_eHl6/kdtree,cl_0,qb_0,lib_draco HTTP/1.1
Host: file-demo.oss-cn-hangzhou.aliyuncs.com
Date: Fri, 28 Oct 2022 06:40:10 GMT
Authorization: OSS4-HMAC-SHA256 Credential=LTAI********************/20250417/cn-hangzhou/oss/aliyun_v4_request,Signature=a7c3554c729d71929e0b84489addee6b2e8d5cb48595adfc51868c299c0c218eResponse:
HTTP/1.1 200 OK
Server: AliyunOSS
Date: Wed, 25 May 2022 12:15:44 GMT
Content-Type: application/octet-stream
Transfer-Encoding: chunked
Connection: keep-alive
x-oss-request-id: 628E1DEF184E20BB21000004
x-oss-transfer-acc-type: acc-none
x-oss-data-location: oss-cn-hangzhou-a
ETag: "E168EDBFAB5130BCA80EDF84E4E10B59"
Last-Modified: Sat, 02 Apr 2022 11:53:20 GMT
x-oss-object-type: Normal
x-oss-hash-crc64ecma: 5454933848876226229
x-oss-storage-class: Standard
x-oss-server-time: 865
{{Binary data of the compressed file}}Use an SDK
Point cloud compression supports only synchronous processing. For SDK usage, see Use an SDK.
Billing
Point cloud compression generates billable items for both OSS and IMM.
OSS billable items
For OSS pricing, see OSS pricing.
| API | Billable item | Description |
|---|---|---|
| GetObject | GET requests | Fees are calculated based on the number of successful requests. |
| GetObject | Outbound traffic over the internet | Applies when you call GetObject using a public endpoint (for example, oss-cn-hangzhou.aliyuncs.com) or a transfer acceleration endpoint (for example, oss-accelerate.aliyuncs.com). Fees are charged based on the data size. |
| GetObject | Data retrieval from Infrequent Access (IA) storage | Applies when the retrieved data is stored in the IA storage class. Fees are charged based on the volume of retrieved data. |
| GetObject | Transfer acceleration | Applies when transfer acceleration is enabled and you access the bucket using an acceleration endpoint. Fees are charged based on the data size. |
IMM billable items
For IMM pricing, see IMM billable items.
Starting from 11:00 on July 28, 2025 (UTC+8), IMM point cloud compression is a paid service. For details, see IMM Billing Adjustment Announcement.
| API | Billable item | Description |
|---|---|---|
| CreateCompressPointCloudTask | PointCloudCompress | Fees are calculated based on the number of successful requests. |