Skip to content

Commit

Permalink
Update repo to match fork's layout (#135)
Browse files Browse the repository at this point in the history
* Move files

* Update repo layout to match fork

* fix test import

* easier import
  • Loading branch information
kylebarron authored Sep 19, 2024
1 parent 25fdeaf commit 598a62c
Show file tree
Hide file tree
Showing 18 changed files with 162 additions and 88 deletions.
4 changes: 4 additions & 0 deletions src/constants.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// deck.gl-community
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors

/**
* Enum holding GeoArrow extension type names
*/
Expand Down
59 changes: 36 additions & 23 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,25 +1,38 @@
export { GeoArrowArcLayer } from "./arc-layer.js";
export { GeoArrowColumnLayer } from "./column-layer.js";
export { GeoArrowH3HexagonLayer as _GeoArrowH3HexagonLayer } from "./h3-hexagon-layer.js";
export { GeoArrowHeatmapLayer } from "./heatmap-layer.js";
export { GeoArrowPathLayer } from "./path-layer.js";
export { GeoArrowPointCloudLayer } from "./point-cloud-layer.js";
export { GeoArrowPolygonLayer } from "./polygon-layer.js";
export { GeoArrowScatterplotLayer } from "./scatterplot-layer.js";
export { GeoArrowSolidPolygonLayer } from "./solid-polygon-layer.js";
export { GeoArrowTextLayer as _GeoArrowTextLayer } from "./text-layer.js";
export { GeoArrowTripsLayer } from "./trips-layer.js";

export type { GeoArrowArcLayerProps } from "./arc-layer.js";
export type { GeoArrowColumnLayerProps } from "./column-layer.js";
export type { GeoArrowH3HexagonLayerProps as _GeoArrowH3HexagonLayerProps } from "./h3-hexagon-layer.js";
export type { GeoArrowHeatmapLayerProps } from "./heatmap-layer.js";
export type { GeoArrowPathLayerProps } from "./path-layer.js";
export type { GeoArrowPointCloudLayerProps } from "./point-cloud-layer.js";
export type { GeoArrowPolygonLayerProps } from "./polygon-layer.js";
export type { GeoArrowScatterplotLayerProps } from "./scatterplot-layer.js";
export type { GeoArrowSolidPolygonLayerProps } from "./solid-polygon-layer.js";
export type { GeoArrowTextLayerProps as _GeoArrowTextLayerProps } from "./text-layer.js";
export type { GeoArrowTripsLayerProps } from "./trips-layer.js";
// deck.gl-community
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors

export type { GeoArrowArcLayerProps } from "./layers/arc-layer";
export { GeoArrowArcLayer } from "./layers/arc-layer";

export type { GeoArrowColumnLayerProps } from "./layers/column-layer";
export { GeoArrowColumnLayer } from "./layers/column-layer";

export type { GeoArrowH3HexagonLayerProps as _GeoArrowH3HexagonLayerProps } from "./layers/h3-hexagon-layer";
export { GeoArrowH3HexagonLayer as _GeoArrowH3HexagonLayer } from "./layers/h3-hexagon-layer";

export type { GeoArrowHeatmapLayerProps } from "./layers/heatmap-layer";
export { GeoArrowHeatmapLayer } from "./layers/heatmap-layer";

export type { GeoArrowPathLayerProps } from "./layers/path-layer";
export { GeoArrowPathLayer } from "./layers/path-layer";

export type { GeoArrowPointCloudLayerProps } from "./layers/point-cloud-layer";
export { GeoArrowPointCloudLayer } from "./layers/point-cloud-layer";

export type { GeoArrowPolygonLayerProps } from "./layers/polygon-layer";
export { GeoArrowPolygonLayer } from "./layers/polygon-layer";

export type { GeoArrowScatterplotLayerProps } from "./layers/scatterplot-layer";
export { GeoArrowScatterplotLayer } from "./layers/scatterplot-layer";

export type { GeoArrowSolidPolygonLayerProps } from "./layers/solid-polygon-layer";
export { GeoArrowSolidPolygonLayer } from "./layers/solid-polygon-layer";

