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
urls
- Type
- Collection<string>
- 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
| Name | Return Type | Object |
|---|---|---|
| | |
| | |
| | |
| |
getParquetLayerInfo
Retrieves information about a ParquetLayer from the first parquet file in the specified URLs array. Throws an error if the parquet file is empty or if the information cannot be determined.
- Signature
-
getParquetLayerInfo (urls: string[], options?: ParquetLayerInfoOptions): Promise<ParquetLayerInfo>
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| urls | string[] | An array of URLs pointing to parquet files. At least one url must be provided. | |
| options | An object specifying additional options. See ParquetLayerInfoOptions for details. | |
- Returns
- Promise<ParquetLayerInfo>
A promise that resolves to the parquet layer information.
Example
const urls = ["url-to-your-parquet-file.parquet"];const info = await parquetUtils.getParquetLayerInfo(urls);
// create new parquet layer using the retrieved infoconst layer = new ParquetLayer(info);