import { getParquetLayerInfo } from "@arcgis/core/layers/support/parquetUtils.js";const { getParquetLayerInfo } = await $arcgis.import("@arcgis/core/layers/support/parquetUtils.js");Type definitions
ParquetLayerInfo
- Since
- ArcGIS Maps SDK for JavaScript 5.0
Contains an information inferred from the parquet files.
- See also
data
- Type
- ParquetDataUnion | undefined
- Since
- ArcGIS Maps SDK for JavaScript 5.0
The data backing the parquet layer.
urls
- Type
- Collection<string> | undefined
- Since
- ArcGIS Maps SDK for JavaScript 5.0
A collection of URLs pointing to the parquet files.
geometryEncoding
- Type
- ParquetGeometryEncodingUnion | null | undefined
- Since
- ArcGIS Maps SDK for JavaScript 5.0
The encoding format used to store geometries in the parquet files. See ParquetLayer.geometryEncoding for more information.
geometryType
- Type
- ParquetGeometryType | null | undefined
- Since
- ArcGIS Maps SDK for JavaScript 5.0
The geometry type of the features in the layer.
spatialReference
- Type
- SpatialReference | undefined
- Since
- ArcGIS Maps SDK for JavaScript 5.0
The spatial reference of the layer.
ParquetGeometryType
The geometry type of the layer’s features, inferred from the Parquet file and returned by getParquetLayerInfo().
- See also
- Type
- "point" | "polygon" | "polyline" | "multipoint"
ParquetLayerInfoOptions
Options for the getParquetLayerInfo() function.
- Supertypes
- AbortOptions
customParameters
- Type
- CustomParameters | null | undefined
A list of key-value pairs of parameters to append to the url.
Functions
getParquetLayerInfo
Retrieves information about a ParquetLayer from the first Parquet file in the specified data source. Throws an error if the parquet file is empty or if the information cannot be determined.
- Signature
-
getParquetLayerInfo (data: string[] | ParquetDataUnion, options?: ParquetLayerInfoOptions): Promise<ParquetLayerInfo>
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| data | The data source for the parquet layer. Pass a ParquetFilesData, a ParquetPortalItemData, or an array of URLs pointing to parquet files for backward compatibility. | | |
| options | An object specifying additional options. See ParquetLayerInfoOptions for details. | |
- Returns
- Promise<ParquetLayerInfo>
A promise that resolves to the parquet layer information.
- Example
- const data = new ParquetFilesData({urls: ["url-to-your-parquet-file.parquet"]});const info = await parquetUtils.getParquetLayerInfo(data);// create new parquet layer using the retrieved infoconst layer = new ParquetLayer(info);