export type { GeoArrowTextLayerProps as _GeoArrowTextLayerProps } from "./layers/text-layer";
export { GeoArrowTextLayer as _GeoArrowTextLayer } from "./layers/text-layer";

export type { GeoArrowTripsLayerProps } from "./layers/trips-layer";
export { GeoArrowTripsLayer } from "./layers/trips-layer";

export type { GeoArrowPickingInfo } from "./types.js";
12 changes: 8 additions & 4 deletions src/arc-layer.ts → src/layers/arc-layer.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// deck.gl-community
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors

import {
CompositeLayer,
CompositeLayerProps,
Expand All @@ -11,15 +15,15 @@ import { ArcLayer } from "@deck.gl/layers";
import type { ArcLayerProps } from "@deck.gl/layers";
import * as arrow from "apache-arrow";
import * as ga from "@geoarrow/geoarrow-js";
import { assignAccessor, extractAccessorsFromProps } from "./utils.js";
import { assignAccessor, extractAccessorsFromProps } from "../utils/utils";
import { child } from "@geoarrow/geoarrow-js";
import {
GeoArrowExtraPickingProps,
computeChunkOffsets,
getPickingInfo,
} from "./picking.js";
import { ColorAccessor, FloatAccessor, GeoArrowPickingInfo } from "./types.js";
import { validateAccessors } from "./validate.js";
} from "../utils/picking";
import { ColorAccessor, FloatAccessor, GeoArrowPickingInfo } from "../types";
import { validateAccessors } from "../utils/validate";

/** All properties supported by GeoArrowArcLayer */
export type GeoArrowArcLayerProps = Omit<
Expand Down
14 changes: 9 additions & 5 deletions src/column-layer.ts → src/layers/column-layer.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// deck.gl-community
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors

import {
CompositeLayer,
CompositeLayerProps,
Expand All @@ -14,16 +18,16 @@ import {
assignAccessor,
extractAccessorsFromProps,
getGeometryVector,
} from "./utils.js";
} from "../utils/utils";
import * as ga from "@geoarrow/geoarrow-js";
import { ColorAccessor, FloatAccessor, GeoArrowPickingInfo } from "./types.js";
import { EXTENSION_NAME } from "./constants.js";
import { ColorAccessor, FloatAccessor, GeoArrowPickingInfo } from "../types";
import { EXTENSION_NAME } from "../constants";
import {
GeoArrowExtraPickingProps,
computeChunkOffsets,
getPickingInfo,
} from "./picking.js";
import { validateAccessors } from "./validate.js";
} from "../utils/picking";
import { validateAccessors } from "../utils/validate";

/** All properties supported by GeoArrowColumnLayer */
export type GeoArrowColumnLayerProps = Omit<
Expand Down
15 changes: 10 additions & 5 deletions src/h3-hexagon-layer.ts → src/layers/h3-hexagon-layer.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// deck.gl-community
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors

import {
CompositeLayer,
CompositeLayerProps,
Expand All @@ -6,17 +10,18 @@ import {
Layer,
LayersList,
} from "@deck.gl/core";
import { H3HexagonLayer } from "@deck.gl/geo-layers";
import type { H3HexagonLayerProps } from "@deck.gl/geo-layers";
import { H3HexagonLayer } from "@deck.gl/geo-layers";
import * as arrow from "apache-arrow";
import { assignAccessor, extractAccessorsFromProps } from "./utils.js";
import { GeoArrowPickingInfo } from "./types.js";

import { GeoArrowPickingInfo } from "../types";
import { assignAccessor, extractAccessorsFromProps } from "../utils/utils";
import {
GeoArrowExtraPickingProps,
computeChunkOffsets,
getPickingInfo,
} from "./picking.js";
import { validateAccessors } from "./validate.js";
} from "../utils/picking";
import { validateAccessors } from "../utils/validate";

/** All properties supported by GeoArrowH3HexagonLayer */
export type GeoArrowH3HexagonLayerProps = Omit<
Expand Down
14 changes: 9 additions & 5 deletions src/heatmap-layer.ts → src/layers/heatmap-layer.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// deck.gl-community
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors

