@walkthru-earth/objex-utils
v1.3.1
Published
Pure TypeScript utilities from objex — WKB parser, GeoArrow builder, storage URL parser, file type registry
Readme
@walkthru-earth/objex-utils
Pure TypeScript utilities extracted from objex. Zero Svelte dependency. Works with any JS framework or Node 18+.
Built for high-performance geospatial pipelines: WKB parsing, GeoArrow table construction, GeoParquet footer reading via range requests, cloud URL parsing, and a 200+ extension file-type registry.
Install
pnpm add @walkthru-earth/objex-utils
# or
npm install @walkthru-earth/objex-utilsAt a glance
import {
// WKB / GeoArrow
parseWKB,
findGeoColumn,
buildGeoArrowTables,
// Parquet metadata (hyparquet, range requests)
readParquetMetadata,
extractEpsgFromGeoMeta,
extractBounds,
// stac-geoparquet (detection + row → STAC Item)
isStacGeoparquetSchema,
stacRowToItem,
flattenStacBbox,
pickStacPrimaryAsset,
resolveStacAssetHref,
// Storage URLs
parseStorageUrl,
resolveCloudUrl,
looksLikeUrl,
// File-type registry
getFileTypeInfo,
getViewerKind,
getDuckDbReadFn,
isQueryable,
// Formatting / classification / hex / CSV / JSON
formatFileSize,
formatValue,
classifyType,
generateHexDump,
serializeToCsv,
serializeToJson,
// Error handling
handleLoadError,
// Constants
WGS84_CODES,
DEFAULT_TARGET_CRS,
STORAGE_KEYS,
} from '@walkthru-earth/objex-utils';Documentation
Full per-module developer reference lives in docs/. Each page lists the exact TypeScript signature, parameter semantics, return shape, peer-dependency requirements, and non-obvious behavior.
| Page | Covers |
|------|--------|
| docs/geometry.md | WKB parser, GeoArrow builder, geometry-column detection |
| docs/cog.md | Cloud-Optimized GeoTIFF pipeline helpers, band configs, color ramps |
| docs/parquet-metadata.md | readParquetMetadata + CRS / bounds / geometry-type extractors |
| docs/stac-geoparquet.md | stac-geoparquet detection + row → STAC Item transforms |
| docs/storage.md | URL parsing, provider registry, StorageAdapter, UrlAdapter |
| docs/query-engine.md | QueryEngine interface + handle / result types |
| docs/file-types.md | File-type registry: getFileTypeInfo, getViewerKind, getDuckDbReadFn, … |
| docs/formatting.md | Display formatters, column-type classification, hex dump, CSV/JSON export |
| docs/file-sort.md | sortFileEntries, toggleSortField |
| docs/markdown-sql.md | Markdown + SQL block parsing (Evidence-compatible) |
| docs/local-storage.md | SSR-safe loadFromStorage / persistToStorage |
| docs/errors.md | handleLoadError |
| docs/types-constants.md | Connection, Tab, FileEntry, WriteResult, Theme, shared constants |
Optional peer dependencies
Heavy dependencies are optional peers. Install only what you use.
| Peer | Required by |
|------|-------------|
| apache-arrow >=14 | buildGeoArrowTables |
| hyparquet >=1.25 | readParquetMetadata and friends |
| hyparquet-compressors >=1.1 | SNAPPY / ZSTD / GZIP / LZ4 / BROTLI support in readParquetMetadata |
| yaml >=2 | parseMarkdownDocument (lazy-loaded — only when frontmatter is present) |
As of v1.2 the yaml dependency is imported dynamically inside parseMarkdownDocument. Consumers who never call that function do not need yaml at all. Before v1.2 the bundle failed to load without yaml even for unrelated imports.
Related
@walkthru-earth/objex— Full Svelte 5 component library with viewers, stores, and query engine.
