@galaxyproject/rustgis

中文文档
0.0.1发布于 2026/10/27MITES Module零依赖近 30 天下载 5173

RustGIS browser GIS for Galaxy, including LAS/LAZ and deferred HTTP(S) datasets

原始使用文档
文档目录3 节
  1. LAS, LAZ and deferred data
  2. Build and run
  3. Tests

Galaxy RustGIS

Embeds the full RustGIS browser application in Galaxy. Open a history dataset to explore maps, layer styles, attribute tables, edits, layouts and browser-supported analysis. The application runs on the Galaxy origin with no extra GIS server.

Supported dataset extensions: geojson, las, laz and geocsv, which Galaxy assigns to CSV files with latitude and longitude columns. Galaxy has no datatypes for GeoTIFF, GeoParquet or zipped Shapefiles, and its generic csv, tsv, tiff, parquet and zip are mostly not geographic, so the plugin does not offer itself for them. Native GDAL/DuckDB and database features are unavailable in this browser build.

Save and Export use RustGIS's normal local downloads. Changes are held in the browser and are not automatically saved to a Galaxy visualization or uploaded into history. Use the application's Save/Export before leaving the viewer.

LAS, LAZ and deferred data

LAS/LAZ, including COPC LAZ, open as point layers with elevation, intensity, classification, return number and RGB when present. The browser retains up to 500,000 sampled points and considers at most the first 40 million LAZ points for decompression/sampling. Remote LiDAR files download in full, with a 256 MiB download limit. The COPC spatial index is not used. For larger clouds, create smaller extracts before viewing. Missing/unsupported coordinate systems are reported inside RustGIS; check that the point cloud appears in the expected place.

For ready datasets the adapter uses Galaxy's authenticated display URL. For deferred datasets it fetches metadata, then passes the primary source's HTTP(S) URL directly to RustGIS. Galaxy does not materialize the deferred dataset. This still downloads a remote LAZ into the browser. External sources must allow CORS requests from Galaxy and provide access without Galaxy's session credentials (for example, a public or signed HTTPS URL). Signed query strings are preserved. HTTPS Galaxy pages require HTTPS sources. Galaxy file-source URIs, embedded login credentials and declared source transformations are rejected with an explanation.

Stored datasets use an extensionless Galaxy display URL and download in full. The download limit applies to them.

Build and run

Requires Node.js 22+; Cargo/Trunk are not needed to build the Galaxy adapter.

npm ci
npm run build
npm run dev

The default development page opens bundled GeoJSON sample data. For an existing Galaxy session, use ?dataset_id=ENCODED_ID&root=https://your-galaxy.example/galaxy/ from that Galaxy origin. For local development against a local Galaxy, set GALAXY_ROOT=http://127.0.0.1:8080 before npm run dev; Vite proxies /api and the user must have a valid session through that origin. No API keys are bundled into assets. ?webgl on the demo page forces WebGL2.

npm run prepare:vendor downloads the exact prebuilt upstream application identified in upstream.json, verifying each file's Git blob ID and length. The source revision is 797ccab15bf97a2f4c3cbda689bc5a2447ef1a8d (RustGIS 0.4.0); its published build is cb2c8a3823b51838809d6e211a300eca8dee8093 in opengeos/rustgis-web. The unchanged WASM, JavaScript and snippets are cached under .vendor/ and staged under public/vendor/rustgis/. The first build downloads about 39 MiB; subsequent builds verify the cache and work offline. Build failure never silently substitutes a newer upstream. Updating the application requires updating the source/build revisions and every file hash, then rerunning the browser tests.

The local viewer/ shell supplies relative asset paths and reports network failures. It does not include the public deployment's analytics, manifest or service worker. Optional actions inside RustGIS (basemaps, fonts, plugins, external services or AI) can contact their providers. The production package's static/ output includes the complete browser app, its Apache-2.0 license and third-party notices. Only the Galaxy adapter is MIT-licensed.

Galaxy initializes the visualization by injecting index.js and index.css into an about:blank frame with #app[data-incoming]. The entry point resolves the viewer relative to its own module URL and uses the supplied Galaxy root, including deployment prefixes. Upstream requires the bare ?embed flag. The wrapper checks message origin and source; the native ready and project messages confirm startup and actual import respectively.

Tests

npx playwright install chromium
npm test

Playwright builds and serves the production artifact, reproducing Galaxy's script injection into a blank frame under a prefixed URL. Tests use the real WASM engine with synthetic GeoJSON, LAS, LAZ and GeoCSV fixtures. They cover session-authenticated stored data, direct deferred sources and preserved signed URLs, native LiDAR classification decoding, GeoCSV points, source/access/size errors, forged messages, nested asset paths, registration and licenses. All external services are blocked; the tests require no running Galaxy or public data service. A live deployment check is still needed for the target Galaxy's proxy, authentication and object-store routing.

PLAYWRIGHT_PORT selects the server port. PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH can point to an existing Chromium. Software WebGL is enabled for headless CI.

tests/fixtures/berlin.las and berlin.laz contain three generated, fictional LiDAR records at Berlin coordinates, with classes 2, 5 and 6 and elevations 35, 48 and 70. They contain no third-party survey data.

版本与发布记录

@galaxyproject/rustgis 共发布 3 个版本,首次发布于 2026/10/27;过去 12 个月发布了 3 个版本。

版本发布日期距今
0.0.1latest2026/10/2719 天前
0.0.02026/10/2719 天前
0.0.0-stage2026/10/2719 天前

关于 @galaxyproject/rustgis 的常见问题

@galaxyproject/rustgis 是什么?

RustGIS browser GIS for Galaxy, including LAS/LAZ and deferred HTTP(S) datasets

如何安装 @galaxyproject/rustgis?

在项目目录运行 npm install @galaxyproject/rustgis,或使用 pnpm add / yarn add / bun add。

@galaxyproject/rustgis 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/galaxyproject__rustgis 是否存在。

@galaxyproject/rustgis 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@galaxyproject/rustgis 可以商用吗?

@galaxyproject/rustgis 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@galaxyproject/rustgis 的下载量有多少?

根据 npm 官方下载统计,@galaxyproject/rustgis 在 2026/10/16 – 2026/11/14 这 30 天内被下载 5,173 次,日均约 172 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@galaxyproject/rustgis 还在维护吗?

最新版本 0.0.1 发布于 2026/10/27(19 天前);至今共发布 3 个版本,其中过去 12 个月发布了 3 个;首次发布于 2026/10/27。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。