import type { CompositeLayerProps, DefaultProps, GetPickingInfoParams, Layer, LayersList } from "@deck.gl/core"; import { CompositeLayer } from "@deck.gl/core"; import type { PolygonLayerProps } from "@deck.gl/layers"; import * as ga from "@geoarrow/geoarrow-js"; import * as arrow from "apache-arrow"; import type { FunctionThread, Pool } from "threads"; import type { ColorAccessor, FloatAccessor, GeoArrowPickingInfo } from "../types"; import type { GeoArrowExtraPickingProps } from "../utils/picking"; /** * Get the exterior of a PolygonVector or PolygonData as a MultiLineString * * Note that casting to a MultiLineString is a no-op of the underlying data * structure. For the purposes of the PolygonLayer we don't want to cast to a * LineString because that would change the number of rows in the table. */ export declare function getPolygonExterior(input: ga.vector.PolygonVector): ga.vector.MultiLineStringVector; export declare function getPolygonExterior(input: ga.data.PolygonData): ga.data.MultiLineStringData; /** * Get the exterior of a MultiPolygonVector or MultiPolygonData * * Note that for the purposes of the PolygonLayer, we don't want to change the * number of rows in the table. Instead, we convert each MultiPolygon to a * single MultiLineString, combining all exteriors of each contained Polygon * into a single united MultiLineString. * * This means that we need to condense both two offset buffers from the * MultiPolygonVector/Data (geomOffsets and polygonOffsets) into a single * `geomOffsets` for the new MultiLineStringVector/Data. */ export declare function getMultiPolygonExterior(input: ga.vector.MultiPolygonVector): ga.vector.MultiLineStringVector; export declare function getMultiPolygonExterior(input: ga.data.MultiPolygonData): ga.data.MultiLineStringData; /** All properties supported by GeoArrowPolygonLayer */ export type GeoArrowPolygonLayerProps = Omit & _GeoArrowPolygonLayerProps & CompositeLayerProps; /** Properties added by GeoArrowPolygonLayer */ type _GeoArrowPolygonLayerProps = { data: arrow.RecordBatch; /** Polygon geometry accessor. */ getPolygon?: ga.data.PolygonData | ga.data.MultiPolygonData; /** Fill color accessor. * @default [0, 0, 0, 255] */ getFillColor?: ColorAccessor; /** Stroke color accessor. * @default [0, 0, 0, 255] */ getLineColor?: ColorAccessor; /** * Line width value of accessor. * @default 1 */ getLineWidth?: FloatAccessor; /** * Elevation value of accessor. * * Only used if `extruded: true`. * * @default 1000 */ getElevation?: FloatAccessor; /** A worker pool for earcut triangulation. * * You can use the `initEarcutPool` helper function to create a pool. This is * helpful if you're rendering many Polygon layers and want to share a pool * between them. * * If not provided, a pool will be created automatically. * * As of v0.4, layers have been refactored to take in a _RecordBatch_ as * input, instead of a table. This means that if a worker pool is created as * part of this layer, it will only be used once. To take advantage of the * pool, ideally you should create it externally and pass it in via this prop. */ earcutWorkerPool?: Pool | null; /** * URL to worker that performs earcut triangulation. * * By default this loads from the jsdelivr CDN, but end users may want to host * this on their own domain. */ earcutWorkerUrl?: string | URL | null; /** * The number of workers used for the earcut thread pool. */ earcutWorkerPoolSize?: number; /** * If `true`, validate the arrays provided (e.g. chunk lengths) * @default true */ _validate?: boolean; }; /** The `GeoArrowPolygonLayer` renders filled, stroked and/or extruded polygons. * * GeoArrowPolygonLayer is a CompositeLayer that wraps the * GeoArrowSolidPolygonLayer and the GeoArrowPathLayer. */ export declare class GeoArrowPolygonLayer extends CompositeLayer & ExtraProps> { static defaultProps: DefaultProps; static layerName: string; getPickingInfo(params: GetPickingInfoParams & { sourceLayer: { props: GeoArrowExtraPickingProps; }; }): GeoArrowPickingInfo; renderLayers(): Layer | LayersList | null; _renderLayers(geometryColumn: ga.data.PolygonData | ga.data.MultiPolygonData): Layer | LayersList | null; } export {}; //# sourceMappingURL=polygon-layer.d.ts.map