import {
CompositeLayer,
CompositeLayerProps,
Expand All @@ -14,11 +18,11 @@ import {
assignAccessor,
extractAccessorsFromProps,
getGeometryVector,
} from "./utils.js";
import { FloatAccessor } from "./types.js";
import { EXTENSION_NAME } from "./constants.js";
import { validateAccessors } from "./validate.js";
import { computeChunkOffsets } from "./picking.js";
} from "../utils/utils";
import { FloatAccessor } from "../types";
import { EXTENSION_NAME } from "../constants";
import { validateAccessors } from "../utils/validate";
import { computeChunkOffsets } from "../utils/picking";

/** All properties supported by GeoArrowHeatmapLayer */
export type GeoArrowHeatmapLayerProps = Omit<
Expand Down
16 changes: 9 additions & 7 deletions src/path-layer.ts → src/layers/path-layer.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
// deck.gl-community
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors

import {
Accessor,
CompositeLayer,
CompositeLayerProps,
DefaultProps,
Expand All @@ -18,15 +21,15 @@ import {
getGeometryVector,
getMultiLineStringResolvedOffsets,
invertOffsets,
} from "./utils.js";
} from "../utils/utils";
import {
GeoArrowExtraPickingProps,
computeChunkOffsets,
getPickingInfo,
} from "./picking.js";
import { ColorAccessor, FloatAccessor, GeoArrowPickingInfo } from "./types.js";
import { EXTENSION_NAME } from "./constants.js";
import { validateAccessors } from "./validate.js";
} from "../utils/picking";
import { ColorAccessor, FloatAccessor, GeoArrowPickingInfo } from "../types";
import { EXTENSION_NAME } from "../constants";
import { validateAccessors } from "../utils/validate";

/** All properties supported by GeoArrowPathLayer */
export type GeoArrowPathLayerProps = Omit<
Expand Down Expand Up @@ -276,7 +279,6 @@ export class GeoArrowPathLayer<
//
// Note: this is ringOffsets, not geomOffsets because we're rendering
// the individual paths on the map.
// @ts-ignore
startIndices: ringOffsets,
attributes: {
getPath: { value: flatCoordinateArray, size: nDim },
Expand Down
14 changes: 9 additions & 5 deletions src/point-cloud-layer.ts → src/layers/point-cloud-layer.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// deck.gl-community
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors

import {
CompositeLayer,
CompositeLayerProps,
Expand All @@ -17,15 +21,15 @@ import {
assignAccessor,
extractAccessorsFromProps,
getGeometryVector,
} from "./utils.js";
} from "../utils/utils";
import {
GeoArrowExtraPickingProps,
computeChunkOffsets,
getPickingInfo,
} from "./picking.js";
import { ColorAccessor, GeoArrowPickingInfo, NormalAccessor } from "./types.js";
import { EXTENSION_NAME } from "./constants.js";
import { validateAccessors } from "./validate.js";
} from "../utils/picking";
import { ColorAccessor, GeoArrowPickingInfo, NormalAccessor } from "../types";
import { EXTENSION_NAME } from "../constants";
import { validateAccessors } from "../utils/validate";

/* All properties supported by GeoArrowPointCloudLayer */
export type GeoArrowPointCloudLayerProps = Omit<
Expand Down
16 changes: 10 additions & 6 deletions src/polygon-layer.ts → src/layers/polygon-layer.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// deck.gl-community
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors

