Storing point clouds consumes a large amount of storage space. Transferring uncompressed point cloud files requires significant bandwidth, which results in high transmission costs. Therefore, you must compress point clouds.
Scenarios
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 generated from 3D city reconstruction to enable smooth data rendering and display.
Mixed reality: Provide real-time encoding and decoding capabilities for point cloud data.
Notes
Point cloud compression supports only synchronous processing (the x-oss-process method).
Before you use point cloud compression, you must attach an IMM project. For information about how to attach a project in the console or using an API, see Quick Start and AttachOSSBucket - Attach an OSS bucket.
Anonymous access will be denied.
You must have the required permissions to use the feature. For more information, see permissions.
Parameters
Action: pointcloud/compress
The following table describes the parameters.
Parameter | Type | Required | Description |
f | string | No | The format of the PCD file. Currently, only the pcd format is supported. |
m | string | Yes | The point cloud file compression method. Valid values:
|
fs | string | No | The PCD property fields to be compressed and the compression order. After compression, the data is decompressed in this order. Currently, only the xyz property is supported. Note This parameter must be URL-safe Base64 encoded. For example, to specify `xyz`, use `eHI6` in the request. |
The following parameters are for the Octree compression method. Append these parameters after the /octree parameter.
The following table describes the parameters:
Parameter | Type | Required | Description |
lib | string | No | The name of the compression library. Currently, only pcl is supported. |
pr | float | No | The point cloud resolution. This variable determines the precision of point coordinates during encoding. The default value is 0.01. The value ranges from 0 to 1. |
or | float | No | The minimum block size when partitioning the octree, which is the edge length of a voxel. The default value is 0.01. The value ranges from 0 to 1. |
d | int | No | Specifies whether to use downsampling. A value of 1 indicates that downsampling is used. Downsampling is used by default. |
The following parameters are for the Kdtree compression method. Append these parameters after the /kdtree parameter.
The following table describes the parameters:
Parameter | Type | Required | Description |
lib | string | No | The name of the compression library. Currently, only draco is supported. |
cl | int | Yes | The compression level. A larger value indicates better detail. The value ranges from 0 to 10. |
qb | int | Yes | The number of quantization bits. A larger value indicates that more details are retained. The value ranges from 1 to 31. |
Use the REST API
Compress a point cloud file using the Octree method
Processing method
Compressed file name: example.pcd
Compression method: Octree
Compression library: pcl
Point cloud resolution: 0.01
Minimum octree block size: 0.01
Use downsampling: 1
PCD fields to compress: xyz
Request example
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 example
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}}Compress a point cloud file using the Kdtree method
Processing method
Compressed file name: example.pcd
Compression method: Kdtree
Compression library: draco
Compression level: 1
Quantization bits: 1
PCD fields to compress: xyz
Examples
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 example
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 more information about how to use an SDK, see Use an SDK.
Billing
Point cloud compression generates the following billable items for OSS and IMM:
OSS: For more information about pricing, see OSS Pricing.
API
Billable item
Description
GetObject
GET requests
Fees are calculated based on the number of successful requests.
Outbound traffic over the internet
If you call the GetObject operation using a public endpoint (for example, oss-cn-hangzhou.aliyuncs.com) or a transfer acceleration endpoint (for example, oss-accelerate.aliyuncs.com), fees for outbound traffic over the internet are generated. These fees are charged based on the data size.
Data retrieval from Infrequent Access (IA) storage
If the retrieved data is stored in the IA storage class, data retrieval fees are generated. These fees are charged based on the volume of retrieved data.
Transfer acceleration
If you enable transfer acceleration and use an acceleration endpoint to access your bucket, transfer acceleration fees are generated. These fees are charged based on the data size.
IMM: For more information about pricing, see IMM billable items.
ImportantStarting from 11:00 on July 28, 2025 (UTC+8), the IMM point cloud compression service will be upgraded from a free service to a paid service. The specific billable item is PointCloudCompress. For more information, see IMM Billing Adjustment Announcement.
API
Billable item
Description
CreateCompressPointCloudTask
PointCloudCompress
Fees are calculated based on the number of successful requests.