Exporte un objet raster vers un compartiment Object Storage Service (OSS), un compartiment Multi-Cloud Object Storage (MinIO) ou un fichier Hadoop Distributed File System (HDFS).
Syntaxe
boolean ST_ExportTo(raster source,
cstring format,
cstring url,
integer level = 0);
Paramètres
| Paramètre | Description |
| source | Objet raster à exporter. |
| format | Format des données exportées. Valeurs courantes : GTiff, BMP. |
| url | Chemin du fichier externe. La sélection de sous-ensembles n'est pas prise en charge. Pour plus d'informations, consultez la section Chemins de stockage d'objets. |
| level | Niveau de pyramide. |
Le paramètre format spécifie le nom du format d'exportation. Les formats courants sont répertoriés ci-dessous.
| Nom | Nom complet |
| BMP | Microsoft Windows Device Independent Bitmap (.bmp) |
| ECW | ERDAS Compressed Wavelets (.ecw) |
| EHdr | ESRI .hdr Labelled |
| GIF | Graphics Interchange Format (.gif) |
| GPKG | GeoPackage |
| GTiff | TIFF/BigTIFF/GeoTIFF (.tif) |
| HDF4 | Hierarchical Data Format Release 4 (HDF4) |
| Geospatial PDF | |
| PNG | Portable Network Graphics (.png) |
| COG | Cloud optimized GeoTIFF |
Description
Renvoie true si l'exportation réussit et false en cas d'échec.
Appelez la fonction ST_RasterDrivers pour interroger les types de données pris en charge.
Exemples
-- Export to OSS
Select ST_ExportTo(raster, 'GTiff', 'OSS://<ak>:<ak_secret>@oss-cn-beijing-internal.aliyuncs.com/mybucket/data/image.tif')
from raster_table
where id=1;
-- Export to MinIO
Select ST_ExportTo(raster, 'PNG', 'MIO://<ak>:<ak_secret>@10.0.XX.XX:443/mybucket/data/image.png')
from raster_table
where id=1;
-- Export to HDFS
Select ST_ExportTo(raster, 'PNG', 'HDFS://<user_name>@10.0.XX.XX:8020/path/image.png')
from raster_table
where id=1;