import {
CompositeLayer,
CompositeLayerProps,
Expand All @@ -11,12 +15,12 @@ import { PolygonLayer } from "@deck.gl/layers";
import type { PolygonLayerProps } from "@deck.gl/layers";
import * as arrow from "apache-arrow";
import * as ga from "@geoarrow/geoarrow-js";
import { getGeometryVector } from "./utils.js";
import { GeoArrowExtraPickingProps, getPickingInfo } from "./picking.js";
import { ColorAccessor, FloatAccessor, GeoArrowPickingInfo } from "./types.js";
import { EXTENSION_NAME } from "./constants.js";
import { GeoArrowSolidPolygonLayer } from "./solid-polygon-layer.js";
import { GeoArrowPathLayer } from "./path-layer.js";
import { getGeometryVector } from "../utils/utils";
import { GeoArrowExtraPickingProps, getPickingInfo } from "../utils/picking";
import { ColorAccessor, FloatAccessor, GeoArrowPickingInfo } from "../types";
import { EXTENSION_NAME } from "../constants";
import { GeoArrowSolidPolygonLayer } from "./solid-polygon-layer";
import { GeoArrowPathLayer } from "./path-layer";

/**
* Get the exterior of a PolygonVector or PolygonData as a MultiLineString
Expand Down
14 changes: 9 additions & 5 deletions src/scatterplot-layer.ts → src/layers/scatterplot-layer.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// deck.gl-community
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors

import {
CompositeLayer,
CompositeLayerProps,
Expand All @@ -16,15 +20,15 @@ import {
extractAccessorsFromProps,
getGeometryVector,
invertOffsets,
} from "./utils.js";
} from "../utils/utils";
import {
GeoArrowExtraPickingProps,
computeChunkOffsets,
getPickingInfo,
} from "./picking.js";
import { ColorAccessor, FloatAccessor, GeoArrowPickingInfo } from "./types.js";
import { EXTENSION_NAME } from "./constants.js";
import { validateAccessors } from "./validate.js";
} from "../utils/picking";
import { ColorAccessor, FloatAccessor, GeoArrowPickingInfo } from "../types";
import { EXTENSION_NAME } from "../constants";
import { validateAccessors } from "../utils/validate";

/** All properties supported by GeoArrowScatterplotLayer */
export type GeoArrowScatterplotLayerProps = Omit<
Expand Down
15 changes: 9 additions & 6 deletions src/solid-polygon-layer.ts → src/layers/solid-polygon-layer.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// deck.gl-community
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors

import {
CompositeLayer,
CompositeLayerProps,
Expand All @@ -20,15 +24,15 @@ import {
getMultiPolygonResolvedOffsets,
getPolygonResolvedOffsets,
invertOffsets,
} from "./utils.js";
} from "../utils/utils";
import {
GeoArrowExtraPickingProps,
computeChunkOffsets,
getPickingInfo,
} from "./picking.js";
import { ColorAccessor, FloatAccessor, GeoArrowPickingInfo } from "./types.js";
import { EXTENSION_NAME } from "./constants.js";
import { validateAccessors } from "./validate.js";
} from "../utils/picking";
import { ColorAccessor, FloatAccessor, GeoArrowPickingInfo } from "../types";
import { EXTENSION_NAME } from "../constants";
import { validateAccessors } from "../utils/validate";
import { spawn, Transfer, BlobWorker, Pool } from "threads";
import type { FunctionThread } from "threads";

Expand Down Expand Up @@ -447,7 +451,6 @@ export class GeoArrowSolidPolygonLayer<
// Number of geometries
length: polygonData.length,
// Offsets into coordinateArray where each polygon starts
// @ts-ignore
startIndices: resolvedRingOffsets,
attributes: {
getPolygon: { value: flatCoordinateArray, size: nDim },
Expand Down
14 changes: 9 additions & 5 deletions src/text-layer.ts → src/layers/text-layer.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// deck.gl-community
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors

import {
CompositeLayer,
CompositeLayerProps,
Expand All @@ -16,15 +20,15 @@ import {
expandArrayToCoords,
extractAccessorsFromProps,
getGeometryVector,
} from "./utils.js";
} from "../utils/utils";
import {
GeoArrowExtraPickingProps,
computeChunkOffsets,
getPickingInfo,
} from "./picking.js";
import { ColorAccessor, FloatAccessor, GeoArrowPickingInfo } from "./types.js";
import { EXTENSION_NAME } from "./constants.js";
import { validateAccessors } from "./validate.js";
} from "../utils/picking";
import { ColorAccessor, FloatAccessor, GeoArrowPickingInfo } from "../types";
import { EXTENSION_NAME } from "../constants";
import { validateAccessors } from "../utils/validate";

/** All properties supported by GeoArrowTextLayer */
export type GeoArrowTextLayerProps = Omit<
Expand Down
Loading

0 comments on commit 598a62c

Please sign in to comment.