From 6f9536df2efe2f8300b4d31e525c1aaffcb2ba53 Mon Sep 17 00:00:00 2001 From: giswqs Date: Sat, 10 Oct 2026 22:10:54 -0400 Subject: [PATCH 1/9] Add the GeoLibre tool suite to geoprocessing The desktop app and CLI now include the GeoLibre/Whitebox tool suite (1,062 raster, vector, LiDAR, hydrology and terrain tools) next to the built-in tools, through a new crate, rustgis-geolibre (L3), behind the engine's `geolibre` feature. The web build doesn't enable it: the tools read and write files. - analysis: external tools register lazily (register_external) and are listed by tools(), found by tool() and run by run(). New parameter kinds (raster layer, vector layer, switch, file path), parameter help, raster inputs, and Output::Layers for tools with several outputs. - geolibre: tool forms are generated from the suite's manifests. A run stages raster layers as their files and vector layers (or their selection) as GeoJSON in a metric system (the raster's, or the data's UTM zone), runs the tool in-process, and loads its outputs back: rasters embedded in the project, vectors in longitude/latitude, text reports as messages. - engine: gp.run adds every output layer; gp.tools lists all tools. - ui: GeoLibre toolboxes in the Geoprocessing pane and Catalog (closed until opened, search capped), raster/vector layer pickers, switches, hover help; command search finds the tools. - Tests run slope, a 1 km buffer and raster sampling at points end to end, and every tool with junk parameters. --- AGENTS.md | 4 +- ATTRIBUTION.md | 4 + Cargo.lock | 2783 +++++++++++++++++++++++++++++++- Cargo.toml | 1 + README.md | 2 +- apps/rustgis-cli/Cargo.toml | 2 +- apps/rustgis/Cargo.toml | 2 +- crates/analysis/Cargo.toml | 1 + crates/analysis/src/lib.rs | 99 +- crates/analysis/src/tools.rs | 78 +- crates/engine/Cargo.toml | 5 + crates/engine/src/cmd/gp.rs | 36 +- crates/engine/src/lib.rs | 3 + crates/engine/src/tests.rs | 28 + crates/geolibre/Cargo.toml | 18 + crates/geolibre/src/lib.rs | 504 ++++++ crates/geolibre/src/tests.rs | 126 ++ crates/ui-egui/src/chrome.rs | 8 +- crates/ui-egui/src/i18n/az.tsv | 3 + crates/ui-egui/src/i18n/de.tsv | 3 + crates/ui-egui/src/i18n/es.tsv | 3 + crates/ui-egui/src/i18n/fr.tsv | 3 + crates/ui-egui/src/i18n/id.tsv | 3 + crates/ui-egui/src/i18n/it.tsv | 3 + crates/ui-egui/src/i18n/ja.tsv | 3 + crates/ui-egui/src/i18n/ko.tsv | 3 + crates/ui-egui/src/i18n/nl.tsv | 3 + crates/ui-egui/src/i18n/pt.tsv | 3 + crates/ui-egui/src/i18n/ru.tsv | 3 + crates/ui-egui/src/i18n/tr.tsv | 3 + crates/ui-egui/src/i18n/vi.tsv | 3 + crates/ui-egui/src/i18n/zh.tsv | 3 + crates/ui-egui/src/panes.rs | 173 +- docs/user-guide.md | 22 + xtask/src/main.rs | 3 +- 35 files changed, 3790 insertions(+), 154 deletions(-) create mode 100644 crates/geolibre/Cargo.toml create mode 100644 crates/geolibre/src/lib.rs create mode 100644 crates/geolibre/src/tests.rs diff --git a/AGENTS.md b/AGENTS.md index 20ef9b77f8..262a5844b3 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -19,6 +19,7 @@ egui front end, headless screenshots for UI work. | L1 | `data` | features, typed attributes, GeoJSON/CSV/Shapefile I/O, SQL where clauses, rasters (GeoTIFF/ASCII grid, EPSG reprojection) | | L2 | `map`, `analysis` | layers, symbology, labels, camera, basemaps; geoprocessing tools | | L3 | `render` | tiny-skia map renderer, label placement, PNG export, font discovery | +| L3 | `geolibre` | the GeoLibre/Whitebox tool suite as geoprocessing tools (native only, behind the engine's `geolibre` feature) | | L4 | `engine` | `Session`, undo, command registry, ribbon feature catalog, sample project | | L6 | `ui-egui` | ribbon, panes, map view, attribute table, dialogs (swappable) | | apps | `rustgis`, `rustgis-cli`, `rustgis-web` | desktop app, command line, browser (WebAssembly) | @@ -28,7 +29,8 @@ egui front end, headless screenshots for UI work. and CLI dispatch by id. Commands never open dialogs. - **Never break wasm**: everything below `apps/` must build for `wasm32-unknown-unknown` (CI runs `cargo build --target wasm32-unknown-unknown -p rustgis-web`). Use `web_time`, not - `std::time`; file access goes through `Services` on the web. + `std::time`; file access goes through `Services` on the web. The one exception is + `rustgis-geolibre`, which only the desktop app and CLI enable (engine feature `geolibre`). - **Interface text is translatable**: wrap user-visible literals in `tl!("…")`, use `i18n::fmt("… {name} …", &[("name", …)])` instead of `format!` for messages, and pass labels to the ribbon widgets (they translate). Then add the new strings to every catalog in diff --git a/ATTRIBUTION.md b/ATTRIBUTION.md index cbd6f33dab..3da6d20a86 100644 --- a/ATTRIBUTION.md +++ b/ATTRIBUTION.md @@ -10,6 +10,10 @@ Raster coordinate systems are looked up by EPSG code in the PROJ definitions of [crs-definitions](https://crates.io/crates/crs-definitions) crate (CC0-1.0), compiled into the app. +The GeoLibre tool suite ([geolibre-rust](https://github.com/opengeos/geolibre-rust), MIT, built +on [whitebox-wasm](https://github.com/opengeos/whitebox-wasm), MIT) is linked into the desktop +app and command line as a library; its tool names and descriptions come from its manifests. + Icons are original vector drawings in code (`crates/ui-egui/src/icons.rs`). Fonts are not bundled: the interface uses an installed system sans-serif when one is found, otherwise the Ubuntu Light face that ships inside `epaint_default_fonts` (Ubuntu Font Licence 1.0). diff --git a/Cargo.lock b/Cargo.lock index ac251be964..ceea89b874 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -144,12 +144,46 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" dependencies = [ "cfg-if", + "const-random", "getrandom 0.3.4", "once_cell", "version_check", "zerocopy", ] +[[package]] +name = "aligned" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee4508988c62edf04abd8d92897fca0c2995d907ce1dfeaf369dac3716a40685" +dependencies = [ + "as-slice", +] + +[[package]] +name = "aligned-vec" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc890384c8602f339876ded803c97ad529f3842aba97f6392b3dba0dd171769b" +dependencies = [ + "equator", +] + +[[package]] +name = "alloc-no-stdlib" +version = "2.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" + +[[package]] +name = "alloc-stdlib" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e76a019e91224d279006ff972f1e984179a6e9feb050adba6ce8274aef23195" +dependencies = [ + "alloc-no-stdlib", +] + [[package]] name = "allocator-api2" version = "0.2.21" @@ -205,6 +239,12 @@ dependencies = [ "num-traits", ] +[[package]] +name = "arbitrary" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3bc62ac97cc33321f50863d514c3bc38a453947a8f9e781137e47c7401020aed" + [[package]] name = "arboard" version = "3.6.1" @@ -225,6 +265,17 @@ dependencies = [ "x11rb", ] +[[package]] +name = "arg_enum_proc_macro" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ae92a5119aa49cdbcf6b9f893fe4e1d98b04ccbf82ee0584ad948a44a734dea" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + [[package]] name = "arrayref" version = "0.3.9" @@ -237,12 +288,98 @@ version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3fb67a6e08acf24fdeccbac2cb6ac4305825bd1f117462e0e6f2f193345ad56" +[[package]] +name = "arrow-array" +version = "58.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae33dad492b7df00a217563a7b0ef2874df68a0deea1b1a3acf628152f7f7a69" +dependencies = [ + "ahash", + "arrow-buffer", + "arrow-data", + "arrow-schema", + "chrono", + "half", + "hashbrown 0.17.1", + "num-complex", + "num-integer", + "num-traits", +] + +[[package]] +name = "arrow-buffer" +version = "58.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9552f96391c005e6ab449fa941420935e7e062489b12b8b1b08879b2163f5b5" +dependencies = [ + "bytes", + "half", + "num-bigint", + "num-traits", +] + +[[package]] +name = "arrow-data" +version = "58.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b24852db04738907e06c04ea61e42fe7fda962a34513022dc0d0e754fb7976b" +dependencies = [ + "arrow-buffer", + "arrow-schema", + "half", + "num-integer", + "num-traits", +] + +[[package]] +name = "arrow-ipc" +version = "58.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29a908a11fcfb3fb2f6730f4ac15e367bc644e419155e96238f68cf3adde572b" +dependencies = [ + "arrow-array", + "arrow-buffer", + "arrow-data", + "arrow-schema", + "arrow-select", + "flatbuffers 25.12.19", +] + +[[package]] +name = "arrow-schema" +version = "58.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21ca356ad6425cecb6eb7b28e4f659f1ee7880fbb1a16127de7dd62901efee9e" + +[[package]] +name = "arrow-select" +version = "58.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c58da39eb3d8350ad4a549e5c2bc49284dac554016c69829310350f1731b0aad" +dependencies = [ + "ahash", + "arrow-array", + "arrow-buffer", + "arrow-data", + "arrow-schema", + "num-traits", +] + [[package]] name = "as-raw-xcb-connection" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "175571dd1d178ced59193a6fc02dde1b972eb0bc56c892cde9beeceac5bf0f6b" +[[package]] +name = "as-slice" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "516b6b4f0e40d50dcda9365d53964ec74560ad4284da2e7fc97122cd83174516" +dependencies = [ + "stable_deref_trait", +] + [[package]] name = "ash" version = "0.38.0+1.3.281" @@ -383,6 +520,16 @@ dependencies = [ "syn 3.0.7", ] +[[package]] +name = "atoi_simd" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3cdb3708a128e559a30fb830e8a77a5022ee6902806925c216658652b452a44" +dependencies = [ + "debug_unsafe", + "rustversion", +] + [[package]] name = "atomic-waker" version = "1.1.2" @@ -432,12 +579,81 @@ version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" +[[package]] +name = "av-scenechange" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f321d77c20e19b92c39e7471cf986812cbb46659d2af674adc4331ef3f18394" +dependencies = [ + "aligned", + "anyhow", + "arg_enum_proc_macro", + "arrayvec", + "log", + "num-rational", + "num-traits", + "pastey", + "rayon", + "thiserror 2.0.21", + "v_frame", + "y4m", +] + +[[package]] +name = "av1-grain" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8cfddb07216410377231960af4fcab838eaa12e013417781b78bd95ee22077f8" +dependencies = [ + "anyhow", + "arrayvec", + "log", + "nom", + "num-rational", + "v_frame", +] + +[[package]] +name = "avif-serialize" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7178fe5f7d460b13895ebb9dcb28a3a6216d2df2574a0806cb51b555d297f38" +dependencies = [ + "arrayvec", +] + [[package]] name = "base64" version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" +[[package]] +name = "bin-rs" +version = "0.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23f756521115a60a84bc45722261eaf03aa6a59d886c9c3b41d08ac1c39e3e24" + +[[package]] +name = "bincode" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36eaf5d7b090263e8150820482d5d93cd964a81e4019913c972f4edcc6edb740" +dependencies = [ + "bincode_derive", + "serde", + "unty", +] + +[[package]] +name = "bincode_derive" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf95709a440f45e986983918d0e8a1f30a9b1df04918fc828670606804ac3c09" +dependencies = [ + "virtue", +] + [[package]] name = "bit-set" version = "0.10.0" @@ -453,6 +669,12 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b71798fca2c1fe1086445a7258a4bc81e6e49dcd24c8d0dd9a1e57395b603f51" +[[package]] +name = "bit_field" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e4b40c7323adcfc0a41c4b88143ed58346ff65a288fc144329c5c45e05d70c6" + [[package]] name = "bitflags" version = "1.3.2" @@ -465,6 +687,27 @@ version = "2.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3ded4057c258ba199e2d26386d3af3780957ecaee6c4ef4041c6b4b8b97c0b06" +[[package]] +name = "bitstream-io" +version = "4.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7eff00be299a18769011411c9def0d827e8f2d7bf0c3dbf53633147a8867fd1f" +dependencies = [ + "no_std_io2", +] + +[[package]] +name = "bitvec" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddcec3d12c579d40898fe0a9a358a803c23e9c52ca3c425707f81c9436211837" +dependencies = [ + "funty", + "radium", + "tap", + "wyz", +] + [[package]] name = "block2" version = "0.5.1" @@ -496,12 +739,60 @@ dependencies = [ "piper", ] +[[package]] +name = "brotli" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d640d25bc63c50fb1f0b545ffd80207d2e10a4c965530809b40ba3386825c391" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", + "brotli-decompressor 2.5.1", +] + +[[package]] +name = "brotli" +version = "8.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cc91aac060a7a1e25823bdccbfb6af1875b88f17c6daac97894eed8207166b3" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", + "brotli-decompressor 5.0.3", +] + +[[package]] +name = "brotli-decompressor" +version = "2.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e2e4afe60d7dd600fdd3de8d0f08c2b7ec039712e3b6137ff98b7004e82de4f" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", +] + +[[package]] +name = "brotli-decompressor" +version = "5.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a32acac15fe1967bc3986b2a6347dffc965602354ea6f450ad07e8bfd253583" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", +] + [[package]] name = "bufrw" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "394c22b416e3981206df472c3bcbbf9ae130883619aefc2199e6087517af1bba" +[[package]] +name = "built" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c0e531d93d39c34eef561e929e8a7f86d77a5af08aac4f6d6e39976c51858e9" + [[package]] name = "bumpalo" version = "3.20.3" @@ -546,6 +837,23 @@ version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04" +[[package]] +name = "calamine" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fa68281b1a76b54a62156474adb06bb380a67e07dd60656e3217152b42183f3" +dependencies = [ + "atoi_simd", + "byteorder", + "codepage", + "encoding_rs", + "fast-float2", + "log", + "quick-xml", + "serde", + "zip", +] + [[package]] name = "calloop" version = "0.13.0" @@ -629,6 +937,30 @@ dependencies = [ "libc", ] +[[package]] +name = "chacha20" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65c35e4b699c7e15ccbe7ee35c005e4fc0a278d22238a2857e6ce2dadeda1b06" +dependencies = [ + "cfg-if", + "cpufeatures", + "rand_core 0.10.1", +] + +[[package]] +name = "chrono" +version = "0.4.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1aa79e62e7697b8e29b513a68abacf485adcd1fe8284a4316c5ae868e6633327" +dependencies = [ + "iana-time-zone", + "js-sys", + "num-traits", + "wasm-bindgen", + "windows-link", +] + [[package]] name = "clipboard-win" version = "5.4.1" @@ -638,6 +970,15 @@ dependencies = [ "error-code", ] +[[package]] +name = "codepage" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdff162541cd8b79de82e2edcc7eff3a8c2a6dc3d75152636028f96d93de3b26" +dependencies = [ + "encoding_rs", +] + [[package]] name = "codespan-reporting" version = "0.13.1" @@ -658,6 +999,12 @@ dependencies = [ "bytemuck", ] +[[package]] +name = "color_quant" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" + [[package]] name = "colored" version = "2.2.0" @@ -697,6 +1044,26 @@ dependencies = [ "web-sys", ] +[[package]] +name = "const-random" +version = "0.1.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87e00182fe74b066627d63b85fd550ac2998d4b0bd86bfed477a0ae4c7c71359" +dependencies = [ + "const-random-macro", +] + +[[package]] +name = "const-random-macro" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" +dependencies = [ + "getrandom 0.2.17", + "once_cell", + "tiny-keccak", +] + [[package]] name = "core-foundation" version = "0.9.4" @@ -737,6 +1104,21 @@ dependencies = [ "libc", ] +[[package]] +name = "core_detect" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f8f80099a98041a3d1622845c271458a2d73e688351bf3cb999266764b81d48" + +[[package]] +name = "cpufeatures" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ca28b0ae3115b884660db4118d803791fd6756b6e88f39c0f3f7859060d7566" +dependencies = [ + "libc", +] + [[package]] name = "crc32fast" version = "1.5.2" @@ -810,6 +1192,41 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f27ae1dd37df86211c42e150270f82743308803d90a6f6e6651cd730d5e1732f" +[[package]] +name = "darling" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 1.0.109", +] + +[[package]] +name = "darling_macro" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" +dependencies = [ + "darling_core", + "quote", + "syn 1.0.109", +] + [[package]] name = "dbase" version = "0.8.0" @@ -822,26 +1239,55 @@ dependencies = [ ] [[package]] -name = "deranged" -version = "0.5.8" +name = "debug_unsafe" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c" +checksum = "7eed2c4702fa172d1ce21078faa7c5203e69f5394d48cc436d25928394a867a2" [[package]] -name = "dify" -version = "0.8.0" +name = "deku" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ce0fb972943b4e88cd03b8f92953df0c71bb05e0bde8e5b684895d808013cc" +checksum = "c3d631ba36587888e2f176cda075d73971c504283efd7d0112997a3fd02372c0" dependencies = [ - "anyhow", - "colored", - "getopts", - "image", - "rayon", + "bitvec", + "deku_derive", ] [[package]] -name = "dispatch" +name = "deku_derive" +version = "0.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9009099da9734d3dc49ce9c8c7f9b12905612c84c6dd4b4c075455743e47840d" +dependencies = [ + "darling", + "proc-macro-crate 1.3.1", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "deranged" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c" + +[[package]] +name = "dify" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90ce0fb972943b4e88cd03b8f92953df0c71bb05e0bde8e5b684895d808013cc" +dependencies = [ + "anyhow", + "colored", + "getopts", + "image", + "rayon", +] + +[[package]] +name = "dispatch" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" @@ -858,6 +1304,17 @@ dependencies = [ "objc2 0.6.5", ] +[[package]] +name = "displaydoc" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6232dd377dcc64799954cbd3a9bb882e9cdc1308ccd87b1c098f1fb2eaf82a8" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.7", +] + [[package]] name = "dlib" version = "0.5.3" @@ -888,6 +1345,16 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d8b14ccef22fc6f5a8f4d7d768562a182c04ce9a3b3157b91390b52ddfdf1a76" +[[package]] +name = "duplicate" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de78e66ac9061e030587b2a2e75cc88f22304913c907b11307bca737141230cb" +dependencies = [ + "heck", + "proc-macro-error", +] + [[package]] name = "earcut" version = "0.4.5" @@ -953,7 +1420,7 @@ dependencies = [ "bitflags 2.13.2", "emath", "epaint", - "itertools", + "itertools 0.15.0", "log", "nohash-hasher", "profiling", @@ -1012,7 +1479,7 @@ dependencies = [ "ahash", "egui", "enum-map", - "itertools", + "itertools 0.15.0", "log", "profiling", ] @@ -1067,6 +1534,20 @@ dependencies = [ "bytemuck", ] +[[package]] +name = "encoding_rs" +version = "0.8.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e985e0451871ad22fb8d2b6b076e2028a502a0d3950998c2c5c0a4f9b5d9679" +dependencies = [ + "cfg-if", + "core_detect", + "multiversion_no_op", + "rustversion", + "scopeguard", + "simdutf8", +] + [[package]] name = "endi" version = "1.1.1" @@ -1145,12 +1626,43 @@ version = "0.36.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773fa9c96dd0dbef887e39d0ed6177f141cce4d68e6041df77570aa3702dfa13" +[[package]] +name = "equator" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4711b213838dfee0117e3be6ac926007d7f433d7bbe33595975d4190cb07e6fc" +dependencies = [ + "equator-macro", +] + +[[package]] +name = "equator-macro" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44f23cf4b44bfce11a86ace86f8a73ffdec849c9fd00a386a53d278bd9e81fb3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + [[package]] name = "equivalent" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" +[[package]] +name = "erased-serde" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2add8a07dd6a8d93ff627029c51de145e12686fbc36ecb298ac22e74cf02dec" +dependencies = [ + "serde", + "serde_core", + "typeid", +] + [[package]] name = "errno" version = "0.3.14" @@ -1176,6 +1688,12 @@ dependencies = [ "num-traits", ] +[[package]] +name = "evalexpr" +version = "13.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25929004897f2bbab309121a60400d36992f6d911d09baa6c172f6cc55706601" + [[package]] name = "event-listener" version = "5.4.2" @@ -1196,6 +1714,29 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "exr" +version = "1.74.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "711fe42c9964295e01ee3fba3f9fe0e1d24b98886950d68efe81b1c76e21adf3" +dependencies = [ + "bit_field", + "half", + "lebe", + "miniz_oxide 0.8.9", + "num-complex", + "pulp", + "rayon-core", + "smallvec", + "zune-inflate", +] + +[[package]] +name = "fast-float2" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6e8948ce679d00a02a94739ea185595dca7118ed04feb991127e443bd3d761f" + [[package]] name = "fastrand" version = "2.5.0" @@ -1223,12 +1764,42 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b97b65636e5b9ef369943878ac74335ba1c55c1cb6adbf1e2c293c624248d693" +[[package]] +name = "filetime" +version = "0.2.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c287a33c7f0a620c38e641e7f60827713987b3c0f26e8ddc9462cc69cf75759" +dependencies = [ + "cfg-if", + "libc", +] + [[package]] name = "find-msvc-tools" version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aedcfb3409746eddb02b9e19ebda1c3394f759a152e48ee875a0844d1b955484" +[[package]] +name = "flatbuffers" +version = "24.12.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f1baf0dbf96932ec9a3038d57900329c015b0bfb7b63d904f3bc27e2b02a096" +dependencies = [ + "bitflags 1.3.2", + "rustc_version", +] + +[[package]] +name = "flatbuffers" +version = "25.12.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35f6839d7b3b98adde531effaf34f0c2badc6f4735d26fe74709d8e513a96ef3" +dependencies = [ + "bitflags 2.13.2", + "rustc_version", +] + [[package]] name = "flate2" version = "1.1.10" @@ -1240,12 +1811,24 @@ dependencies = [ "zlib-rs", ] +[[package]] +name = "float_eq" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28a80e3145d8ad11ba0995949bbcf48b9df2be62772b3d351ef017dff6ecb853" + [[package]] name = "float_next_after" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37007738a80ea34f969af54a3390dd72cacdef654974cfd449c9f6f72dbaac10" +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + [[package]] name = "foldhash" version = "0.2.0" @@ -1288,6 +1871,37 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" +[[package]] +name = "form_urlencoded" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "freestiler-core" +version = "0.1.0" +source = "git+https://github.com/giswqs/freestiler?rev=b77f7f0d76e11bf105e913ab6d553eb2a4a7ca00#b77f7f0d76e11bf105e913ab6d553eb2a4a7ca00" +dependencies = [ + "flate2", + "geo", + "geo-types", + "integer-encoding 4.1.0", + "pmtiles2", + "prost", + "rayon", + "serde", + "serde_json", +] + +[[package]] +name = "funty" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" + [[package]] name = "futures-core" version = "0.3.34" @@ -1356,7 +1970,7 @@ dependencies = [ "i_overlay", "log", "num-traits", - "rand", + "rand 0.10.3", "rand_pcg", "robust", "rstar", @@ -1364,6 +1978,12 @@ dependencies = [ "spade", ] +[[package]] +name = "geo-traits" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e7c353d12a704ccfab1ba8bfb1a7fe6cb18b665bf89d37f4f7890edcd260206" + [[package]] name = "geo-types" version = "0.7.20" @@ -1388,6 +2008,50 @@ dependencies = [ "libm", ] +[[package]] +name = "geolibre-cli" +version = "1.5.9" +source = "git+https://github.com/opengeos/geolibre-rust?branch=feat%2Flibrary-api#49bb10db5957ed605689c40d2b4fae8e2854fee7" +dependencies = [ + "geolibre-tools", + "serde_json", + "wbcore", + "wbtools_oss", +] + +[[package]] +name = "geolibre-pmtiles" +version = "1.5.9" +source = "git+https://github.com/opengeos/geolibre-rust?branch=feat%2Flibrary-api#49bb10db5957ed605689c40d2b4fae8e2854fee7" +dependencies = [ + "flate2", +] + +[[package]] +name = "geolibre-tools" +version = "1.5.9" +source = "git+https://github.com/opengeos/geolibre-rust?branch=feat%2Flibrary-api#49bb10db5957ed605689c40d2b4fae8e2854fee7" +dependencies = [ + "calamine", + "flate2", + "freestiler-core", + "geo", + "geolibre-pmtiles", + "h3o", + "kamadak-exif", + "kdtree", + "parquet", + "png 0.17.16", + "quick-xml", + "rstar", + "serde_json", + "wbcore", + "wblidar", + "wbraster", + "wbvector", + "zip", +] + [[package]] name = "gethostname" version = "1.1.0" @@ -1407,6 +2071,17 @@ dependencies = [ "unicode-width", ] +[[package]] +name = "getrandom" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + [[package]] name = "getrandom" version = "0.3.4" @@ -1428,6 +2103,17 @@ dependencies = [ "cfg-if", "libc", "r-efi 6.0.0", + "rand_core 0.10.1", +] + +[[package]] +name = "gif" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee8cfcc411d9adbbaba82fb72661cc1bcca13e8bba98b364e62b2dba8f960159" +dependencies = [ + "color_quant", + "weezl", ] [[package]] @@ -1441,6 +2127,114 @@ dependencies = [ "xml-rs", ] +[[package]] +name = "glam" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "333928d5eb103c5d4050533cec0384302db6be8ef7d3cebd30ec6a35350353da" + +[[package]] +name = "glam" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3abb554f8ee44336b72d522e0a7fe86a29e09f839a36022fa869a7dfe941a54b" + +[[package]] +name = "glam" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4126c0479ccf7e8664c36a2d719f5f2c140fbb4f9090008098d2c291fa5b3f16" + +[[package]] +name = "glam" +version = "0.17.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e01732b97afd8508eee3333a541b9f7610f454bb818669e66e90f5f57c93a776" + +[[package]] +name = "glam" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "525a3e490ba77b8e326fb67d4b44b4bd2f920f44d4cc73ccec50adc68e3bee34" + +[[package]] +name = "glam" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b8509e6791516e81c1a630d0bd7fbac36d2fa8712a9da8662e716b52d5051ca" + +[[package]] +name = "glam" +version = "0.20.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f43e957e744be03f5801a55472f593d43fabdebf25a4585db250f04d86b1675f" + +[[package]] +name = "glam" +version = "0.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "518faa5064866338b013ff9b2350dc318e14cc4fcd6cb8206d7e7c9886c98815" + +[[package]] +name = "glam" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12f597d56c1bd55a811a1be189459e8fad2bbc272616375602443bdfb37fa774" + +[[package]] +name = "glam" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e4afd9ad95555081e109fe1d21f2a30c691b5f0919c67dfa690a2e1eb6bd51c" + +[[package]] +name = "glam" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5418c17512bdf42730f9032c74e1ae39afc408745ebb2acf72fbc4691c17945" + +[[package]] +name = "glam" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "151665d9be52f9bb40fc7966565d39666f2d1e69233571b71b87791c7e0528b3" + +[[package]] +name = "glam" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e05e7e6723e3455f4818c7b26e855439f7546cf617ef669d1adedb8669e5cb9" + +[[package]] +name = "glam" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "779ae4bf7e8421cf91c0b3b64e7e8b40b862fba4d393f59150042de7c4965a94" + +[[package]] +name = "glam" +version = "0.29.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8babf46d4c1c9d92deac9f7be466f76dfc4482b6452fc5024b5e8daf6ffeb3ee" + +[[package]] +name = "glam" +version = "0.30.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19fc433e8437a212d1b6f1e68c7824af3aed907da60afa994e7f542d18d12aa9" + +[[package]] +name = "glam" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "556f6b2ea90b8d15a74e0e7bb41671c9bdf38cd9f78c284d750b9ce58a2b5be7" + +[[package]] +name = "glam" +version = "0.32.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f70749695b063ecbf6b62949ccccde2e733ec3ecbbd71d467dca4e5c6c97cca0" + [[package]] name = "glifo" version = "0.2.0" @@ -1558,6 +2352,28 @@ dependencies = [ "euclid", ] +[[package]] +name = "h3o" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f033ee4f3b98f6842df9ce5111ff2dd36fd9be9804b9c0afd43e69e3891a6fbf" +dependencies = [ + "ahash", + "either", + "float_eq", + "geo", + "geo-traits", + "h3o-bit", + "libm", + "ordered-float 5.5.0", +] + +[[package]] +name = "h3o-bit" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b42eb4efef1f96510ae1a33b2682562a677d504641e9903a77bf5c666b9013e" + [[package]] name = "half" version = "2.7.1" @@ -1621,6 +2437,12 @@ dependencies = [ "stable_deref_trait", ] +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + [[package]] name = "hermit-abi" version = "0.5.3" @@ -1633,6 +2455,12 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +[[package]] +name = "hilbert_2d" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "705f81e042b11734af35c701c7f6b65f8a968a430621fa2c95e72e27f9f8be5c" + [[package]] name = "i_float" version = "1.16.0" @@ -1679,6 +2507,140 @@ version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4804bdc1dc124eb7e1aa9e144ecc04096bcf787a10a15fa44af682b51f0f6cce" +[[package]] +name = "iana-time-zone" +version = "0.1.65" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "log", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "icu_collections" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa68d21081c4a05d5a901a1c62add574c77048b6a1c67be3b50ce0b60d4ca513" +dependencies = [ + "displaydoc", + "potential_utf", + "utf8_iter", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d56e28588da92eee5c3201a6eff33fabdd49b62269c8938d4ff050ce4d900deb" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12f9cf5f235641ed274641dd81c3f28d870e276763d0797aeeab72317b1c646f" +dependencies = [ + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1563da1ed3e0b3bf3d74c9b85917ac9c56464d2f57242270c09c9e752f8021a0" + +[[package]] +name = "icu_properties" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e7ca276ad3145661a65914e6daf131ca5120cd3dcee8f8f3214b8875184a148" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e590f038c1464a96894fd6d10127e90a8be4509f56ff7ecef851b15cee0b7caa" + +[[package]] +name = "icu_provider" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d27bbb9d3abbefac45d55f647c9de1d44aafcd1186eb91879afef17c396c3e73" +dependencies = [ + "displaydoc", + "icu_locale_core", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "idna" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + [[package]] name = "image" version = "0.25.10" @@ -1687,12 +2649,38 @@ checksum = "85ab80394333c02fe689eaf900ab500fbd0c2213da414687ebf995a65d5a6104" dependencies = [ "bytemuck", "byteorder-lite", + "color_quant", + "exr", + "gif", + "image-webp", "moxcms", "num-traits", - "png", + "png 0.18.1", + "qoi", + "ravif", + "rayon", + "rgb", "tiff", + "zune-core", + "zune-jpeg", +] + +[[package]] +name = "image-webp" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "525e9ff3e1a4be2fbea1fdf0e98686a6d98b4d8f937e1bf7402245af1909e8c3" +dependencies = [ + "byteorder-lite", + "quick-error", ] +[[package]] +name = "imgref" +version = "1.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e44b0a4eaa4c82f441d50a963f2d5f05a787240aeee097597033e72accfd22f" + [[package]] name = "indexmap" version = "2.14.2" @@ -1703,6 +2691,38 @@ dependencies = [ "hashbrown 0.17.1", ] +[[package]] +name = "integer-encoding" +version = "3.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bb03732005da905c88227371639bf1ad885cc712789c011c31c5fb3ab3ccf02" + +[[package]] +name = "integer-encoding" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14c00403deb17c3221a1fe4fb571b9ed0370b3dcd116553c77fa294a3d918699" + +[[package]] +name = "interpolate_name" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c34819042dc3d3971c46c2190835914dfbe0c3c13f61449b2997f4e9722dfa60" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "inventory" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6928282826c822ad91bf1c9a1cb90a30ba1c26770749929b4656cd6be829cd7c" +dependencies = [ + "rustversion", +] + [[package]] name = "is-docker" version = "0.2.0" @@ -1722,6 +2742,15 @@ dependencies = [ "once_cell", ] +[[package]] +name = "itertools" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" +dependencies = [ + "either", +] + [[package]] name = "itertools" version = "0.15.0" @@ -1805,6 +2834,27 @@ dependencies = [ "libc", ] +[[package]] +name = "jpeg-decoder" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00810f1d8b74be64b13dbf3db89ac67740615d6c891f0e7b6179326533011a07" +dependencies = [ + "rayon", +] + +[[package]] +name = "jpeg-encoder" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b454d911ac55068f53495488d8ccd0646eaa540c033a28ee15b07838afafb01f" + +[[package]] +name = "jpeg-encoder" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0370574b86f7eca156b9f298392b5e69a23f8c86f3f865add60bbc2e79467a6" + [[package]] name = "js-sys" version = "0.3.106" @@ -1816,6 +2866,203 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "jxl-bitstream" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b480e752277e29eb4054f69546887a9b84656fe78c08f54ba5850ced98a378fe" +dependencies = [ + "tracing", +] + +[[package]] +name = "jxl-coding" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd972bcd125e776f1eb241ac50e39f956095a1c2770c64736c968f8946bd9a3c" +dependencies = [ + "jxl-bitstream", + "tracing", +] + +[[package]] +name = "jxl-color" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f316b1358c1711755b3ee8e8cb5c4a1dad12e796233088a7a513440782de80b2" +dependencies = [ + "jxl-bitstream", + "jxl-coding", + "jxl-grid", + "jxl-image", + "jxl-oxide-common", + "jxl-threadpool", + "tracing", +] + +[[package]] +name = "jxl-frame" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d967c6fd669c7c01060b5022d8835fa82fd46b06ffc98b549f17600a097c2b3" +dependencies = [ + "jxl-bitstream", + "jxl-coding", + "jxl-grid", + "jxl-image", + "jxl-modular", + "jxl-oxide-common", + "jxl-threadpool", + "jxl-vardct", + "tracing", +] + +[[package]] +name = "jxl-grid" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01671307879a033bfa52e6e8784b941aca770b3f3a7d33830b455b6844f793fb" +dependencies = [ + "tracing", +] + +[[package]] +name = "jxl-image" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5f752d62577c702a94dbbce4045caf08cb58639e8a4d56464b40ecf33ffe565" +dependencies = [ + "jxl-bitstream", + "jxl-grid", + "jxl-oxide-common", + "tracing", +] + +[[package]] +name = "jxl-jbr" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e35d032bcec660647828527ff42c6f5776d2fd44b8357f9f6d9ac6dc07218e46" +dependencies = [ + "brotli-decompressor 5.0.3", + "jxl-bitstream", + "jxl-frame", + "jxl-grid", + "jxl-image", + "jxl-modular", + "jxl-oxide-common", + "jxl-threadpool", + "jxl-vardct", + "tracing", +] + +[[package]] +name = "jxl-modular" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a2f045b24c738dd91d482be385512b512721ae08a671bd4b27bf1c47f215235" +dependencies = [ + "jxl-bitstream", + "jxl-coding", + "jxl-grid", + "jxl-oxide-common", + "jxl-threadpool", + "tracing", +] + +[[package]] +name = "jxl-oxide" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d36c662923f47586880211f3bc7c0d83fb3a9b410d278c7bde93450748abeef3" +dependencies = [ + "brotli-decompressor 5.0.3", + "jxl-bitstream", + "jxl-color", + "jxl-frame", + "jxl-grid", + "jxl-image", + "jxl-jbr", + "jxl-oxide-common", + "jxl-render", + "jxl-threadpool", + "tracing", +] + +[[package]] +name = "jxl-oxide-common" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b62394c5021b3a9e7e0dbb2d639d555d019090c9946c39f6d3b09d390db4157b" +dependencies = [ + "jxl-bitstream", +] + +[[package]] +name = "jxl-render" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d34386bfdb6a19b5a30cc9beb4d475d537422c31ae8c39bb69640fcce3fcaf19" +dependencies = [ + "bytemuck", + "jxl-bitstream", + "jxl-coding", + "jxl-color", + "jxl-frame", + "jxl-grid", + "jxl-image", + "jxl-modular", + "jxl-oxide-common", + "jxl-threadpool", + "jxl-vardct", + "tracing", +] + +[[package]] +name = "jxl-threadpool" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25f15eb830aa77a7f21148d72e153562a26bfe570139bd4922eab1908dd499d3" +dependencies = [ + "rayon", + "rayon-core", + "tracing", +] + +[[package]] +name = "jxl-vardct" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce72a18c6d3a47172ab6c479be2bdb56f22066b5d7092663f03b4490820b4511" +dependencies = [ + "jxl-bitstream", + "jxl-coding", + "jxl-grid", + "jxl-modular", + "jxl-oxide-common", + "jxl-threadpool", + "tracing", +] + +[[package]] +name = "kamadak-exif" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1130d80c7374efad55a117d715a3af9368f0fa7a2c54573afc15a188cd984837" +dependencies = [ + "mutate_once", +] + +[[package]] +name = "kdtree" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cd666c2aae5dde60d2f9bfa4e1f8c17698fce13d599c0f9b76725641fec13d9" +dependencies = [ + "num-traits", + "thiserror 2.0.21", +] + [[package]] name = "khronos-egl" version = "6.0.0" @@ -1861,12 +3108,28 @@ version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "20870f649af7073d53e38067b2a84312175d56ea15217e1b15bc83506ec50afb" +[[package]] +name = "lebe" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a79a3332a6609480d7d0c9eab957bca6b455b91bb84e66d19f5ff66294b85b8" + [[package]] name = "libc" version = "0.2.190" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce5d3ddc6d3fa000eb1536d85e147bfe31aacaba692ed6a876f95cb7c855be78" +[[package]] +name = "libfuzzer-sys" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9fd2f41a1cba099f79a0b6b6c35656cf7c03351a7bae8ff0f28f25270f929d2" +dependencies = [ + "arbitrary", + "cc", +] + [[package]] name = "libloading" version = "0.8.9" @@ -1913,6 +3176,12 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" +[[package]] +name = "litemap" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47d9d19d1d6efa0109d2f65ff4c85cddd50bd572e5a00127ab10987290bcefae" + [[package]] name = "litrs" version = "1.0.0" @@ -1934,6 +3203,53 @@ version = "0.4.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9f8bd3e56ce4dfc153cf470fffbfa98c7620958b312ca5c3a4b8d5181fd13c6" +[[package]] +name = "loop9" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fae87c125b03c1d2c0150c90365d7d6bcc53fb73a9acaef207d2d065860f062" +dependencies = [ + "imgref", +] + +[[package]] +name = "lz4_flex" +version = "0.11.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "373f5eceeeab7925e0c1098212f2fbc4d416adec9d35051a6ab251e824c1854a" +dependencies = [ + "twox-hash", +] + +[[package]] +name = "lz4_flex" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ef0d4ed8669f8f8826eb00dc878084aa8f253506c4fd5e8f58f5bce72ddb97e" +dependencies = [ + "twox-hash", +] + +[[package]] +name = "matrixmultiply" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f607c237553f086e7043417a51df26b2eb899d3caff94e6a67592ff992fedc7" +dependencies = [ + "autocfg", + "rawpointer", +] + +[[package]] +name = "maybe-rayon" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ea1f30cedd69f0a2954655f7188c6a834246d2bcf1e315e2ac40c4b24dc9519" +dependencies = [ + "cfg-if", + "rayon", +] + [[package]] name = "memchr" version = "2.8.3" @@ -1988,6 +3304,18 @@ dependencies = [ "pxfm", ] +[[package]] +name = "multiversion_no_op" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "743fb55ba31b18fb1ecef6bdc9aa2743314978ac084044301a7eee33fb99a20d" + +[[package]] +name = "mutate_once" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13d2233c9842d08cfe13f9eac96e207ca6a2ea10b80259ebe8ad0268be27d2af" + [[package]] name = "naga" version = "30.0.1" @@ -2027,46 +3355,211 @@ dependencies = [ ] [[package]] -name = "ndk" -version = "0.9.0" +name = "nalgebra" +version = "0.34.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df76ea0ff5c7e6b88689085804d6132ded0ddb9de5ca5b8aeb9eeadc0508a70a" +dependencies = [ + "approx", + "glam 0.14.0", + "glam 0.15.2", + "glam 0.16.0", + "glam 0.17.3", + "glam 0.18.0", + "glam 0.19.0", + "glam 0.20.5", + "glam 0.21.3", + "glam 0.22.0", + "glam 0.23.0", + "glam 0.24.2", + "glam 0.25.0", + "glam 0.27.0", + "glam 0.28.0", + "glam 0.29.3", + "glam 0.30.10", + "glam 0.31.1", + "glam 0.32.1", + "matrixmultiply", + "nalgebra-macros", + "num-complex", + "num-rational", + "num-traits", + "serde", + "simba", + "typenum", +] + +[[package]] +name = "nalgebra-macros" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "973e7178a678cfd059ccec50887658d482ce16b0aa9da3888ddeab5cd5eb4889" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "ndarray" +version = "0.15.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb12d4e967ec485a5f71c6311fe28158e9d6f4bc4a447b474184d0f91a8fa32" +dependencies = [ + "matrixmultiply", + "num-complex", + "num-integer", + "num-traits", + "rawpointer", + "serde", +] + +[[package]] +name = "ndk" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" +dependencies = [ + "bitflags 2.13.2", + "jni-sys 0.3.1", + "log", + "ndk-sys", + "num_enum", + "raw-window-handle", + "thiserror 1.0.69", +] + +[[package]] +name = "ndk-context" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" + +[[package]] +name = "ndk-sys" +version = "0.6.0+11769913" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee6cda3051665f1fb8d9e08fc35c96d5a244fb1be711a03b71118828afc9a873" +dependencies = [ + "jni-sys 0.3.1", +] + +[[package]] +name = "new_debug_unreachable" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" + +[[package]] +name = "no_std_io2" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "418abd1b6d34fbf6cae440dc874771b0525a604428704c76e48b29a5e67b8003" +dependencies = [ + "memchr", +] + +[[package]] +name = "nohash-hasher" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" + +[[package]] +name = "nom" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df9761775871bdef83bee530e60050f7e54b1105350d6884eb0fb4f46c2f9405" +dependencies = [ + "memchr", +] + +[[package]] +name = "noop_proc_macro" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0676bb32a98c1a483ce53e500a81ad9c3d5b3f7c920c28c24e9cb0980d0b5bc8" + +[[package]] +name = "num" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" +dependencies = [ + "num-bigint", + "num-complex", + "num-integer", + "num-iter", + "num-rational", + "num-traits", +] + +[[package]] +name = "num-bigint" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c89e69e7e0f03bea5ef08013795c25018e101932225a656383bd384495ecc367" +dependencies = [ + "num-integer", + "num-traits", +] + +[[package]] +name = "num-complex" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" +checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" dependencies = [ - "bitflags 2.13.2", - "jni-sys 0.3.1", - "log", - "ndk-sys", - "num_enum", - "raw-window-handle", - "thiserror 1.0.69", + "bytemuck", + "num-traits", ] [[package]] -name = "ndk-context" -version = "0.1.1" +name = "num-conv" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" +checksum = "521739c6d2bac4aa25192232afe6841231376b2b26d4d9fae5ecf8ca5772e441" [[package]] -name = "ndk-sys" -version = "0.6.0+11769913" +name = "num-derive" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee6cda3051665f1fb8d9e08fc35c96d5a244fb1be711a03b71118828afc9a873" +checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ - "jni-sys 0.3.1", + "proc-macro2", + "quote", + "syn 2.0.119", ] [[package]] -name = "nohash-hasher" -version = "0.2.0" +name = "num-integer" +version = "0.1.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" +checksum = "7ce2d95d4b3734dc35aa2f45e1aa22cd416814592a4f9d9205e11affd5b8e10b" +dependencies = [ + "num-traits", +] [[package]] -name = "num-conv" -version = "0.2.2" +name = "num-iter" +version = "0.1.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "521739c6d2bac4aa25192232afe6841231376b2b26d4d9fae5ecf8ca5772e441" +checksum = "c92800bd69a1eac91786bcfe9da64a897eb72911b8dc3095decbd07429e8048b" +dependencies = [ + "num-integer", + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" +dependencies = [ + "num-bigint", + "num-integer", + "num-traits", +] [[package]] name = "num-traits" @@ -2094,7 +3587,7 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "680998035259dcfcafe653688bf2aa6d3e2dc05e98be6ab46afb089dc84f1df8" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 3.5.0", "proc-macro2", "quote", "syn 2.0.119", @@ -2437,6 +3930,15 @@ dependencies = [ "libredox", ] +[[package]] +name = "ordered-float" +version = "2.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68f19d67e5a2795c94e73e0bb1cc1a7edeb2e28efd39e2e1c9b7a40c1108b11c" +dependencies = [ + "num-traits", +] + [[package]] name = "ordered-float" version = "5.5.0" @@ -2494,6 +3996,51 @@ dependencies = [ "windows-link", ] +[[package]] +name = "parquet" +version = "58.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d298093b2dec60289dce0684c986d0f7679e9dd15771c2c65406e1aaf604a704" +dependencies = [ + "ahash", + "arrow-array", + "arrow-buffer", + "arrow-data", + "arrow-ipc", + "arrow-schema", + "arrow-select", + "base64", + "brotli 8.0.4", + "bytes", + "chrono", + "flate2", + "half", + "hashbrown 0.17.1", + "lz4_flex 0.13.1", + "num-bigint", + "num-integer", + "num-traits", + "paste", + "seq-macro", + "simdutf8", + "snap", + "thrift", + "twox-hash", + "zstd 0.13.3", +] + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[package]] +name = "pastey" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35fb2e5f958ec131621fdd531e9fc186ed768cbe395337403ae56c17a74c68ec" + [[package]] name = "peniko" version = "0.6.1" @@ -2605,6 +4152,36 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" +[[package]] +name = "pmtiles2" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df68cae0754066c0ba89fd4ca1307f496623ed49edabed4b3cafad335448cd77" +dependencies = [ + "ahash", + "brotli 3.5.0", + "deku", + "duplicate", + "flate2", + "hilbert_2d", + "integer-encoding 3.0.4", + "serde_json", + "zstd 0.11.2+zstd.1.5.2", +] + +[[package]] +name = "png" +version = "0.17.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82151a2fc869e011c153adc57cf2789ccb8d9906ce52c0b39a6b5697749d7526" +dependencies = [ + "bitflags 1.3.2", + "crc32fast", + "fdeflate", + "flate2", + "miniz_oxide 0.8.9", +] + [[package]] name = "png" version = "0.18.1" @@ -2668,25 +4245,86 @@ dependencies = [ "portable-atomic", ] +[[package]] +name = "potential_utf" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d83eb9bc6d8e5cf568e7a1101d60ee05e81ed50ea106026f3d18deeb046d7661" +dependencies = [ + "zerovec", +] + [[package]] name = "powerfmt" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4a6394b9e965e73d0a289ee54f589087e2c676aedf60885baf52c76b771e4958" +[[package]] +name = "ppv-lite86" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy", +] + [[package]] name = "presser" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8cf8e6a8aa66ce33f63993ffc4ea4271eb5b0530a9002db8455ea6050c77bfa" +[[package]] +name = "primal-check" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc0d895b311e3af9902528fbb8f928688abbd95872819320517cc24ca6b2bd08" +dependencies = [ + "num-integer", +] + +[[package]] +name = "proc-macro-crate" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" +dependencies = [ + "once_cell", + "toml_edit 0.19.15", +] + [[package]] name = "proc-macro-crate" version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f" dependencies = [ - "toml_edit", + "toml_edit 0.25.17+spec-1.1.0", +] + +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2", + "quote", + "syn 1.0.109", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2", + "quote", + "version_check", ] [[package]] @@ -2703,6 +4341,19 @@ name = "profiling" version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d595e54a326bc53c1c197b32d295e14b169e3cfeaa8dc82b529f947fba6bcf5" +dependencies = [ + "profiling-procmacros", +] + +[[package]] +name = "profiling-procmacros" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4488a4a36b9a4ba6b9334a32a39971f77c1436ec82c38707bce707699cc3bbcb" +dependencies = [ + "quote", + "syn 2.0.119", +] [[package]] name = "proj4rs" @@ -2717,12 +4368,67 @@ dependencies = [ "web-sys", ] +[[package]] +name = "prost" +version = "0.13.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2796faa41db3ec313a31f7624d9286acf277b52de526150b7e69f3debf891ee5" +dependencies = [ + "bytes", + "prost-derive", +] + +[[package]] +name = "prost-derive" +version = "0.13.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a56d757972c98b346a9b766e3f02746cde6dd1cd1d1d563472929fdd74bec4d" +dependencies = [ + "anyhow", + "itertools 0.14.0", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "pulp" +version = "0.22.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "046aa45b989642ec2e4717c8e72d677b13edd831a4d3b6cf37d9a3e54912496a" +dependencies = [ + "bytemuck", + "cfg-if", + "libm", + "num-complex", + "paste", + "pulp-wasm-simd-flag", + "raw-cpuid", + "reborrow", + "version_check", +] + +[[package]] +name = "pulp-wasm-simd-flag" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d8f70e07b9c3962945a74e59ca1c511bba65b6419468acc217c457d93f3c740" + [[package]] name = "pxfm" version = "0.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d55d956fa96f5ec02be2e13af0e20391a5aa83d6a074e3ad368959d0fab299ea" +[[package]] +name = "qoi" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f6d64c71eb498fe9eae14ce4ec935c555749aef511cca85b5568910d6e48001" +dependencies = [ + "bytemuck", +] + [[package]] name = "quick-error" version = "2.0.1" @@ -2735,6 +4441,7 @@ version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e660451e55124f798a69a5af3f49ccfbefbd41910eefd25caf2393e1f3473ec1" dependencies = [ + "encoding_rs", "memchr", ] @@ -2759,13 +4466,80 @@ version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" +[[package]] +name = "radium" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" + +[[package]] +name = "rand" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e058c7de0b26af77780c769414d6257830bb240f3c38477dbc2c16e5f54d6d4c" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9ef1d0d795eb7d84685bca4f72f3649f064e6641543d3a8c415898726a57b41" +dependencies = [ + "rand_chacha 0.9.0", + "rand_core 0.9.5", +] + [[package]] name = "rand" version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "65c9fb96cbc91e3478eaae79a69fcd3f1ae4ad052e471fe6732fff548984b4af" dependencies = [ - "rand_core", + "chacha20", + "getrandom 0.4.3", + "rand_core 0.10.1", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core 0.9.5", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.17", +] + +[[package]] +name = "rand_core" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" +dependencies = [ + "getrandom 0.3.4", ] [[package]] @@ -2780,14 +4554,73 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "caa0f4137e1c0a72f4c651489402276c8e8e1cf081f3b0ba156d2cbeef09e86a" dependencies = [ - "rand_core", + "rand_core 0.10.1", ] [[package]] name = "range-alloc" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca45419789ae5a7899559e9512e58ca889e41f04f1f2445e9f4b290ceccd1d08" +checksum = "ca45419789ae5a7899559e9512e58ca889e41f04f1f2445e9f4b290ceccd1d08" + +[[package]] +name = "rav1e" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43b6dd56e85d9483277cde964fd1bdb0428de4fec5ebba7540995639a21cb32b" +dependencies = [ + "aligned-vec", + "arbitrary", + "arg_enum_proc_macro", + "arrayvec", + "av-scenechange", + "av1-grain", + "bitstream-io", + "built", + "cfg-if", + "interpolate_name", + "itertools 0.14.0", + "libc", + "libfuzzer-sys", + "log", + "maybe-rayon", + "new_debug_unreachable", + "noop_proc_macro", + "num-derive", + "num-traits", + "paste", + "profiling", + "rand 0.9.5", + "rand_chacha 0.9.0", + "simd_helpers", + "thiserror 2.0.21", + "v_frame", + "wasm-bindgen", +] + +[[package]] +name = "ravif" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e52310197d971b0f5be7fe6b57530dcd27beb35c1b013f29d66c1ad73fbbcc45" +dependencies = [ + "avif-serialize", + "imgref", + "loop9", + "quick-error", + "rav1e", + "rayon", + "rgb", +] + +[[package]] +name = "raw-cpuid" +version = "11.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "498cd0dc59d73224351ee52a95fee0f1a617a2eae0e7d9d720cc622c73a54186" +dependencies = [ + "bitflags 2.13.2", +] [[package]] name = "raw-window-handle" @@ -2807,6 +4640,12 @@ dependencies = [ "objc2-quartz-core 0.3.2", ] +[[package]] +name = "rawpointer" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" + [[package]] name = "rayon" version = "1.12.0" @@ -2838,6 +4677,12 @@ dependencies = [ "once_cell", ] +[[package]] +name = "reborrow" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03251193000f4bd3b042892be858ee50e8b3719f2b08e5833ac4353724632430" + [[package]] name = "redox_syscall" version = "0.4.1" @@ -2898,6 +4743,26 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "rgb" +version = "0.8.53" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47b34b781b31e5d73e9fbc8689c70551fd1ade9a19e3e28cfec8580a79290cc4" + +[[package]] +name = "ring" +version = "0.17.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" +dependencies = [ + "cc", + "cfg-if", + "getrandom 0.2.17", + "libc", + "untrusted", + "windows-sys 0.52.0", +] + [[package]] name = "robust" version = "1.2.0" @@ -2936,6 +4801,20 @@ dependencies = [ "semver", ] +[[package]] +name = "rustfft" +version = "6.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21db5f9893e91f41798c88680037dba611ca6674703c1a18601b01a72c8adb89" +dependencies = [ + "num-complex", + "num-integer", + "num-traits", + "primal-check", + "strength_reduce", + "transpose", +] + [[package]] name = "rustgis" version = "0.1.0" @@ -2953,6 +4832,7 @@ name = "rustgis-analysis" version = "0.1.0" dependencies = [ "geo", + "log", "rustgis-data", "rustgis-geom", "serde_json", @@ -2989,6 +4869,7 @@ dependencies = [ "log", "rustgis-analysis", "rustgis-data", + "rustgis-geolibre", "rustgis-geom", "rustgis-map", "rustgis-render", @@ -2997,6 +4878,18 @@ dependencies = [ "web-time", ] +[[package]] +name = "rustgis-geolibre" +version = "0.1.0" +dependencies = [ + "geolibre-cli", + "log", + "rustgis-analysis", + "rustgis-data", + "rustgis-geom", + "serde_json", +] + [[package]] name = "rustgis-geom" version = "0.1.0" @@ -3088,18 +4981,80 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "rustls" +version = "0.23.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d41d731c7d2f962d1ccc364cec258de3c0e93b38c2fb3ba97ac74513048d634" +dependencies = [ + "log", + "once_cell", + "ring", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls-pki-types" +version = "1.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f4925028c7eb5d1fcdaf196971378ed9d2c1c4efc7dc5d011256f76c99c0a96" +dependencies = [ + "zeroize", +] + +[[package]] +name = "rustls-webpki" +version = "0.103.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3c3cf1d8b1e7d4927e2d154c3fcb02979afb9939629c62cd9048d4f07b60ac2" +dependencies = [ + "ring", + "rustls-pki-types", + "untrusted", +] + [[package]] name = "rustversion" version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f" +[[package]] +name = "ruzstd" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7c1c839d570d835527c9a5e4db7cb2198683a988cb9d7293fc8674e6bd58fc8" +dependencies = [ + "twox-hash", +] + [[package]] name = "ryu" version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" +[[package]] +name = "safe_arch" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96b02de82ddbe1b636e6170c21be622223aea188ef2e139be0a5b219ec215323" +dependencies = [ + "bytemuck", +] + +[[package]] +name = "safe_arch" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42c6efa15875e6ecb39ca61fb0b0c1a40b84fac5a5ffe71eef7d1000c8eb3f5f" +dependencies = [ + "bytemuck", +] + [[package]] name = "same-file" version = "1.0.6" @@ -3133,6 +5088,12 @@ version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" +[[package]] +name = "seq-macro" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bc711410fbe7399f390ca1c3b60ad0f53f80e95c5eb935e52268a0e2cd49acc" + [[package]] name = "serde" version = "1.0.229" @@ -3228,6 +5189,19 @@ dependencies = [ "libc", ] +[[package]] +name = "simba" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c99284beb21666094ba2b75bbceda012e610f5479dfcc2d6e2426f53197ffd95" +dependencies = [ + "approx", + "num-complex", + "num-traits", + "paste", + "wide 0.7.33", +] + [[package]] name = "simd-adler32" version = "0.3.10" @@ -3244,6 +5218,15 @@ dependencies = [ "simdutf8", ] +[[package]] +name = "simd_helpers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95890f873bec569a0362c235787f3aca6e1e887302ba4840839bcc6459c42da6" +dependencies = [ + "quote", +] + [[package]] name = "simdutf8" version = "0.1.5" @@ -3287,6 +5270,22 @@ version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b3dc8af474f516a851ff4bd12db780f948b9250ad37211e4eec0bccea54e01b" +[[package]] +name = "smartcore" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95448e4a8d52c5fb6a738005deaa11e16cd963d85406610673fde23d80653240" +dependencies = [ + "approx", + "cfg-if", + "num", + "num-traits", + "ordered-float 5.5.0", + "rand 0.8.8", + "serde", + "typetag", +] + [[package]] name = "smithay-client-toolkit" version = "0.19.2" @@ -3359,6 +5358,12 @@ dependencies = [ "serde", ] +[[package]] +name = "snap" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "199905e6153d6405f9728fe44daace35f8f837bbf830bb6e85fbd5828709a886" + [[package]] name = "spade" version = "2.15.1" @@ -3392,12 +5397,41 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +[[package]] +name = "strength_reduce" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe895eb47f22e2ddd4dabc02bce419d2e643c8e3b585c78158b349195bc24d82" + [[package]] name = "strict-num" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6637bab7722d379c8b41ba849228d680cc12d0a45ba1fa2b48f2a30577a06731" +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + [[package]] name = "syn" version = "2.0.119" @@ -3420,6 +5454,17 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "synstructure" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "901704edd0dfe137f1987838ee4f259e4e063c31371bdb423f7ae38ec6f77f02" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.7", +] + [[package]] name = "sys-locale" version = "0.3.2" @@ -3432,6 +5477,23 @@ dependencies = [ "web-sys", ] +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + +[[package]] +name = "tar" +version = "0.4.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f6221d9a6003c78398e3b239969f352578258df48c8eb051caadae0015bc840" +dependencies = [ + "filetime", + "libc", + "xattr", +] + [[package]] name = "tempfile" version = "3.27.0" @@ -3494,6 +5556,17 @@ dependencies = [ "syn 3.0.7", ] +[[package]] +name = "thrift" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e54bc85fc7faa8bc175c4bab5b92ba8d9a3ce893d0e9f42cc455c8ab16a9e09" +dependencies = [ + "byteorder", + "integer-encoding 3.0.4", + "ordered-float 2.10.1", +] + [[package]] name = "tiff" version = "0.11.3" @@ -3519,6 +5592,7 @@ dependencies = [ "powerfmt", "serde_core", "time-core", + "time-macros", ] [[package]] @@ -3527,6 +5601,25 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e1c906769ad99c88eaa54e728060edef082f8e358ff32030cb7c7d315e81109" +[[package]] +name = "time-macros" +version = "0.2.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e689342a48d2ea927c87ea50cabf8594854bf940e9310208848d680d668ed85" +dependencies = [ + "num-conv", + "time-core", +] + +[[package]] +name = "tiny-keccak" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" +dependencies = [ + "crunchy", +] + [[package]] name = "tiny-skia" version = "0.12.0" @@ -3538,7 +5631,7 @@ dependencies = [ "bytemuck", "cfg-if", "log", - "png", + "png 0.18.1", "tiny-skia-path", ] @@ -3553,6 +5646,16 @@ dependencies = [ "strict-num", ] +[[package]] +name = "tinystr" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1e27c91459209c2986af3dcf603a5a74a4368754ce37414f59acc971167f643" +dependencies = [ + "displaydoc", + "zerovec", +] + [[package]] name = "tokio" version = "1.53.2" @@ -3570,11 +5673,17 @@ checksum = "20489e00e4d8741d6be680764cc12e270655e375a20d1011e844a9c3379e678d" dependencies = [ "serde_core", "serde_spanned", - "toml_datetime", + "toml_datetime 1.1.2+spec-1.1.0", "toml_parser", - "winnow", + "winnow 1.0.4", ] +[[package]] +name = "toml_datetime" +version = "0.6.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" + [[package]] name = "toml_datetime" version = "1.1.2+spec-1.1.0" @@ -3584,6 +5693,17 @@ dependencies = [ "serde_core", ] +[[package]] +name = "toml_edit" +version = "0.19.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +dependencies = [ + "indexmap", + "toml_datetime 0.6.11", + "winnow 0.5.40", +] + [[package]] name = "toml_edit" version = "0.25.17+spec-1.1.0" @@ -3591,9 +5711,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3641d5bbb5349a79e1020a242d251efbc546ad8048d133958323ce9c40a9c9c" dependencies = [ "indexmap", - "toml_datetime", + "toml_datetime 1.1.2+spec-1.1.0", "toml_parser", - "winnow", + "winnow 1.0.4", ] [[package]] @@ -3602,7 +5722,7 @@ version = "1.1.5+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baa693a8032d7e1cada7d0041e96126df243179ff061456783ac7f12bda4744c" dependencies = [ - "winnow", + "winnow 1.0.4", ] [[package]] @@ -3637,12 +5757,28 @@ dependencies = [ "once_cell", ] +[[package]] +name = "transpose" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ad61aed86bc3faea4300c7aee358b4c6d0c8d6ccc36524c96e4c92ccf26e77e" +dependencies = [ + "num-integer", + "strength_reduce", +] + [[package]] name = "ttf-parser" version = "0.25.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2df906b07856748fa3f6e0ad0cbaa047052d4a7dd609e231c4f72cee8c36f31" +[[package]] +name = "twox-hash" +version = "2.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86a801b3cea342a06d468c8710662aa29e5e05e4f5c0d62f00bbb7f2ad7941c2" + [[package]] name = "type-map" version = "0.5.1" @@ -3652,6 +5788,48 @@ dependencies = [ "rustc-hash 2.1.3", ] +[[package]] +name = "typed-path" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e28f89b80c87b8fb0cf04ab448d5dd0dd0ade2f8891bae878de66a75a28600e" + +[[package]] +name = "typeid" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc7d623258602320d5c55d1bc22793b57daff0ec7efc270ea7d55ce1d5f5471c" + +[[package]] +name = "typenum" +version = "1.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20" + +[[package]] +name = "typetag" +version = "0.2.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c90e86058a30d42a1a928dfb4b49bb33c98c3a2b4909492e6b0881cd94798ec2" +dependencies = [ + "erased-serde", + "inventory", + "once_cell", + "serde", + "typetag-impl", +] + +[[package]] +name = "typetag-impl" +version = "0.2.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f153acc4e99a5f2a5aefa09fb078be54e26271b2813f6041200b224c098d8328" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.7", +] + [[package]] name = "uds_windows" version = "1.2.1" @@ -3687,14 +5865,73 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "unty" +version = "0.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d49784317cd0d1ee7ec5c716dd598ec5b4483ea832a2dced265471cc0f690ae" + +[[package]] +name = "ureq" +version = "2.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02d1a66277ed75f640d608235660df48c8e3c19f3b4edb6a263315626cc3c01d" +dependencies = [ + "base64", + "flate2", + "log", + "once_cell", + "rustls", + "rustls-pki-types", + "serde", + "serde_json", + "url", + "webpki-roots 0.26.11", +] + +[[package]] +name = "url" +version = "2.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", + "serde", +] + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + [[package]] name = "uuid" version = "1.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cc1186384beb7dd8eedea376413fd654937285ea6c9cfbb928dc3043ea4b606" +checksum = "7cc1186384beb7dd8eedea376413fd654937285ea6c9cfbb928dc3043ea4b606" +dependencies = [ + "js-sys", + "serde_core", + "wasm-bindgen", +] + +[[package]] +name = "v_frame" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "666b7727c8875d6ab5db9533418d7c764233ac9c0cff1d469aec8fa127597be2" dependencies = [ - "js-sys", - "serde_core", + "aligned-vec", + "num-traits", "wasm-bindgen", ] @@ -3731,6 +5968,12 @@ version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" +[[package]] +name = "virtue" +version = "0.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "051eb1abcf10076295e815102942cc58f9d5e3b4560e46e53c21e8ff6f3af7b1" + [[package]] name = "walkdir" version = "2.5.0" @@ -3741,6 +5984,12 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + [[package]] name = "wasip2" version = "1.0.4+wasi-0.2.12" @@ -3941,6 +6190,157 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "wbcore" +version = "0.1.1" +source = "git+https://github.com/opengeos/whitebox-wasm#a32201b4c937abdbeed452b47c675be12613a988" +dependencies = [ + "serde", + "serde_json", + "thiserror 1.0.69", +] + +[[package]] +name = "wbgeotiff" +version = "0.1.2" +source = "git+https://github.com/opengeos/whitebox-wasm#a32201b4c937abdbeed452b47c675be12613a988" +dependencies = [ + "flate2", + "jpeg-decoder", + "jpeg-encoder 0.6.1", + "jxl-oxide", + "lz4_flex 0.11.6", + "png 0.17.16", + "rayon", + "thiserror 1.0.69", + "webp-rust", + "weezl", + "zune-core", + "zune-jpegxl", +] + +[[package]] +name = "wbhdf" +version = "0.1.0" +source = "git+https://github.com/opengeos/whitebox-wasm#a32201b4c937abdbeed452b47c675be12613a988" +dependencies = [ + "byteorder", + "flate2", + "miniz_oxide 0.8.9", + "thiserror 1.0.69", +] + +[[package]] +name = "wblidar" +version = "0.1.2" +source = "git+https://github.com/opengeos/whitebox-wasm#a32201b4c937abdbeed452b47c675be12613a988" +dependencies = [ + "rayon", + "wbhdf", + "wbprojection", + "wide 1.7.1", +] + +[[package]] +name = "wbprojection" +version = "0.3.0" +source = "git+https://github.com/opengeos/whitebox-wasm#a32201b4c937abdbeed452b47c675be12613a988" +dependencies = [ + "thiserror 1.0.69", + "wide 1.7.1", +] + +[[package]] +name = "wbraster" +version = "0.2.0" +source = "git+https://github.com/opengeos/whitebox-wasm#a32201b4c937abdbeed452b47c675be12613a988" +dependencies = [ + "flate2", + "jpeg-decoder", + "jpeg-encoder 0.7.1", + "lz4_flex 0.13.1", + "png 0.18.1", + "rayon", + "ruzstd", + "serde", + "serde_json", + "tar", + "thiserror 2.0.21", + "wbgeotiff", + "wbhdf", + "wbprojection", + "wide 1.7.1", + "zip", +] + +[[package]] +name = "wbspatialstats" +version = "0.1.0" +source = "git+https://github.com/opengeos/whitebox-wasm#a32201b4c937abdbeed452b47c675be12613a988" +dependencies = [ + "log", + "nalgebra", + "ndarray", + "rand 0.8.8", + "rayon", + "serde", + "serde_json", + "thiserror 1.0.69", +] + +[[package]] +name = "wbtools_oss" +version = "0.1.2" +source = "git+https://github.com/opengeos/whitebox-wasm#a32201b4c937abdbeed452b47c675be12613a988" +dependencies = [ + "bincode", + "chrono", + "evalexpr", + "image", + "kdtree", + "nalgebra", + "rand 0.10.3", + "rayon", + "rustfft", + "serde", + "serde_json", + "smartcore", + "time", + "ureq", + "wbcore", + "wbgeotiff", + "wblidar", + "wbprojection", + "wbraster", + "wbspatialstats", + "wbtopology", + "wbvector", + "wide 1.7.1", +] + +[[package]] +name = "wbtopology" +version = "0.2.0" +source = "git+https://github.com/opengeos/whitebox-wasm#a32201b4c937abdbeed452b47c675be12613a988" +dependencies = [ + "rayon", + "robust", + "wbvector", +] + +[[package]] +name = "wbvector" +version = "0.1.4" +source = "git+https://github.com/opengeos/whitebox-wasm#a32201b4c937abdbeed452b47c675be12613a988" +dependencies = [ + "bytes", + "flatbuffers 24.12.23", + "parquet", + "serde_json", + "thiserror 1.0.69", + "wbprojection", +] + [[package]] name = "web-sys" version = "0.3.106" @@ -3961,6 +6361,33 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "webp-rust" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d5967f27dbd1796f7ca3f9f555500ed7ae4aef4c153bf1f8e9e8a72751ed1b4" +dependencies = [ + "bin-rs", +] + +[[package]] +name = "webpki-roots" +version = "0.26.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "521bc38abb08001b01866da9f51eb7c5d647a19260e00054a8c7fd5f9e57f7a9" +dependencies = [ + "webpki-roots 1.0.9", +] + +[[package]] +name = "webpki-roots" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dcd9d09a39985f5344844e66b0c530a33843579125f23e21e9f0f220850f22a" +dependencies = [ + "rustls-pki-types", +] + [[package]] name = "weezl" version = "0.1.12" @@ -4102,7 +6529,7 @@ dependencies = [ "objc2-metal 0.3.2", "objc2-quartz-core 0.3.2", "once_cell", - "ordered-float", + "ordered-float 5.5.0", "parking_lot", "portable-atomic", "portable-atomic-util", @@ -4150,6 +6577,26 @@ dependencies = [ "web-sys", ] +[[package]] +name = "wide" +version = "0.7.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ce5da8ecb62bcd8ec8b7ea19f69a51275e91299be594ea5cc6ef7819e16cd03" +dependencies = [ + "bytemuck", + "safe_arch 0.7.4", +] + +[[package]] +name = "wide" +version = "1.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d920ac99c3c8edce110cb8d07dbb324d6d026011dce85b1e9355b70f0adacc4f" +dependencies = [ + "bytemuck", + "safe_arch 1.2.0", +] + [[package]] name = "winapi-util" version = "0.1.11" @@ -4485,6 +6932,15 @@ dependencies = [ "xkbcommon-dl", ] +[[package]] +name = "winnow" +version = "0.5.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", +] + [[package]] name = "winnow" version = "1.0.4" @@ -4500,6 +6956,21 @@ version = "0.57.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" +[[package]] +name = "writeable" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ad82d2a33cdc9674dc7465672f271e096168fcdbe0f799d9e6db8c5892679dc" + +[[package]] +name = "wyz" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +dependencies = [ + "tap", +] + [[package]] name = "x11-dl" version = "2.21.0" @@ -4532,6 +7003,16 @@ version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea6fc2961e4ef194dcbfe56bb845534d0dc8098940c7e5c012a258bfec6701bd" +[[package]] +name = "xattr" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32e45ad4206f6d2479085147f02bc2ef834ac85886624a23575ae137c8aa8156" +dependencies = [ + "libc", + "rustix 1.1.5", +] + [[package]] name = "xcursor" version = "0.3.11" @@ -4567,6 +7048,35 @@ checksum = "e450f9b2ed1dff33c94c12589a87338689467b9c4f5d8a5710bd09a847d2c8a7" name = "xtask" version = "0.1.0" +[[package]] +name = "y4m" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5a4b21e1a62b67a2970e6831bc091d7b87e119e7f9791aef9702e3bef04448" + +[[package]] +name = "yoke" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "709fe23a0424b6a435d82152b1bd3fdfb0833487d5fa90d05d42762a9891fef5" +dependencies = [ + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec8ebde2db3681e8c9980cc27822030e68752690ddfa9473e739aeb4dbde6d71" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.7", + "synstructure", +] + [[package]] name = "zbus" version = "5.19.0" @@ -4596,7 +7106,7 @@ dependencies = [ "uds_windows", "uuid", "windows-sys 0.61.2", - "winnow", + "winnow 1.0.4", "zbus_macros", "zbus_names", "zvariant", @@ -4632,7 +7142,7 @@ version = "5.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2990635d09ade6df1868f72f8cac69a876a90981e8bd3c40b1be413f8dc88f40" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 3.5.0", "proc-macro2", "quote", "syn 3.0.7", @@ -4648,7 +7158,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d8bf88b4a3ff53e883001e0e0115b297a9d53c31b9c1edd2bfdd853e3428624e" dependencies = [ "serde", - "winnow", + "winnow 1.0.4", "zvariant", ] @@ -4659,7 +7169,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d1586c021a01ca0a9216dcd874e546382e156a5cbab5fab6cb5f10087e22682a" dependencies = [ "serde", - "winnow", + "winnow 1.0.4", "zbus_names", "zvariant", ] @@ -4693,6 +7203,80 @@ dependencies = [ "syn 2.0.119", ] +[[package]] +name = "zerofrom" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ec05a11813ea801ff6d75110ad09cd0824ddba17dfe17128ea0d5f68e6c5272" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f75b4683f6c7f45248d4d64056a24298c6281e0993356d7d1b4a1a962ef10d4a" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.7", + "synstructure", +] + +[[package]] +name = "zeroize" +version = "1.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13084392c5e4bc371903e2935a5eaeed24905a7511356b883835e18a78f6879" + +[[package]] +name = "zerotrie" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ea269c3bd32f0a32c321907a2ae912ba6f4649bb0fc764a15627e99a7095a3f" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb0464e17806c1d976d5cba29399c7f08e516e279e2ba493f63123b5fca67dd8" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34df6fc39dbd26ddc9c10e6a2984476e13acce22e64e4487636ef494369225da" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.7", +] + +[[package]] +name = "zip" +version = "8.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d04a6b5381502aa6087c94c669499eb1602eb9c5e8198e534de571f7154809b" +dependencies = [ + "crc32fast", + "flate2", + "indexmap", + "memchr", + "typed-path", + "zopfli", +] + [[package]] name = "zlib-rs" version = "0.6.8" @@ -4705,12 +7289,80 @@ version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b" +[[package]] +name = "zopfli" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f05cd8797d63865425ff89b5c4a48804f35ba0ce8d125800027ad6017d2b5249" +dependencies = [ + "bumpalo", + "crc32fast", + "log", + "simd-adler32", +] + +[[package]] +name = "zstd" +version = "0.11.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" +dependencies = [ + "zstd-safe 5.0.2+zstd.1.5.2", +] + +[[package]] +name = "zstd" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e91ee311a569c327171651566e07972200e76fcfe2242a4fa446149a3881c08a" +dependencies = [ + "zstd-safe 7.3.0", +] + +[[package]] +name = "zstd-safe" +version = "5.0.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" +dependencies = [ + "libc", + "zstd-sys", +] + +[[package]] +name = "zstd-safe" +version = "7.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64d80649ab6db9d9f6f9c80a40becd948eda4714a0a5ac8c4d157a32231c7882" +dependencies = [ + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "2.1.1+zstd.1.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aeec9eaf2dffbbd09201e23bd0ffcbaa33bb8e9266a10734fd7ed90a85eca078" +dependencies = [ + "cc", + "pkg-config", +] + [[package]] name = "zune-core" version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d56377fd46368984a170bc5aac5567e52ca5da874caa60bea39fcbca78fb658b" +[[package]] +name = "zune-inflate" +version = "0.2.54" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73ab332fe2f6680068f3582b16a24f90ad7096d5d39b974d1c0aff0125116f02" +dependencies = [ + "simd-adler32", +] + [[package]] name = "zune-jpeg" version = "0.5.15" @@ -4720,6 +7372,15 @@ dependencies = [ "zune-core", ] +[[package]] +name = "zune-jpegxl" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cba11ecd07cc23351500e840ae03841b7e4997923ec8e4832ee3ae199ea0b6b4" +dependencies = [ + "zune-core", +] + [[package]] name = "zvariant" version = "5.15.0" @@ -4729,7 +7390,7 @@ dependencies = [ "endi", "enumflags2", "serde", - "winnow", + "winnow 1.0.4", "zcheapstr", "zvariant_derive", "zvariant_utils", @@ -4741,7 +7402,7 @@ version = "5.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "864155e69b4352db0c7f374917bf45d1e0c8d17659c8b3dbf9795f3673f8c497" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 3.5.0", "proc-macro2", "quote", "syn 3.0.7", @@ -4758,5 +7419,5 @@ dependencies = [ "quote", "serde", "syn 3.0.7", - "winnow", + "winnow 1.0.4", ] diff --git a/Cargo.toml b/Cargo.toml index 84a0be201c..e7a0c03902 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,6 +19,7 @@ rustgis-analysis = { path = "crates/analysis" } rustgis-render = { path = "crates/render" } rustgis-engine = { path = "crates/engine" } rustgis-ui-egui = { path = "crates/ui-egui" } +rustgis-geolibre = { path = "crates/geolibre" } # foundation thiserror = "2" diff --git a/README.md b/README.md index eb9ffb9f06..a545a0d875 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ Every screenshot is RustGIS itself, rendered offscreen by `cargo run -p rustgis- | **Labeling** | Per-layer labels with field, size, colour, bold and halo; collision-free placement | | **Selection** | Click and box select (add/remove), Select By Attributes with live SQL validation, Select By Location, switch/clear/zoom to selection, layer from selection | | **Editing** | Create points, lines and polygons; delete; edit cells in the attribute table; add, delete and calculate fields; undo/redo for everything | -| **Analysis** | Buffer, Clip, Erase, Dissolve, Minimum Bounding Geometry, Feature To Point, Simplify, Summarize Within, Calculate Geometry, Summary Statistics, Export Features | +| **Analysis** | Buffer, Clip, Erase, Dissolve, Minimum Bounding Geometry, Feature To Point, Simplify, Summarize Within, Calculate Geometry, Summary Statistics, Export Features; plus 1,000+ raster, vector, LiDAR, hydrology and terrain tools from the [GeoLibre](https://github.com/opengeos/geolibre-rust) suite (desktop and command line) | | **Inquiry** | Identify pop-ups, geodesic distance and area measurement, live coordinates (DD or DMS) | | **Share** | PNG export with labels and a scale bar at any DPI; export layers to GeoJSON/CSV | | **Productivity** | Command search (Ctrl+K), keyboard shortcuts, dark mode, Catalog pane with folder browsing | diff --git a/apps/rustgis-cli/Cargo.toml b/apps/rustgis-cli/Cargo.toml index 6f000ff1c8..fbca0f21ac 100644 --- a/apps/rustgis-cli/Cargo.toml +++ b/apps/rustgis-cli/Cargo.toml @@ -10,5 +10,5 @@ description = "RustGIS command line: run commands and geoprocessing, render maps workspace = true [dependencies] -rustgis-engine = { workspace = true } +rustgis-engine = { workspace = true, features = ["geolibre"] } serde_json = { workspace = true } diff --git a/apps/rustgis/Cargo.toml b/apps/rustgis/Cargo.toml index a3a9cb29f0..9ef078e3bd 100644 --- a/apps/rustgis/Cargo.toml +++ b/apps/rustgis/Cargo.toml @@ -11,7 +11,7 @@ description = "RustGIS desktop app" workspace = true [dependencies] -rustgis-engine = { workspace = true } +rustgis-engine = { workspace = true, features = ["geolibre"] } rustgis-ui-egui = { workspace = true } eframe = { workspace = true, features = ["default_fonts", "wgpu", "accesskit", "wayland", "x11"] } egui = { workspace = true } diff --git a/crates/analysis/Cargo.toml b/crates/analysis/Cargo.toml index 11e11bb9b1..3b5874b998 100644 --- a/crates/analysis/Cargo.toml +++ b/crates/analysis/Cargo.toml @@ -13,3 +13,4 @@ rustgis-geom = { workspace = true } rustgis-data = { workspace = true } geo = { workspace = true } serde_json = { workspace = true } +log = { workspace = true } diff --git a/crates/analysis/src/lib.rs b/crates/analysis/src/lib.rs index a89c770a52..4b6bc995a0 100644 --- a/crates/analysis/src/lib.rs +++ b/crates/analysis/src/lib.rs @@ -4,6 +4,10 @@ //! pure `run` function over datasets. Inputs refer to layers by name through [`Inputs`]. Work is //! done in Web Mercator metres; distances are corrected for scale distortion at each feature's //! latitude so a 100 km buffer is about 100 km on the ground. +//! +//! Tools from an external suite (the GeoLibre/Whitebox tools, in `rustgis-geolibre`) join +//! the built-in ones through [`register_external`]: they're listed by [`tools`], found by +//! [`tool`] and run by [`run`] like the rest. #![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)] pub mod convert; @@ -31,6 +35,14 @@ pub enum ParamKind { Text, /// One of a fixed list of choices. Choice(&'static [&'static str]), + /// A raster layer. + RasterLayer, + /// Any vector layer (no standalone tables). + VectorLayer, + /// On or off. + Bool, + /// A file path typed by the user (for data RustGIS doesn't open as a layer, such as LiDAR). + Path, } #[derive(Clone, Copy, Debug)] @@ -41,6 +53,8 @@ pub struct ParamSpec { pub required: bool, /// Default value as JSON text (`"10"`, `"\"km\""`), or empty. pub default: &'static str, + /// A longer description, shown on hover (may be empty). + pub help: &'static str, } /// What a tool produced. @@ -54,6 +68,30 @@ pub enum Output { Update { layer: String, dataset: Dataset }, /// A standalone table. Table(Dataset), + /// Several new layers and tables (external tools can write more than one output). + Layers(Vec), +} + +/// One output of [`Output::Layers`]. +#[derive(Clone, Debug)] +pub enum OutputLayer { + Vector(Dataset), + /// A raster file, kept as its bytes so the project can embed it. + Raster { + name: String, + file_name: String, + bytes: Vec, + }, + Table(Dataset), +} + +/// A raster layer handed to a tool: its file (on disk or embedded), or failing that the pixels. +pub struct RasterInput<'a> { + pub raster: &'a rustgis_data::raster::Raster, + /// The file it was read from, when it is on disk. + pub path: Option<&'a str>, + /// The file's name and bytes, when it is embedded in the project. + pub embedded: Option<(&'a str, &'a [u8])>, } #[derive(Clone, Debug)] @@ -67,6 +105,10 @@ pub trait Inputs { fn dataset(&self, layer: &str) -> Option<&Dataset>; /// Selected rows of a layer; tools honour a selection like desktop GIS does. fn selection(&self, layer: &str) -> &[usize]; + /// A raster layer by name. + fn raster(&self, _layer: &str) -> Option> { + None + } } pub struct ToolSpec { @@ -78,8 +120,54 @@ pub struct ToolSpec { pub run: fn(&dyn Inputs, &Value) -> Result, } +/// Runs an external tool (the spec says which). +pub type ExternalRunner = fn(&ToolSpec, &dyn Inputs, &Value) -> Result; + +/// Where external tools come from: called once, the first time the tools are listed. +pub type ExternalProvider = fn() -> Vec; + +static PROVIDER: std::sync::OnceLock<(ExternalProvider, ExternalRunner)> = std::sync::OnceLock::new(); +static EXTERNAL: std::sync::OnceLock> = std::sync::OnceLock::new(); + +/// Adds an external tool suite. Only the first registration counts; the provider runs lazily, +/// so registering costs nothing until a tool list is needed. +pub fn register_external(provider: ExternalProvider, runner: ExternalRunner) { + let _ = PROVIDER.set((provider, runner)); +} + +/// The external tools (empty when none are registered). +pub fn external_tools() -> &'static [ToolSpec] { + match PROVIDER.get() { + Some((provider, _)) => EXTERNAL.get_or_init(|| { + std::panic::catch_unwind(provider).unwrap_or_else(|_| { + log::error!("the external tool suite failed to load"); + Vec::new() + }) + }), + None => &[], + } +} + +/// Every tool: the built-in ones, then the external ones. +pub fn tools() -> impl Iterator { + TOOLS.iter().chain(external_tools()) +} + +/// Whether a tool comes from the external suite. +pub fn is_external(spec: &ToolSpec) -> bool { + external_tools().iter().any(|t| std::ptr::eq(t, spec)) +} + pub fn tool(id: &str) -> Option<&'static ToolSpec> { - TOOLS.iter().find(|t| t.id.eq_ignore_ascii_case(id) || t.name.eq_ignore_ascii_case(id)) + let by_id = |t: &&ToolSpec| t.id.eq_ignore_ascii_case(id); + let by_name = |t: &&ToolSpec| t.name.eq_ignore_ascii_case(id); + // A built-in tool wins over an external one with the same name. + tools().find(by_id).or_else(|| TOOLS.iter().find(by_name)).or_else(|| external_tools().iter().find(by_name)) +} + +/// The runner for external tools; never called (external specs carry the runner's id). +pub fn external_placeholder(_: &dyn Inputs, _: &Value) -> Result { + Err("this tool runs through the external suite".into()) } /// Runs a tool with JSON parameters, filling defaults and checking required ones. @@ -98,7 +186,10 @@ pub fn run(id: &str, inputs: &dyn Inputs, params: &Value) -> Result runner(spec, inputs, &p), + _ => (spec.run)(inputs, &p), + })) + .unwrap_or_else(|_| Err(format!("{} failed unexpectedly", spec.name))) } diff --git a/crates/analysis/src/tools.rs b/crates/analysis/src/tools.rs index f4e9fa33ff..71354c6285 100644 --- a/crates/analysis/src/tools.rs +++ b/crates/analysis/src/tools.rs @@ -17,11 +17,11 @@ pub static TOOLS: &[ToolSpec] = &[ toolbox: "Analysis › Proximity", summary: "Creates polygons around input features at a given distance.", params: &[ - P { name: "input", label: "Input Features", kind: K::Layer, required: true, default: "" }, - P { name: "distance", label: "Distance", kind: K::Number, required: true, default: "100" }, - P { name: "units", label: "Units", kind: K::Choice(UNITS), required: false, default: "\"Kilometers\"" }, - P { name: "dissolve", label: "Dissolve", kind: K::Choice(&["None", "All"]), required: false, default: "\"None\"" }, - P { name: "output", label: "Output Name", kind: K::Text, required: false, default: "" }, + P { name: "input", label: "Input Features", kind: K::Layer, required: true, default: "", help: "" }, + P { name: "distance", label: "Distance", kind: K::Number, required: true, default: "100", help: "" }, + P { name: "units", label: "Units", kind: K::Choice(UNITS), required: false, default: "\"Kilometers\"", help: "" }, + P { name: "dissolve", label: "Dissolve", kind: K::Choice(&["None", "All"]), required: false, default: "\"None\"", help: "" }, + P { name: "output", label: "Output Name", kind: K::Text, required: false, default: "", help: "" }, ], run: buffer, }, @@ -31,9 +31,9 @@ pub static TOOLS: &[ToolSpec] = &[ toolbox: "Analysis › Extract", summary: "Extracts the parts of input features that fall inside clip polygons.", params: &[ - P { name: "input", label: "Input Features", kind: K::Layer, required: true, default: "" }, - P { name: "clip", label: "Clip Features", kind: K::PolygonLayer, required: true, default: "" }, - P { name: "output", label: "Output Name", kind: K::Text, required: false, default: "" }, + P { name: "input", label: "Input Features", kind: K::Layer, required: true, default: "", help: "" }, + P { name: "clip", label: "Clip Features", kind: K::PolygonLayer, required: true, default: "", help: "" }, + P { name: "output", label: "Output Name", kind: K::Text, required: false, default: "", help: "" }, ], run: clip, }, @@ -43,9 +43,9 @@ pub static TOOLS: &[ToolSpec] = &[ toolbox: "Analysis › Overlay", summary: "Removes the parts of polygon features that overlap erase polygons.", params: &[ - P { name: "input", label: "Input Features", kind: K::PolygonLayer, required: true, default: "" }, - P { name: "erase", label: "Erase Features", kind: K::PolygonLayer, required: true, default: "" }, - P { name: "output", label: "Output Name", kind: K::Text, required: false, default: "" }, + P { name: "input", label: "Input Features", kind: K::PolygonLayer, required: true, default: "", help: "" }, + P { name: "erase", label: "Erase Features", kind: K::PolygonLayer, required: true, default: "", help: "" }, + P { name: "output", label: "Output Name", kind: K::Text, required: false, default: "", help: "" }, ], run: erase, }, @@ -55,9 +55,9 @@ pub static TOOLS: &[ToolSpec] = &[ toolbox: "Data Management › Generalization", summary: "Merges polygons that share a field value into one feature per value.", params: &[ - P { name: "input", label: "Input Features", kind: K::PolygonLayer, required: true, default: "" }, - P { name: "field", label: "Dissolve Field", kind: K::Field, required: false, default: "" }, - P { name: "output", label: "Output Name", kind: K::Text, required: false, default: "" }, + P { name: "input", label: "Input Features", kind: K::PolygonLayer, required: true, default: "", help: "" }, + P { name: "field", label: "Dissolve Field", kind: K::Field, required: false, default: "", help: "" }, + P { name: "output", label: "Output Name", kind: K::Text, required: false, default: "", help: "" }, ], run: dissolve, }, @@ -67,9 +67,9 @@ pub static TOOLS: &[ToolSpec] = &[ toolbox: "Data Management › Features", summary: "Encloses each feature, or all features, in its convex hull.", params: &[ - P { name: "input", label: "Input Features", kind: K::Layer, required: true, default: "" }, - P { name: "group", label: "Group Option", kind: K::Choice(&["All", "None"]), required: false, default: "\"All\"" }, - P { name: "output", label: "Output Name", kind: K::Text, required: false, default: "" }, + P { name: "input", label: "Input Features", kind: K::Layer, required: true, default: "", help: "" }, + P { name: "group", label: "Group Option", kind: K::Choice(&["All", "None"]), required: false, default: "\"All\"", help: "" }, + P { name: "output", label: "Output Name", kind: K::Text, required: false, default: "", help: "" }, ], run: convex_hull, }, @@ -79,8 +79,8 @@ pub static TOOLS: &[ToolSpec] = &[ toolbox: "Data Management › Features", summary: "Creates a point inside each input feature.", params: &[ - P { name: "input", label: "Input Features", kind: K::Layer, required: true, default: "" }, - P { name: "output", label: "Output Name", kind: K::Text, required: false, default: "" }, + P { name: "input", label: "Input Features", kind: K::Layer, required: true, default: "", help: "" }, + P { name: "output", label: "Output Name", kind: K::Text, required: false, default: "", help: "" }, ], run: feature_to_point, }, @@ -90,9 +90,9 @@ pub static TOOLS: &[ToolSpec] = &[ toolbox: "Cartography › Generalization", summary: "Removes vertices that deviate less than a tolerance (Douglas–Peucker).", params: &[ - P { name: "input", label: "Input Features", kind: K::Layer, required: true, default: "" }, - P { name: "tolerance", label: "Tolerance (km)", kind: K::Number, required: true, default: "25" }, - P { name: "output", label: "Output Name", kind: K::Text, required: false, default: "" }, + P { name: "input", label: "Input Features", kind: K::Layer, required: true, default: "", help: "" }, + P { name: "tolerance", label: "Tolerance (km)", kind: K::Number, required: true, default: "25", help: "" }, + P { name: "output", label: "Output Name", kind: K::Text, required: false, default: "", help: "" }, ], run: simplify, }, @@ -102,10 +102,10 @@ pub static TOOLS: &[ToolSpec] = &[ toolbox: "Data Management › Layers and Table Views", summary: "Selects features that intersect features in another layer.", params: &[ - P { name: "input", label: "Input Features", kind: K::Layer, required: true, default: "" }, - P { name: "select", label: "Selecting Features", kind: K::Layer, required: true, default: "" }, - P { name: "distance", label: "Search Distance (km)", kind: K::Number, required: false, default: "0" }, - P { name: "invert", label: "Invert", kind: K::Choice(&["No", "Yes"]), required: false, default: "\"No\"" }, + P { name: "input", label: "Input Features", kind: K::Layer, required: true, default: "", help: "" }, + P { name: "select", label: "Selecting Features", kind: K::Layer, required: true, default: "", help: "" }, + P { name: "distance", label: "Search Distance (km)", kind: K::Number, required: false, default: "0", help: "" }, + P { name: "invert", label: "Invert", kind: K::Choice(&["No", "Yes"]), required: false, default: "\"No\"", help: "" }, ], run: select_by_location, }, @@ -115,8 +115,8 @@ pub static TOOLS: &[ToolSpec] = &[ toolbox: "Data Management › Layers and Table Views", summary: "Selects features with a SQL where clause, e.g. pop_est > 1000000.", params: &[ - P { name: "input", label: "Input Rows", kind: K::Layer, required: true, default: "" }, - P { name: "where", label: "Where Clause", kind: K::Text, required: true, default: "" }, + P { name: "input", label: "Input Rows", kind: K::Layer, required: true, default: "", help: "" }, + P { name: "where", label: "Where Clause", kind: K::Text, required: true, default: "", help: "" }, ], run: select_by_attributes, }, @@ -126,9 +126,9 @@ pub static TOOLS: &[ToolSpec] = &[ toolbox: "Analysis › Summarize", summary: "Counts the points that fall inside each polygon.", params: &[ - P { name: "polygons", label: "Input Polygons", kind: K::PolygonLayer, required: true, default: "" }, - P { name: "points", label: "Input Summary Features", kind: K::PointLayer, required: true, default: "" }, - P { name: "output", label: "Output Name", kind: K::Text, required: false, default: "" }, + P { name: "polygons", label: "Input Polygons", kind: K::PolygonLayer, required: true, default: "", help: "" }, + P { name: "points", label: "Input Summary Features", kind: K::PointLayer, required: true, default: "", help: "" }, + P { name: "output", label: "Output Name", kind: K::Text, required: false, default: "", help: "" }, ], run: count_points, }, @@ -137,7 +137,7 @@ pub static TOOLS: &[ToolSpec] = &[ name: "Calculate Geometry Attributes", toolbox: "Data Management › Features", summary: "Adds geodesic area (km²), length (km) or centroid coordinates as fields.", - params: &[P { name: "input", label: "Input Features", kind: K::Layer, required: true, default: "" }], + params: &[P { name: "input", label: "Input Features", kind: K::Layer, required: true, default: "", help: "" }], run: calculate_geometry, }, ToolSpec { @@ -146,9 +146,9 @@ pub static TOOLS: &[ToolSpec] = &[ toolbox: "Analysis › Statistics", summary: "Count, sum, mean, min, max and standard deviation of a field, optionally per case field.", params: &[ - P { name: "input", label: "Input Table", kind: K::Layer, required: true, default: "" }, - P { name: "field", label: "Statistics Field", kind: K::NumericField, required: true, default: "" }, - P { name: "case", label: "Case Field", kind: K::Field, required: false, default: "" }, + P { name: "input", label: "Input Table", kind: K::Layer, required: true, default: "", help: "" }, + P { name: "field", label: "Statistics Field", kind: K::NumericField, required: true, default: "", help: "" }, + P { name: "case", label: "Case Field", kind: K::Field, required: false, default: "", help: "" }, ], run: summary_statistics, }, @@ -158,9 +158,9 @@ pub static TOOLS: &[ToolSpec] = &[ toolbox: "Conversion", summary: "Copies the (selected) features of a layer to a new layer.", params: &[ - P { name: "input", label: "Input Features", kind: K::Layer, required: true, default: "" }, - P { name: "where", label: "Expression", kind: K::Text, required: false, default: "" }, - P { name: "output", label: "Output Name", kind: K::Text, required: false, default: "" }, + P { name: "input", label: "Input Features", kind: K::Layer, required: true, default: "", help: "" }, + P { name: "where", label: "Expression", kind: K::Text, required: false, default: "", help: "" }, + P { name: "output", label: "Output Name", kind: K::Text, required: false, default: "", help: "" }, ], run: export_features, }, @@ -669,7 +669,7 @@ mod tests { fn layer(r: ToolResult) -> Dataset { match r.output { Output::Layer(d) | Output::Table(d) | Output::Update { dataset: d, .. } => d, - Output::Selection { .. } => panic!("expected a dataset"), + Output::Selection { .. } | Output::Layers(_) => panic!("expected a dataset"), } } diff --git a/crates/engine/Cargo.toml b/crates/engine/Cargo.toml index 5998f3892d..4beb8b568d 100644 --- a/crates/engine/Cargo.toml +++ b/crates/engine/Cargo.toml @@ -19,3 +19,8 @@ serde_json = { workspace = true } log = { workspace = true } web-time = { workspace = true } base64 = { workspace = true } +# The GeoLibre tool suite (native only: its tools read and write files). +rustgis-geolibre = { workspace = true, optional = true } + +[features] +geolibre = ["dep:rustgis-geolibre"] diff --git a/crates/engine/src/cmd/gp.rs b/crates/engine/src/cmd/gp.rs index a6f1b2182b..e73721a0b6 100644 --- a/crates/engine/src/cmd/gp.rs +++ b/crates/engine/src/cmd/gp.rs @@ -1,6 +1,6 @@ //! Analysis tab: run geoprocessing tools and keep their history. -use rustgis_analysis::{Inputs, Output}; +use rustgis_analysis::{Inputs, Output, OutputLayer, RasterInput}; use rustgis_data::Dataset; use serde_json::{Value, json}; @@ -12,8 +12,7 @@ pub fn commands() -> Vec { C::new("gp.run", "Run Tool", "Analysis › Geoprocessing", run).when(need_layers).params(r#"{"tool": tool id, "params": {...}}"#), C::new("gp.tools", "Tools", "Analysis › Geoprocessing", |_, _| { Ok(Value::Array( - rustgis_analysis::TOOLS - .iter() + rustgis_analysis::tools() .map(|t| { json!({"id": t.id, "name": t.name, "toolbox": t.toolbox, "summary": t.summary, "params": t.params.iter().map(|p| json!({"name": p.name, "label": p.label, "required": p.required, "kind": format!("{:?}", p.kind)})).collect::>()}) @@ -38,6 +37,14 @@ impl Inputs for MapInputs<'_> { fn selection(&self, layer: &str) -> &[usize] { self.0.layer_by_name(layer).map(|l| l.selection.as_slice()).unwrap_or(&[]) } + fn raster(&self, layer: &str) -> Option> { + let rl = self.0.layer_by_name(layer)?.raster.as_ref()?; + Some(RasterInput { + raster: rl.data.as_deref()?, + path: rl.path.as_deref(), + embedded: rl.embedded.as_deref().map(|b| (rl.file_name.as_deref().unwrap_or("raster.tif"), b.as_slice())), + }) + } } fn now_ms() -> u64 { @@ -81,6 +88,29 @@ fn run(s: &mut Session, p: &Value) -> CmdResult { s.project.tables.push(t); json!({"table": n}) } + Output::Layers(outputs) => { + let mut layers = Vec::new(); + let mut tables = Vec::new(); + for o in outputs { + match o { + OutputLayer::Vector(ds) => layers.push(super::layer::add_dataset(s, ds)), + OutputLayer::Raster { name, file_name, bytes } => { + let r = rustgis_data::raster::read_bytes(&file_name, &bytes).map_err(|e| format!("{name}: {e}"))?; + let added = super::raster::add_raster(s, &name, rustgis_map::RasterLayer::from_bytes(r, file_name, bytes))?; + if let Some(id) = added.get("layer").and_then(Value::as_u64).and_then(|id| u32::try_from(id).ok()) { + layers.push(id); + } + } + OutputLayer::Table(t) => { + let n = t.name.clone(); + s.project.tables.retain(|x| x.name != n); + s.project.tables.push(t); + tables.push(n); + } + } + } + json!({"layers": layers, "tables": tables}) + } }; for m in &result.messages { s.notify(m.clone(), false); diff --git a/crates/engine/src/lib.rs b/crates/engine/src/lib.rs index 24dac79655..448165d960 100644 --- a/crates/engine/src/lib.rs +++ b/crates/engine/src/lib.rs @@ -185,6 +185,9 @@ pub struct Session { impl Session { pub fn new(project: Project) -> Self { + // Cheap: the suite's tools load the first time a tool list is needed. + #[cfg(feature = "geolibre")] + rustgis_geolibre::register(); Session { project, path: None, diff --git a/crates/engine/src/tests.rs b/crates/engine/src/tests.rs index 5349c47ece..61536ce12e 100644 --- a/crates/engine/src/tests.rs +++ b/crates/engine/src/tests.rs @@ -362,3 +362,31 @@ fn hostile_params_never_panic() { } } } + +#[cfg(feature = "geolibre")] +#[test] +fn geolibre_tools_run_on_layers_and_add_their_outputs() { + let mut s = with_raster(); + let tools = s.run("gp.tools", &Value::Null).unwrap(); + assert!(tools.as_array().unwrap().iter().any(|t| t["id"] == "geolibre:slope")); + let before = s.map().layers.len(); + let r = s.run("gp.run", &json!({"tool": "geolibre:slope", "params": {"input": "scene"}})).unwrap(); + assert_eq!(r["layers"].as_array().map(Vec::len), Some(1), "{r}"); + assert_eq!(s.map().layers.len(), before + 1); + let slope = s.map().layer_by_name("Slope").unwrap(); + assert!(slope.is_raster() && slope.raster.as_ref().is_some_and(|r| r.embedded.is_some()), "kept in the project"); + // It saves with the project, and undo takes it away. + let json = serde_json::to_string(&s.project).unwrap(); + assert!( + Project::from_json(&json) + .unwrap() + .map() + .layer_by_name("Slope") + .is_some_and(|l| l.raster.as_ref().is_some_and(|r| r.data.is_some())) + ); + s.run("edit.undo", &Value::Null).unwrap(); + assert!(s.map().layer_by_name("Slope").is_none()); + // A vector where a raster belongs is an error, not a crash. + let err = s.run("gp.run", &json!({"tool": "geolibre:slope", "params": {"input": "Cities"}})).unwrap_err(); + assert!(err.starts_with("Slope:"), "{err}"); +} diff --git a/crates/geolibre/Cargo.toml b/crates/geolibre/Cargo.toml new file mode 100644 index 0000000000..1636ddcf5e --- /dev/null +++ b/crates/geolibre/Cargo.toml @@ -0,0 +1,18 @@ +[package] +name = "rustgis-geolibre" +version.workspace = true +edition.workspace = true +license.workspace = true +description = "RustGIS L2: the GeoLibre/Whitebox tool suite (1,000+ raster, vector, LiDAR and hydrology tools) as geoprocessing tools" + +[lints] +workspace = true + +[dependencies] +rustgis-geom = { workspace = true } +rustgis-data = { workspace = true } +rustgis-analysis = { workspace = true } +serde_json = { workspace = true } +log = { workspace = true } +# The tool registry and its manifests; native only (the tools read and write files). +geolibre-cli = { git = "https://github.com/opengeos/geolibre-rust", branch = "feat/library-api" } diff --git a/crates/geolibre/src/lib.rs b/crates/geolibre/src/lib.rs new file mode 100644 index 0000000000..a21bf147c6 --- /dev/null +++ b/crates/geolibre/src/lib.rs @@ -0,0 +1,504 @@ +//! L2: the GeoLibre tool suite (Whitebox's tools plus GeoLibre's own: 1,000+ raster, vector, +//! LiDAR, hydrology and terrain tools) as geoprocessing tools. +//! +//! [`register`] adds them to [`rustgis_analysis`], which lists them next to the built-in tools +//! under "GeoLibre ›" toolboxes. Their forms come from the suite's manifests: each parameter +//! says whether it is a raster or vector input, an output, a choice, a number or a switch. +//! +//! The tools read and write files, so a run stages its inputs in a temporary folder: raster +//! layers as their own file (or the embedded copy), vector layers as GeoJSON. Vector data goes +//! in a metric coordinate system (the first raster input's, or the UTM zone of the data), so +//! distances and areas are in metres; outputs come back as new layers in longitude/latitude. +//! Native only: the browser build has no file system for the tools to use. +#![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)] + +use std::collections::HashMap; +use std::path::{Path, PathBuf}; +use std::sync::{Mutex, OnceLock}; + +use geolibre_cli::ToolRegistry; +use geolibre_cli::wbcore::{AllowAllCapabilities, ProgressSink, ToolArgs, ToolContext}; +use rustgis_analysis::{Inputs, Output, OutputLayer, ParamKind, ParamSpec, ToolResult, ToolSpec}; +use rustgis_data::raster::{Crs, Transformer}; +use rustgis_data::{Coord, Dataset, Extent}; +use serde_json::{Value, json}; + +/// Tool ids get this prefix, so they never clash with the built-in tools. +pub const PREFIX: &str = "geolibre:"; + +/// Adds the suite to the geoprocessing tools. The registry and manifests load the first time +/// the tools are listed. +pub fn register() { + rustgis_analysis::register_external(specs, run); +} + +fn registry() -> &'static ToolRegistry { + static REGISTRY: OnceLock = OnceLock::new(); + REGISTRY.get_or_init(geolibre_cli::build_registry) +} + +/// What a parameter is for. +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +enum Role { + Input, + Output, + Option, +} + +/// The kind of data an input or output holds (the manifest's `data_kind`). +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +enum Data { + Raster, + Vector, + Table, + Lidar, + Text, + Json, + /// Unspecified: a file of any kind. + File, + Bool, + Number, + Other, +} + +impl Data { + fn of(s: &str) -> Data { + match s { + "raster" => Data::Raster, + "vector" => Data::Vector, + "table" => Data::Table, + "lidar" => Data::Lidar, + "text" => Data::Text, + "json" => Data::Json, + "file" => Data::File, + "bool" => Data::Bool, + "number" => Data::Number, + _ => Data::Other, + } + } +} + +#[derive(Clone, Debug)] +struct MetaParam { + name: String, + role: Role, + data: Data, +} + +/// What a run needs to know about a tool beyond its [`ToolSpec`]. +#[derive(Clone, Debug)] +struct Meta { + category: String, + params: Vec, +} + +static META: OnceLock> = OnceLock::new(); + +fn leak(s: impl Into) -> &'static str { + Box::leak(s.into().into_boxed_str()) +} + +/// `z_factor` → `Z factor`. +fn label_of(name: &str) -> String { + let words = name.replace('_', " "); + let mut c = words.chars(); + c.next().map(|f| f.to_uppercase().chain(c).collect()).unwrap_or_default() +} + +/// Builds every tool's spec from the suite's manifests (once). +fn specs() -> Vec { + let mut meta = HashMap::new(); + let mut out: Vec = geolibre_cli::manifests_json(registry()) + .iter() + .filter_map(|m| { + let (spec, info) = spec_of(m)?; + meta.insert(spec.id.trim_start_matches(PREFIX).to_string(), info); + Some(spec) + }) + .collect(); + let _ = META.set(meta); + out.sort_by(|a, b| a.toolbox.cmp(b.toolbox).then(a.name.cmp(b.name))); + out +} + +fn spec_of(m: &Value) -> Option<(ToolSpec, Meta)> { + let id = m.get("id")?.as_str()?; + let name = m.get("display_name").and_then(Value::as_str).filter(|n| !n.is_empty()).unwrap_or(id); + let category = m.get("category").and_then(Value::as_str).unwrap_or("Other").to_string(); + let summary = m.get("summary").and_then(Value::as_str).unwrap_or(""); + let defaults = m.get("defaults"); + let mut params = Vec::new(); + let mut meta = Vec::new(); + for p in m.get("params").and_then(Value::as_array).into_iter().flatten() { + let Some(pname) = p.get("name").and_then(Value::as_str) else { continue }; + let schema = p.get("schema"); + let data = Data::of(p.get("data_kind").and_then(Value::as_str).unwrap_or("")); + let role = match p.get("io_role").and_then(Value::as_str) { + Some("input") => Role::Input, + Some("output") => Role::Output, + _ => Role::Option, + }; + let many = schema.and_then(|s| s.get("cardinality")).and_then(Value::as_str).is_some_and(|c| c != "single"); + meta.push(MetaParam { name: pname.to_string(), role, data }); + // Outputs are written to a scratch folder and come back as layers: no form field. + if role == Role::Output { + continue; + } + let kind = match role { + Role::Input if many => ParamKind::Text, + Role::Input => match data { + Data::Raster => ParamKind::RasterLayer, + Data::Vector => ParamKind::VectorLayer, + Data::Table => ParamKind::Layer, + _ => ParamKind::Path, + }, + _ => match schema.and_then(|s| s.get("kind")).and_then(Value::as_str) { + Some("enum") => { + let options: Vec<&'static str> = schema + .and_then(|s| s.get("options")) + .and_then(Value::as_array) + .into_iter() + .flatten() + .filter_map(|o| o.get("value").and_then(Value::as_str).map(leak)) + .collect(); + if options.is_empty() { ParamKind::Text } else { ParamKind::Choice(Box::leak(options.into_boxed_slice())) } + } + _ if data == Data::Bool => ParamKind::Bool, + _ if data == Data::Number => ParamKind::Number, + _ => ParamKind::Text, + }, + }; + // Example file names in the defaults ("dem.tif") are not defaults for a layer. + let default = match role { + Role::Input => String::new(), + _ => defaults.and_then(|d| d.get(pname)).filter(|v| !v.is_null()).map(Value::to_string).unwrap_or_default(), + }; + let mut help = p.get("description").and_then(Value::as_str).unwrap_or("").to_string(); + if many { + help.push_str(" (layer names or file paths, separated by ;)"); + } + params.push(ParamSpec { + name: leak(pname), + label: leak(label_of(pname)), + kind, + required: p.get("required").and_then(Value::as_bool).unwrap_or(false), + default: leak(default), + help: leak(help), + }); + } + let spec = ToolSpec { + id: leak(format!("{PREFIX}{id}")), + name: leak(name), + toolbox: leak(format!("GeoLibre › {category}")), + summary: leak(summary), + params: Box::leak(params.into_boxed_slice()), + run: rustgis_analysis::external_placeholder, + }; + Some((spec, Meta { category, params: meta })) +} + +/// A scratch folder for one run, removed afterwards. +struct Scratch(PathBuf); + +impl Scratch { + fn new() -> Result { + static N: std::sync::atomic::AtomicU64 = std::sync::atomic::AtomicU64::new(0); + let n = N.fetch_add(1, std::sync::atomic::Ordering::Relaxed); + let dir = std::env::temp_dir().join(format!("rustgis-gp-{}-{n}", std::process::id())); + std::fs::create_dir_all(&dir).map_err(|e| format!("can't create a scratch folder: {e}"))?; + Ok(Scratch(dir)) + } +} + +impl Drop for Scratch { + fn drop(&mut self) { + let _ = std::fs::remove_dir_all(&self.0); + } +} + +/// Collects a tool's messages (bounded: some tools report every row). +#[derive(Default)] +struct Messages(Mutex>); + +impl ProgressSink for Messages { + fn info(&self, msg: &str) { + if let Ok(mut v) = self.0.lock() + && v.len() < 40 + && !msg.trim().is_empty() + { + v.push(msg.trim().to_string()); + } + } +} + +/// A file-name-safe version of a layer name. +fn safe(name: &str) -> String { + let s: String = name.chars().map(|c| if c.is_ascii_alphanumeric() || c == '-' { c } else { '_' }).take(60).collect(); + if s.is_empty() { "layer".into() } else { s } +} + +/// The coordinate system vector inputs are written in: the first raster input's, else the UTM +/// zone around the vector data (metres), else longitude/latitude for data spanning the world. +fn working_crs(rasters: &[Crs], vectors: &[Extent]) -> Crs { + if let Some(c) = rasters.first() { + return *c; + } + let e = vectors.iter().fold(Extent::EMPTY, |a, b| a.union(b)); + if e.is_empty() || e.width() > 40.0 { + return Crs::LonLat; + } + let c = e.center(); + let zone = (((c.x + 180.0) / 6.0).floor() as i64 + 1).clamp(1, 60) as u32; + Crs::from_epsg(if c.y >= 0.0 { 32600 + zone } else { 32700 + zone }).unwrap_or(Crs::LonLat) +} + +/// A vector layer (its selection, if any) as GeoJSON in `crs`. +fn write_vector(ds: &Dataset, rows: &[usize], crs: Crs, tf: &Transformer, path: &Path) -> Result<(), String> { + let mut out = ds.clone(); + if !rows.is_empty() { + out.features = rows.iter().filter_map(|&r| ds.features.get(r).cloned()).collect(); + } + if crs != Crs::LonLat { + let f = |c: Coord| tf.from_lonlat(c).unwrap_or(Coord::new(f64::NAN, f64::NAN)); + for ft in &mut out.features { + ft.geometry = ft.geometry.as_ref().map(|g| g.map_coords(&f)); + } + } + let mut json = rustgis_data::io::to_geojson(&out); + if crs != Crs::LonLat + && let Some(o) = json.as_object_mut() + { + // The legacy GeoJSON 2008 `crs` member, which the suite's reader honours. + o.insert("crs".into(), json!({"type": "name", "properties": {"name": format!("urn:ogc:def:crs:EPSG::{}", crs.epsg())}})); + } + let text = serde_json::to_string(&json).map_err(|e| e.to_string())?; + std::fs::write(path, text).map_err(|e| format!("can't write {}: {e}", path.display())) +} + +/// Writes one input (a layer by name, or a file path) to the scratch folder; returns its path. +fn stage(inputs: &dyn Inputs, value: &str, data: Data, crs: Crs, tf: &Transformer, dir: &Path) -> Result { + if let Some(r) = inputs.raster(value) { + if let Some(p) = r.path.filter(|p| Path::new(p).is_file()) { + return Ok(p.to_string()); + } + if let Some((file_name, bytes)) = r.embedded { + // The tools tell formats apart by extension. + let ext = Path::new(file_name).extension().and_then(|e| e.to_str()).map(safe).unwrap_or_else(|| "tif".into()); + let path = dir.join(format!("{}.{ext}", safe(value))); + std::fs::write(&path, bytes).map_err(|e| format!("can't write {}: {e}", path.display()))?; + return Ok(path.display().to_string()); + } + let bytes = rustgis_data::raster::geotiff::write(r.raster, 0).map_err(|e| format!("{value}: {e}"))?; + let path = dir.join(format!("{}.tif", safe(value))); + std::fs::write(&path, bytes).map_err(|e| format!("can't write {}: {e}", path.display()))?; + return Ok(path.display().to_string()); + } + if let Some(ds) = inputs.dataset(value) { + if data == Data::Table || (ds.features.iter().all(|f| f.geometry.is_none()) && data != Data::Vector) { + let path = dir.join(format!("{}.csv", safe(value))); + let text = rustgis_data::io::to_csv(ds).map_err(|e| format!("{value}: {e}"))?; + std::fs::write(&path, text).map_err(|e| format!("can't write {}: {e}", path.display()))?; + return Ok(path.display().to_string()); + } + let path = dir.join(format!("{}.geojson", safe(value))); + write_vector(ds, inputs.selection(value), crs, tf, &path)?; + return Ok(path.display().to_string()); + } + if Path::new(value).exists() { + return Ok(value.to_string()); + } + Err(format!("there is no layer or file named '{value}'")) +} + +/// The extension an output is written with. +fn output_ext(p: &MetaParam, meta: &Meta) -> &'static str { + let has_raster_input = meta.params.iter().any(|q| q.role == Role::Input && q.data == Data::Raster); + match p.data { + Data::Raster => "tif", + Data::Vector => "geojson", + Data::Table => "csv", + Data::Lidar => "las", + Data::Text => "txt", + Data::Json => "json", + _ if p.name.contains("html") => "html", + _ if p.name.contains("csv") => "csv", + _ if p.name.contains("json") => "json", + _ if matches!(meta.category.as_str(), "Raster" | "Terrain" | "Hydrology") || has_raster_input => "tif", + _ => "geojson", + } +} + +/// A form value as the JSON the tool expects (the form sends text). +fn option_value(v: &Value, data: Data) -> Value { + match (v.as_str().map(str::trim), data) { + (Some("true"), Data::Bool) => Value::Bool(true), + (Some("false"), Data::Bool) => Value::Bool(false), + (Some(s), Data::Number) => s.parse::().ok().filter(|n| n.is_finite()).map(|n| json!(n)).unwrap_or_else(|| v.clone()), + _ => v.clone(), + } +} + +/// Coordinates that can't be longitude/latitude (a tool kept the working coordinate system). +fn looks_projected(ds: &Dataset) -> bool { + let e = ds.extent(); + !e.is_empty() && (e.min_x < -180.5 || e.max_x > 180.5 || e.min_y < -90.5 || e.max_y > 90.5) +} + +/// Reads one output file back as a layer, table or message. +fn load(path: &Path, layer_name: &str, crs: Crs, tf: &Transformer, messages: &mut Vec) -> Option { + let ext = path.extension().and_then(|e| e.to_str()).unwrap_or("").to_ascii_lowercase(); + let file_name = path.file_name().and_then(|f| f.to_str()).unwrap_or("output").to_string(); + match ext.as_str() { + "tif" | "tiff" | "asc" => { + let bytes = std::fs::read(path).ok()?; + match rustgis_data::raster::read_bytes(&file_name, &bytes) { + Ok(_) => Some(OutputLayer::Raster { name: layer_name.to_string(), file_name, bytes }), + Err(e) => { + messages.push(format!("{layer_name}: {e}")); + None + } + } + } + "geojson" | "json" | "shp" | "csv" => match rustgis_data::io::read_path(path) { + Ok((mut ds, _)) => { + ds.name = layer_name.to_string(); + if crs != Crs::LonLat && looks_projected(&ds) { + let f = |c: Coord| tf.to_lonlat(c).unwrap_or(Coord::new(f64::NAN, f64::NAN)); + for ft in &mut ds.features { + ft.geometry = ft.geometry.as_ref().map(|g| g.map_coords(&f)); + } + } + Some(if ds.features.iter().all(|f| f.geometry.is_none()) { OutputLayer::Table(ds) } else { OutputLayer::Vector(ds) }) + } + // A JSON report rather than GeoJSON: show it. + Err(_) if ext == "json" => { + text_message(path, layer_name, messages); + None + } + Err(e) => { + messages.push(format!("{layer_name}: {e}")); + None + } + }, + "txt" | "html" | "htm" => { + text_message(path, layer_name, messages); + None + } + _ => { + messages.push(format!("{layer_name}: wrote a .{ext} file, which RustGIS can't open as a layer")); + None + } + } +} + +/// The start of a text or HTML report as a message. +fn text_message(path: &Path, layer_name: &str, messages: &mut Vec) { + let Ok(text) = std::fs::read_to_string(path) else { return }; + let mut plain = String::new(); + let mut in_tag = false; + for c in text.chars() { + match c { + '<' => in_tag = true, + '>' => in_tag = false, + _ if !in_tag => plain.push(c), + _ => {} + } + } + let lines: Vec<&str> = plain.lines().map(str::trim).filter(|l| !l.is_empty()).take(30).collect(); + if !lines.is_empty() { + messages.push(format!("{layer_name}:\n{}", lines.join("\n"))); + } +} + +fn run(spec: &ToolSpec, inputs: &dyn Inputs, params: &Value) -> Result { + let id = spec.id.strip_prefix(PREFIX).ok_or("not a GeoLibre tool")?; + let meta = META.get().and_then(|m| m.get(id)).ok_or_else(|| format!("{}: unknown tool", spec.name))?; + let scratch = Scratch::new()?; + let value_of = |name: &str| params.get(name).filter(|v| !v.is_null() && v.as_str() != Some("")); + let names = |v: &Value| -> Vec { + v.as_str().map(|s| s.split(';').map(str::trim).filter(|n| !n.is_empty()).map(str::to_string).collect()).unwrap_or_default() + }; + + // Rasters set the coordinate system; otherwise the vector data's UTM zone. + let mut raster_crs = Vec::new(); + let mut vector_extents = Vec::new(); + for p in meta.params.iter().filter(|p| p.role == Role::Input) { + for n in value_of(&p.name).map(names).unwrap_or_default() { + if let Some(r) = inputs.raster(&n) { + raster_crs.push(r.raster.crs); + } else if let Some(ds) = inputs.dataset(&n) { + vector_extents.push(ds.extent()); + } + } + } + let crs = working_crs(&raster_crs, &vector_extents); + let tf = crs.transformer()?; + + let mut args = ToolArgs::new(); + let mut outputs = Vec::new(); + let n_outputs = meta.params.iter().filter(|p| p.role == Role::Output).count(); + for p in &meta.params { + match p.role { + Role::Input => { + let Some(v) = value_of(&p.name) else { continue }; + let paths = names(v).iter().map(|n| stage(inputs, n, p.data, crs, &tf, &scratch.0)).collect::, _>>()?; + if !paths.is_empty() { + args.insert(p.name.clone(), Value::String(paths.join(";"))); + } + } + Role::Output => { + let path = scratch.0.join(format!("{}.{}", safe(&p.name), output_ext(p, meta))); + args.insert(p.name.clone(), Value::String(path.display().to_string())); + let name = + if n_outputs > 1 { format!("{} {}", spec.name, label_of(&p.name).to_lowercase()) } else { spec.name.to_string() }; + outputs.push((path, name)); + } + Role::Option => { + if let Some(v) = value_of(&p.name) { + args.insert(p.name.clone(), option_value(v, p.data)); + } + } + } + } + + let progress = Messages::default(); + let ctx = ToolContext { progress: &progress, capabilities: &AllowAllCapabilities }; + let result = registry().run(id, &args, &ctx).map_err(|e| format!("{}: {e}", spec.name))?; + let mut messages = progress.0.into_inner().unwrap_or_default(); + + let mut layers = Vec::new(); + for (path, name) in &outputs { + // A tool may pick its own extension (a shapefile for a vector output). + let found = if path.is_file() { + Some(path.clone()) + } else { + let stem = path.file_stem().map(|s| s.to_os_string()); + std::fs::read_dir(&scratch.0).ok().into_iter().flatten().filter_map(|e| e.ok().map(|e| e.path())).find(|f| { + f.file_stem().map(|s| s.to_os_string()) == stem && f.extension().is_some_and(|e| e != "dbf" && e != "shx" && e != "prj") + }) + }; + if let Some(f) = found + && let Some(l) = load(&f, name, crs, &tf, &mut messages) + { + layers.push(l); + } + } + // Statistics and other results the tool returns rather than writes. + let scratch_dir = scratch.0.display().to_string(); + for (k, v) in &result.outputs { + let text = match v { + Value::String(s) if s.starts_with(&scratch_dir) => continue, + Value::String(s) => s.clone(), + other => other.to_string(), + }; + let text: String = text.chars().take(2000).collect(); + messages.push(format!("{}: {text}", label_of(k))); + } + if layers.is_empty() && messages.is_empty() { + messages.push(format!("{} finished without output", spec.name)); + } + Ok(ToolResult { output: Output::Layers(layers), messages }) +} + +#[cfg(test)] +mod tests; diff --git a/crates/geolibre/src/tests.rs b/crates/geolibre/src/tests.rs new file mode 100644 index 0000000000..8da6653499 --- /dev/null +++ b/crates/geolibre/src/tests.rs @@ -0,0 +1,126 @@ +use super::*; +use rustgis_analysis::RasterInput; +use rustgis_data::raster::{ColorHint, GeoTransform, Raster}; +use rustgis_data::{Feature, Field, FieldType, Geometry}; + +/// A 40 × 40 DEM rising to the east (UTM 17N, 30 m pixels) and a point inside it. +struct Fixture { + dem: Raster, + points: Dataset, + /// The DEM as an embedded GeoTIFF, as a browser upload or a tool's output is kept. + tiff: Vec, +} + +impl Fixture { + fn new() -> Fixture { + let gt = GeoTransform { origin_x: 500_000.0, origin_y: 4_650_000.0, pixel_width: 30.0, pixel_height: -30.0 }; + let band: Vec = (0..40 * 40).map(|i| (i % 40) as f32 * 3.0 + (i / 40) as f32).collect(); + let dem = Raster::new("dem", 40, 40, vec![band], gt, Crs::from_epsg(32617).unwrap(), None, ColorHint::Gray, "Float32").unwrap(); + // The DEM's centre, in longitude/latitude. + let centre = Crs::from_epsg(32617).unwrap().transformer().unwrap().to_lonlat(Coord::new(500_600.0, 4_649_400.0)).unwrap(); + let mut points = Dataset::new("pts", rustgis_data::GeometryType::Point, vec![Field::new("id", FieldType::Integer)]); + points.features.push(Feature { id: 1, geometry: Some(Geometry::Point(centre)), attrs: vec![rustgis_data::Value::Int(1)] }); + let tiff = rustgis_data::raster::geotiff::write(&dem, 0).unwrap(); + Fixture { dem, points, tiff } + } +} + +impl Inputs for Fixture { + fn dataset(&self, layer: &str) -> Option<&Dataset> { + (layer == "pts").then_some(&self.points) + } + fn selection(&self, _: &str) -> &[usize] { + &[] + } + fn raster(&self, layer: &str) -> Option> { + match layer { + "dem" => Some(RasterInput { raster: &self.dem, path: None, embedded: None }), + "embedded" => Some(RasterInput { raster: &self.dem, path: None, embedded: Some(("dem.tif", &self.tiff)) }), + _ => None, + } + } +} + +fn setup() -> Fixture { + register(); + Fixture::new() +} + +#[test] +fn manifests_become_tool_forms() { + setup(); + let tools = rustgis_analysis::external_tools(); + assert!(tools.len() > 1000, "{}", tools.len()); + let slope = rustgis_analysis::tool("geolibre:slope").unwrap(); + assert!(rustgis_analysis::is_external(slope)); + assert_eq!(slope.toolbox, "GeoLibre › Raster"); + assert_eq!(slope.params.first().map(|p| p.kind), Some(ParamKind::RasterLayer)); + assert!(slope.params.iter().all(|p| p.name != "output"), "outputs are not form fields"); + let units = slope.params.iter().find(|p| p.name == "units").unwrap(); + assert!(matches!(units.kind, ParamKind::Choice(c) if c.contains(&"percent"))); + assert_eq!(units.default, "\"degrees\""); + // The built-in Buffer still wins by name. + assert_eq!(rustgis_analysis::tool("Buffer").map(|t| t.id), Some("buffer")); +} + +#[test] +fn slope_runs_on_a_raster_layer() { + let f = setup(); + let r = rustgis_analysis::run("geolibre:slope", &f, &json!({"input": "dem", "units": "degrees"})).unwrap(); + // An embedded raster is staged as a file with its extension. + assert!(rustgis_analysis::run("geolibre:slope", &f, &json!({"input": "embedded"})).is_ok()); + let Output::Layers(layers) = r.output else { panic!("layers") }; + let Some(OutputLayer::Raster { name, bytes, file_name }) = layers.first() else { panic!("a raster: {layers:?}") }; + assert_eq!(name, "Slope"); + let out = rustgis_data::raster::read_bytes(file_name, bytes).unwrap(); + assert_eq!((out.width, out.height), (40, 40)); + assert_eq!(out.crs, Crs::from_epsg(32617).unwrap(), "keeps the DEM's coordinate system"); + // A 3 m rise per 30 m pixel is about 5.7°. + let mid = out.bands[0].data[20 * 40 + 20]; + assert!((mid - 5.8).abs() < 0.5, "{mid}"); +} + +#[test] +fn vector_tools_work_in_metres_and_return_lonlat() { + let f = setup(); + let r = rustgis_analysis::run("geolibre:buffer_vector", &f, &json!({"input": "pts", "distance": "1000"})).unwrap(); + let Output::Layers(layers) = r.output else { panic!("layers") }; + let Some(OutputLayer::Vector(ds)) = layers.first() else { panic!("a vector layer: {layers:?}") }; + let Some(Some(Geometry::Polygon(polys))) = ds.features.first().map(|f| f.geometry.clone()) else { panic!("a polygon") }; + let area = rustgis_geom::geodesic_ring_area_m2(&polys[0][0]).abs(); + let circle = std::f64::consts::PI * 1000.0 * 1000.0; + assert!((area / circle - 1.0).abs() < 0.05, "a 1 km buffer, not 1000 degrees: {area}"); +} + +#[test] +fn rasters_and_points_meet_in_one_coordinate_system() { + let f = setup(); + let r = rustgis_analysis::run("geolibre:extract_raster_values_at_points", &f, &json!({"rasters": "dem", "points": "pts"})).unwrap(); + let Output::Layers(layers) = r.output else { panic!("layers") }; + let Some(OutputLayer::Vector(ds)) = layers.first() else { panic!("points: {layers:?}") }; + let p: Option = ds.features.first().and_then(|f| f.geometry.as_ref()).map(|g| g.extent().center()); + let centre = f.points.extent().center(); + assert!(p.is_some_and(|c| (c.x - centre.x).abs() < 1e-6 && (c.y - centre.y).abs() < 1e-6), "back in lon/lat: {p:?}"); + // The sampled value is the DEM's at its centre (column 20, row 20). + let value = ds.fields.iter().position(|fl| fl.name != "id" && fl.name != "FID").and_then(|i| ds.features[0].attrs.get(i).cloned()); + let v = value.and_then(|v| v.as_f64()).unwrap_or(f64::NAN); + assert!((v - (20.0 * 3.0 + 20.0)).abs() < 3.5, "{v}"); +} + +#[test] +fn bad_inputs_are_errors_not_crashes() { + let f = setup(); + assert!(rustgis_analysis::run("geolibre:slope", &f, &json!({})).unwrap_err().contains("required")); + assert!(rustgis_analysis::run("geolibre:slope", &f, &json!({"input": "nope"})).unwrap_err().contains("no layer or file")); + assert!(rustgis_analysis::run("geolibre:slope", &f, &json!({"input": "pts"})).is_err(), "a vector where a raster belongs"); + // Every tool with junk in every field fails cleanly: inputs that don't exist stop it before + // it runs. + for t in rustgis_analysis::external_tools() { + if !t.params.iter().any(|p| matches!(p.kind, ParamKind::RasterLayer | ParamKind::VectorLayer | ParamKind::Layer | ParamKind::Path)) + { + continue; + } + let junk: serde_json::Map = t.params.iter().map(|p| (p.name.to_string(), json!("nope;(("))).collect(); + assert!(rustgis_analysis::run(t.id, &f, &Value::Object(junk)).is_err(), "{}", t.id); + } +} diff --git a/crates/ui-egui/src/chrome.rs b/crates/ui-egui/src/chrome.rs index 122a69dba3..12a58892ac 100644 --- a/crates/ui-egui/src/chrome.rs +++ b/crates/ui-egui/src/chrome.rs @@ -337,8 +337,12 @@ pub fn command_search(app: &mut RustGisApp, ctx: &egui::Context) { ui.separator(); let ql = q.to_lowercase(); let mut hits: Vec<(String, String, String)> = Vec::new(); - // Geoprocessing tools first when the query names one. - for tool in rustgis_engine::analysis::TOOLS { + // Geoprocessing tools first when the query names one (a few dozen at most: the GeoLibre + // suite has a thousand). + for tool in rustgis_engine::analysis::tools() { + if hits.len() >= 40 { + break; + } if !ql.is_empty() && (tool.name.to_lowercase().contains(&ql) || tool.id.to_lowercase().contains(&ql) diff --git a/crates/ui-egui/src/i18n/az.tsv b/crates/ui-egui/src/i18n/az.tsv index 8cd17108b5..13770dd490 100644 --- a/crates/ui-egui/src/i18n/az.tsv +++ b/crates/ui-egui/src/i18n/az.tsv @@ -251,6 +251,7 @@ Field Sahə Field name Sahə adı Fields Sahələr Fields: Sahələr: +file path fayl yolu Filter rows… Sətirləri süz… Find a place by coordinates. Koordinatlara görə yer tapın. Find and run geoprocessing tools. Geoemal alətlərini tapın və işə salın. @@ -267,6 +268,7 @@ Gamma Qamma Generalization Ümumiləşdirmə Geo-\nprocessing Geo-\nemal GeoJSON or CSV GeoJSON və ya CSV +GeoLibre GeoLibre Geometry Həndəsə Geoprocessing Geoemal Geoprocessing history. Geoemal tarixçəsi. @@ -461,6 +463,7 @@ Redo Təkrarla Redo the change you undid. Geri aldığınız dəyişikliyi təkrarlayın. Redo {action} {action} təkrarla Red–Blue Qırmızı–Mavi +Refine the search to see {n} more Daha {n} ədəd görmək üçün axtarışı dəqiqləşdirin Regional, equal-area: the contiguous United States. Regional, bərabərsahəli: bitişik Amerika Birləşmiş Ştatları. Regional, equal-area: the European standard for statistics. Regional, bərabərsahəli: statistika üçün Avropa standartı. Remove Sil diff --git a/crates/ui-egui/src/i18n/de.tsv b/crates/ui-egui/src/i18n/de.tsv index a008acaa36..6b4008cefa 100644 --- a/crates/ui-egui/src/i18n/de.tsv +++ b/crates/ui-egui/src/i18n/de.tsv @@ -251,6 +251,7 @@ Field Feld Field name Feldname Fields Felder Fields: Felder: +file path Dateipfad Filter rows… Zeilen filtern… Find a place by coordinates. Einen Ort über Koordinaten finden. Find and run geoprocessing tools. Geoverarbeitungswerkzeuge finden und ausführen. @@ -267,6 +268,7 @@ Gamma Gamma Generalization Generalisierung Geo-\nprocessing Geover-\narbeitung GeoJSON or CSV GeoJSON oder CSV +GeoLibre GeoLibre Geometry Geometrie Geoprocessing Geoverarbeitung Geoprocessing history. Geoverarbeitungsverlauf. @@ -461,6 +463,7 @@ Redo Wiederholen Redo the change you undid. Die rückgängig gemachte Änderung wiederholen. Redo {action} {action} wiederholen Red–Blue Rot–Blau +Refine the search to see {n} more Suche verfeinern, um {n} weitere zu sehen Regional, equal-area: the contiguous United States. Regional, flächentreu: die zusammenhängenden Vereinigten Staaten. Regional, equal-area: the European standard for statistics. Regional, flächentreu: der europäische Standard für Statistiken. Remove Entfernen diff --git a/crates/ui-egui/src/i18n/es.tsv b/crates/ui-egui/src/i18n/es.tsv index 6f86172c1c..26d50dd7ba 100644 --- a/crates/ui-egui/src/i18n/es.tsv +++ b/crates/ui-egui/src/i18n/es.tsv @@ -251,6 +251,7 @@ Field Campo Field name Nombre del campo Fields Campos Fields: Campos: +file path ruta de archivo Filter rows… Filtrar filas… Find a place by coordinates. Buscar un lugar por coordenadas. Find and run geoprocessing tools. Buscar y ejecutar herramientas de geoprocesamiento. @@ -267,6 +268,7 @@ Gamma Gamma Generalization Generalización Geo-\nprocessing Geoproce-\nsamiento GeoJSON or CSV GeoJSON o CSV +GeoLibre GeoLibre Geometry Geometría Geoprocessing Geoprocesamiento Geoprocessing history. Historial de geoprocesamiento. @@ -461,6 +463,7 @@ Redo Rehacer Redo the change you undid. Rehacer el cambio que deshizo. Redo {action} Rehacer {action} Red–Blue Rojo–Azul +Refine the search to see {n} more Refina la búsqueda para ver {n} más Regional, equal-area: the contiguous United States. Regional, de áreas iguales: los Estados Unidos contiguos. Regional, equal-area: the European standard for statistics. Regional, de áreas iguales: el estándar europeo para estadísticas. Remove Quitar diff --git a/crates/ui-egui/src/i18n/fr.tsv b/crates/ui-egui/src/i18n/fr.tsv index 1bf106091c..61db885cca 100644 --- a/crates/ui-egui/src/i18n/fr.tsv +++ b/crates/ui-egui/src/i18n/fr.tsv @@ -251,6 +251,7 @@ Field Champ Field name Nom du champ Fields Champs Fields: Champs : +file path chemin du fichier Filter rows… Filtrer les lignes… Find a place by coordinates. Trouver un lieu par ses coordonnées. Find and run geoprocessing tools. Trouver et exécuter des outils de géotraitement. @@ -267,6 +268,7 @@ Gamma Gamma Generalization Généralisation Geo-\nprocessing Géo-\ntraitement GeoJSON or CSV GeoJSON ou CSV +GeoLibre GeoLibre Geometry Géométrie Geoprocessing Géotraitement Geoprocessing history. Historique de géotraitement. @@ -461,6 +463,7 @@ Redo Rétablir Redo the change you undid. Rétablir la modification annulée. Redo {action} Rétablir {action} Red–Blue Rouge–Bleu +Refine the search to see {n} more Affinez la recherche pour en voir {n} de plus Regional, equal-area: the contiguous United States. Régionale, équivalente : les États-Unis contigus. Regional, equal-area: the European standard for statistics. Régionale, équivalente : la norme européenne pour les statistiques. Remove Supprimer diff --git a/crates/ui-egui/src/i18n/id.tsv b/crates/ui-egui/src/i18n/id.tsv index b6dd40e24d..a48a6549ae 100644 --- a/crates/ui-egui/src/i18n/id.tsv +++ b/crates/ui-egui/src/i18n/id.tsv @@ -251,6 +251,7 @@ Field Kolom Field name Nama kolom Fields Kolom Fields: Kolom: +file path jalur berkas Filter rows… Saring baris… Find a place by coordinates. Temukan tempat berdasarkan koordinat. Find and run geoprocessing tools. Temukan dan jalankan alat geoprosesing. @@ -267,6 +268,7 @@ Gamma Gamma Generalization Generalisasi Geo-\nprocessing Geo-\nprosesing GeoJSON or CSV GeoJSON atau CSV +GeoLibre GeoLibre Geometry Geometri Geoprocessing Geoprosesing Geoprocessing history. Riwayat geoprosesing. @@ -461,6 +463,7 @@ Redo Ulangi Redo the change you undid. Ulangi perubahan yang dibatalkan. Redo {action} Ulangi {action} Red–Blue Merah–Biru +Refine the search to see {n} more Persempit pencarian untuk melihat {n} lagi Regional, equal-area: the contiguous United States. Regional, luas sama: Amerika Serikat daratan. Regional, equal-area: the European standard for statistics. Regional, luas sama: standar Eropa untuk statistik. Remove Hapus diff --git a/crates/ui-egui/src/i18n/it.tsv b/crates/ui-egui/src/i18n/it.tsv index ebc832404b..f7d83dd663 100644 --- a/crates/ui-egui/src/i18n/it.tsv +++ b/crates/ui-egui/src/i18n/it.tsv @@ -251,6 +251,7 @@ Field Campo Field name Nome campo Fields Campi Fields: Campi: +file path percorso del file Filter rows… Filtra righe… Find a place by coordinates. Trova un luogo tramite coordinate. Find and run geoprocessing tools. Trova ed esegui strumenti di geoprocessing. @@ -267,6 +268,7 @@ Gamma Gamma Generalization Generalizzazione Geo-\nprocessing Geo-\nprocessing GeoJSON or CSV GeoJSON o CSV +GeoLibre GeoLibre Geometry Geometria Geoprocessing Geoprocessing Geoprocessing history. Cronologia del geoprocessing. @@ -461,6 +463,7 @@ Redo Ripeti Redo the change you undid. Ripeti la modifica annullata. Redo {action} Ripeti {action} Red–Blue Rosso–Blu +Refine the search to see {n} more Affina la ricerca per vederne altri {n} Regional, equal-area: the contiguous United States. Regionale, equivalente: gli Stati Uniti contigui. Regional, equal-area: the European standard for statistics. Regionale, equivalente: lo standard europeo per le statistiche. Remove Rimuovi diff --git a/crates/ui-egui/src/i18n/ja.tsv b/crates/ui-egui/src/i18n/ja.tsv index 5b79c89c94..4dc95d17e1 100644 --- a/crates/ui-egui/src/i18n/ja.tsv +++ b/crates/ui-egui/src/i18n/ja.tsv @@ -251,6 +251,7 @@ Field フィールド Field name フィールド名 Fields フィールド Fields: フィールド: +file path ファイルパス Filter rows… 行をフィルター… Find a place by coordinates. 座標で場所を検索します。 Find and run geoprocessing tools. ジオプロセシング ツールを検索して実行します。 @@ -267,6 +268,7 @@ Gamma ガンマ Generalization ジェネラライズ Geo-\nprocessing ジオプロ\nセシング GeoJSON or CSV GeoJSON または CSV +GeoLibre GeoLibre Geometry ジオメトリ Geoprocessing ジオプロセシング Geoprocessing history. ジオプロセシングの履歴。 @@ -461,6 +463,7 @@ Redo やり直し Redo the change you undid. 元に戻した変更をやり直します。 Redo {action} {action} をやり直す Red–Blue 赤–青 +Refine the search to see {n} more 検索を絞り込むと、さらに {n} 件表示されます Regional, equal-area: the contiguous United States. 地域、正積: アメリカ本土 48 州。 Regional, equal-area: the European standard for statistics. 地域、正積: 統計用のヨーロッパ標準。 Remove 削除 diff --git a/crates/ui-egui/src/i18n/ko.tsv b/crates/ui-egui/src/i18n/ko.tsv index e23f936e5d..4dbf62ffda 100644 --- a/crates/ui-egui/src/i18n/ko.tsv +++ b/crates/ui-egui/src/i18n/ko.tsv @@ -251,6 +251,7 @@ Field 필드 Field name 필드 이름 Fields 필드 Fields: 필드: +file path 파일 경로 Filter rows… 행 필터… Find a place by coordinates. 좌표로 장소를 찾습니다. Find and run geoprocessing tools. 지오프로세싱 도구를 찾아 실행합니다. @@ -267,6 +268,7 @@ Gamma 감마 Generalization 일반화 Geo-\nprocessing 지오프로\n세싱 GeoJSON or CSV GeoJSON 또는 CSV +GeoLibre GeoLibre Geometry 지오메트리 Geoprocessing 지오프로세싱 Geoprocessing history. 지오프로세싱 기록. @@ -461,6 +463,7 @@ Redo 다시 실행 Redo the change you undid. 실행 취소한 변경을 다시 실행합니다. Redo {action} {action} 다시 실행 Red–Blue 빨강–파랑 +Refine the search to see {n} more 검색을 좁히면 {n}개를 더 볼 수 있습니다 Regional, equal-area: the contiguous United States. 지역, 정적: 미국 본토. Regional, equal-area: the European standard for statistics. 지역, 정적: 통계용 유럽 표준. Remove 제거 diff --git a/crates/ui-egui/src/i18n/nl.tsv b/crates/ui-egui/src/i18n/nl.tsv index 42ed453fde..8817b6fbf4 100644 --- a/crates/ui-egui/src/i18n/nl.tsv +++ b/crates/ui-egui/src/i18n/nl.tsv @@ -251,6 +251,7 @@ Field Veld Field name Veldnaam Fields Velden Fields: Velden: +file path bestandspad Filter rows… Rijen filteren… Find a place by coordinates. Een plaats zoeken op coördinaten. Find and run geoprocessing tools. Geoverwerkingsgereedschappen zoeken en uitvoeren. @@ -267,6 +268,7 @@ Gamma Gamma Generalization Generalisatie Geo-\nprocessing Geo-\nverwerking GeoJSON or CSV GeoJSON of CSV +GeoLibre GeoLibre Geometry Geometrie Geoprocessing Geoverwerking Geoprocessing history. Geschiedenis van geoverwerking. @@ -461,6 +463,7 @@ Redo Opnieuw Redo the change you undid. De ongedaan gemaakte wijziging opnieuw uitvoeren. Redo {action} {action} opnieuw Red–Blue Rood–Blauw +Refine the search to see {n} more Verfijn de zoekopdracht om {n} meer te zien Regional, equal-area: the contiguous United States. Regionaal, oppervlaktegetrouw: de aaneengesloten Verenigde Staten. Regional, equal-area: the European standard for statistics. Regionaal, oppervlaktegetrouw: de Europese standaard voor statistiek. Remove Verwijderen diff --git a/crates/ui-egui/src/i18n/pt.tsv b/crates/ui-egui/src/i18n/pt.tsv index a4121484b5..302534fe05 100644 --- a/crates/ui-egui/src/i18n/pt.tsv +++ b/crates/ui-egui/src/i18n/pt.tsv @@ -251,6 +251,7 @@ Field Campo Field name Nome do campo Fields Campos Fields: Campos: +file path caminho do arquivo Filter rows… Filtrar linhas… Find a place by coordinates. Encontrar um local por coordenadas. Find and run geoprocessing tools. Encontrar e executar ferramentas de geoprocessamento. @@ -267,6 +268,7 @@ Gamma Gama Generalization Generalização Geo-\nprocessing Geoproces-\nsamento GeoJSON or CSV GeoJSON ou CSV +GeoLibre GeoLibre Geometry Geometria Geoprocessing Geoprocessamento Geoprocessing history. Histórico de geoprocessamento. @@ -461,6 +463,7 @@ Redo Refazer Redo the change you undid. Refazer a alteração desfeita. Redo {action} Refazer {action} Red–Blue Vermelho–Azul +Refine the search to see {n} more Refine a pesquisa para ver mais {n} Regional, equal-area: the contiguous United States. Regional, equivalente: os Estados Unidos contíguos. Regional, equal-area: the European standard for statistics. Regional, equivalente: o padrão europeu para estatísticas. Remove Remover diff --git a/crates/ui-egui/src/i18n/ru.tsv b/crates/ui-egui/src/i18n/ru.tsv index 2a2cd2de50..8734db0f19 100644 --- a/crates/ui-egui/src/i18n/ru.tsv +++ b/crates/ui-egui/src/i18n/ru.tsv @@ -251,6 +251,7 @@ Field Поле Field name Имя поля Fields Поля Fields: Поля: +file path путь к файлу Filter rows… Фильтр строк… Find a place by coordinates. Найти место по координатам. Find and run geoprocessing tools. Найти и запустить инструменты геообработки. @@ -267,6 +268,7 @@ Gamma Гамма Generalization Генерализация Geo-\nprocessing Гео-\nобработка GeoJSON or CSV GeoJSON или CSV +GeoLibre GeoLibre Geometry Геометрия Geoprocessing Геообработка Geoprocessing history. История геообработки. @@ -461,6 +463,7 @@ Redo Повторить Redo the change you undid. Повторить отменённое изменение. Redo {action} Повторить: {action} Red–Blue Красный–синий +Refine the search to see {n} more Уточните поиск, чтобы увидеть ещё {n} Regional, equal-area: the contiguous United States. Региональная, равновеликая: смежные штаты США. Regional, equal-area: the European standard for statistics. Региональная, равновеликая: европейский стандарт для статистики. Remove Удалить diff --git a/crates/ui-egui/src/i18n/tr.tsv b/crates/ui-egui/src/i18n/tr.tsv index eeaa3cb7a5..902d076a16 100644 --- a/crates/ui-egui/src/i18n/tr.tsv +++ b/crates/ui-egui/src/i18n/tr.tsv @@ -251,6 +251,7 @@ Field Alan Field name Alan adı Fields Alanlar Fields: Alanlar: +file path dosya yolu Filter rows… Satırları filtrele… Find a place by coordinates. Koordinatlarla bir yer bul. Find and run geoprocessing tools. Coğrafi işleme araçlarını bul ve çalıştır. @@ -267,6 +268,7 @@ Gamma Gama Generalization Genelleştirme Geo-\nprocessing Coğrafi\nİşleme GeoJSON or CSV GeoJSON veya CSV +GeoLibre GeoLibre Geometry Geometri Geoprocessing Coğrafi İşleme Geoprocessing history. Coğrafi işleme geçmişi. @@ -461,6 +463,7 @@ Redo Yinele Redo the change you undid. Geri aldığınız değişikliği yinele. Redo {action} Yinele: {action} Red–Blue Kırmızı–Mavi +Refine the search to see {n} more {n} tane daha görmek için aramayı daraltın Regional, equal-area: the contiguous United States. Bölgesel, eşalan: bitişik Amerika Birleşik Devletleri. Regional, equal-area: the European standard for statistics. Bölgesel, eşalan: istatistikler için Avrupa standardı. Remove Kaldır diff --git a/crates/ui-egui/src/i18n/vi.tsv b/crates/ui-egui/src/i18n/vi.tsv index 0ad4390fb7..dfed445ec0 100644 --- a/crates/ui-egui/src/i18n/vi.tsv +++ b/crates/ui-egui/src/i18n/vi.tsv @@ -251,6 +251,7 @@ Field Trường Field name Tên trường Fields Trường Fields: Trường: +file path đường dẫn tệp Filter rows… Lọc hàng… Find a place by coordinates. Tìm một địa điểm theo tọa độ. Find and run geoprocessing tools. Tìm và chạy công cụ xử lý không gian. @@ -267,6 +268,7 @@ Gamma Gamma Generalization Khái quát hóa Geo-\nprocessing Xử lý\nkhông gian GeoJSON or CSV GeoJSON hoặc CSV +GeoLibre GeoLibre Geometry Hình học Geoprocessing Xử lý không gian Geoprocessing history. Lịch sử xử lý không gian. @@ -461,6 +463,7 @@ Redo Làm lại Redo the change you undid. Làm lại thay đổi bạn đã hoàn tác. Redo {action} Làm lại {action} Red–Blue Đỏ–Xanh lam +Refine the search to see {n} more Thu hẹp tìm kiếm để xem thêm {n} Regional, equal-area: the contiguous United States. Khu vực, đồng diện tích: lãnh thổ liền kề của Hoa Kỳ. Regional, equal-area: the European standard for statistics. Khu vực, đồng diện tích: chuẩn châu Âu cho thống kê. Remove Gỡ bỏ diff --git a/crates/ui-egui/src/i18n/zh.tsv b/crates/ui-egui/src/i18n/zh.tsv index 5a1c613ead..04ee35352a 100644 --- a/crates/ui-egui/src/i18n/zh.tsv +++ b/crates/ui-egui/src/i18n/zh.tsv @@ -251,6 +251,7 @@ Field 字段 Field name 字段名称 Fields 字段 Fields: 字段: +file path 文件路径 Filter rows… 筛选行… Find a place by coordinates. 按坐标查找位置。 Find and run geoprocessing tools. 查找并运行地理处理工具。 @@ -267,6 +268,7 @@ Gamma 伽马 Generalization 综合 Geo-\nprocessing 地理\n处理 GeoJSON or CSV GeoJSON 或 CSV +GeoLibre GeoLibre Geometry 几何 Geoprocessing 地理处理 Geoprocessing history. 地理处理历史记录。 @@ -461,6 +463,7 @@ Redo 重做 Redo the change you undid. 重做已撤销的更改。 Redo {action} 重做 {action} Red–Blue 红–蓝 +Refine the search to see {n} more 细化搜索以查看另外 {n} 个 Regional, equal-area: the contiguous United States. 区域,等积: 美国本土。 Regional, equal-area: the European standard for statistics. 区域,等积: 欧洲统计标准。 Remove 移除 diff --git a/crates/ui-egui/src/panes.rs b/crates/ui-egui/src/panes.rs index 6702ed0b93..507579b7d8 100644 --- a/crates/ui-egui/src/panes.rs +++ b/crates/ui-egui/src/panes.rs @@ -5,7 +5,7 @@ use std::collections::HashMap; use egui::{Align2, CornerRadius, Rect, Sense, Stroke, Ui, pos2, vec2}; use rustgis_engine::Session; -use rustgis_engine::analysis::{ParamKind, TOOLS}; +use rustgis_engine::analysis::{ParamKind, tools}; use rustgis_engine::data::GeometryType; use rustgis_engine::map::raster::RasterLegend; use rustgis_engine::map::{ClassMethod, Layer, Marker, Ramp, RasterRenderer, Renderer, Resampling, Stretch, Symbol}; @@ -398,19 +398,38 @@ fn catalog(app: &mut RustGisApp, ui: &mut Ui, t: &Tokens) { } }); egui::CollapsingHeader::new(egui::RichText::new(tl!("Toolboxes")).font(semibold(12.5))).default_open(true).show(ui, |ui| { - let mut boxes: Vec<&str> = TOOLS.iter().map(|t| t.toolbox.split(" › ").next().unwrap_or(t.toolbox)).collect(); + let mut boxes: Vec<&str> = tools().map(|t| t.toolbox.split(" › ").next().unwrap_or(t.toolbox)).collect(); boxes.sort(); boxes.dedup(); + let link = |app: &mut RustGisApp, ui: &mut Ui, tool: &rustgis_engine::analysis::ToolSpec| { + ui.horizontal(|ui| { + let (r, _) = ui.allocate_exact_size(vec2(16.0, 16.0), Sense::hover()); + icons::paint(ui.painter(), r, "tools", t.icon, t.accent); + if ui.link(tl!(tool.name)).on_hover_text(tl!(tool.summary)).clicked() { + let _ = app.run("ui.gp.open", json!({"tool": tool.id})); + } + }); + }; for b in boxes { egui::CollapsingHeader::new(crate::i18n::location(b)).default_open(false).show(ui, |ui| { - for tool in TOOLS.iter().filter(|x| x.toolbox.starts_with(b)) { - ui.horizontal(|ui| { - let (r, _) = ui.allocate_exact_size(vec2(16.0, 16.0), Sense::hover()); - icons::paint(ui.painter(), r, "tools", t.icon, t.accent); - if ui.link(tl!(tool.name)).on_hover_text(tl!(tool.summary)).clicked() { - let _ = app.run("ui.gp.open", json!({"tool": tool.id})); - } - }); + let mut subs: Vec<&str> = tools().filter(|x| x.toolbox.split(" › ").next() == Some(b)).map(|x| x.toolbox).collect(); + subs.dedup(); + // A large toolbox (the GeoLibre suite) opens one sub-toolbox at a time. + if subs.len() > 1 && tools().filter(|x| x.toolbox.starts_with(b)).count() > 40 { + for sub in subs { + egui::CollapsingHeader::new(crate::i18n::location(sub.trim_start_matches(b).trim_start_matches(" › "))) + .id_salt(("toolbox", sub)) + .default_open(false) + .show(ui, |ui| { + for tool in tools().filter(|x| x.toolbox == sub) { + link(app, ui, tool); + } + }); + } + } else { + for tool in tools().filter(|x| x.toolbox.split(" › ").next() == Some(b)) { + link(app, ui, tool); + } } }); } @@ -523,6 +542,12 @@ impl GpForm { .filter(|l| l.geometry_type() == GeometryType::Point) .or_else(|| s.map().layers.iter().find(|l| l.geometry_type() == GeometryType::Point)) .map(|l| l.name.clone()), + ParamKind::RasterLayer => { + active.filter(|l| l.is_raster()).or_else(|| s.map().layers.iter().find(|l| l.is_raster())).map(|l| l.name.clone()) + } + ParamKind::VectorLayer => { + active.filter(|l| !l.is_raster()).or_else(|| s.map().layers.iter().find(|l| !l.is_raster())).map(|l| l.name.clone()) + } _ => serde_json::from_str::(p.default).ok().map(|v| v.as_str().map(str::to_string).unwrap_or_else(|| v.to_string())), }; if let Some(v) = v { @@ -542,39 +567,76 @@ fn geoprocessing(app: &mut RustGisApp, ui: &mut Ui, t: &Tokens) { }); ui.add_space(8.0); let q = app.gp.search.to_lowercase(); - let mut boxes: Vec<&str> = TOOLS.iter().map(|t| t.toolbox).collect(); + let matches = |x: &rustgis_engine::analysis::ToolSpec| { + q.is_empty() || x.name.to_lowercase().contains(&q) || x.summary.to_lowercase().contains(&q) || x.id.to_lowercase().contains(&q) + }; + let row = |app: &mut RustGisApp, ui: &mut Ui, tool: &'static rustgis_engine::analysis::ToolSpec| { + let (r, resp) = ui.allocate_exact_size(vec2(ui.available_width(), 42.0), Sense::click()); + if resp.hovered() { + ui.painter().rect_filled(r, CornerRadius::same(6), t.hover); + } + icons::paint( + ui.painter(), + Rect::from_center_size(pos2(r.min.x + 16.0, r.center().y), vec2(20.0, 20.0)), + tool_icon(tool.id), + t.icon, + t.accent, + ); + ui.painter().text(pos2(r.min.x + 34.0, r.min.y + 13.0), Align2::LEFT_CENTER, tl!(tool.name), semibold(12.5), t.accent_text); + let summary: String = tl!(tool.summary).chars().take(52).collect(); + ui.painter().text(pos2(r.min.x + 34.0, r.min.y + 29.0), Align2::LEFT_CENTER, summary, regular(11.0), t.text_dim); + if resp.on_hover_text(tl!(tool.summary)).clicked() { + app.gp.open(Some(tool.id), &app.session); + } + }; + let mut boxes: Vec<&str> = rustgis_engine::analysis::TOOLS.iter().map(|t| t.toolbox).collect(); boxes.sort(); boxes.dedup(); for b in boxes { - let tools: Vec<_> = TOOLS - .iter() - .filter(|x| x.toolbox == b && (q.is_empty() || x.name.to_lowercase().contains(&q) || x.summary.to_lowercase().contains(&q))) - .collect(); - if tools.is_empty() { + let found: Vec<_> = rustgis_engine::analysis::TOOLS.iter().filter(|x| x.toolbox == b && matches(x)).collect(); + if found.is_empty() { continue; } ui.label(egui::RichText::new(crate::i18n::location(b)).size(11.0).color(t.text_dim)); - for tool in tools { - let (r, resp) = ui.allocate_exact_size(vec2(ui.available_width(), 42.0), Sense::click()); - if resp.hovered() { - ui.painter().rect_filled(r, CornerRadius::same(6), t.hover); - } - icons::paint( - ui.painter(), - Rect::from_center_size(pos2(r.min.x + 16.0, r.center().y), vec2(20.0, 20.0)), - tool_icon(tool.id), - t.icon, - t.accent, - ); - ui.painter().text(pos2(r.min.x + 34.0, r.min.y + 13.0), Align2::LEFT_CENTER, tl!(tool.name), semibold(12.5), t.accent_text); - let summary: String = tl!(tool.summary).chars().take(52).collect(); - ui.painter().text(pos2(r.min.x + 34.0, r.min.y + 29.0), Align2::LEFT_CENTER, summary, regular(11.0), t.text_dim); - if resp.on_hover_text(tl!(tool.summary)).clicked() { - app.gp.open(Some(tool.id), &app.session); - } + for tool in found { + row(app, ui, tool); } ui.add_space(6.0); } + // The GeoLibre suite: a thousand tools, so toolboxes stay closed until opened, and a + // search lists the first matches. + let external = rustgis_engine::analysis::external_tools(); + if external.is_empty() { + return; + } + if q.is_empty() { + let mut boxes: Vec<&str> = external.iter().map(|t| t.toolbox).collect(); + boxes.dedup(); + for b in boxes { + let n = external.iter().filter(|x| x.toolbox == b).count(); + egui::CollapsingHeader::new(format!("{} ({n})", crate::i18n::location(b))).id_salt(("gp-box", b)).default_open(false).show( + ui, + |ui| { + for tool in external.iter().filter(|x| x.toolbox == b) { + row(app, ui, tool); + } + }, + ); + } + } else { + const MAX: usize = 60; + let found: Vec<_> = external.iter().filter(|x| matches(x)).collect(); + if !found.is_empty() { + ui.label(egui::RichText::new(tl!("GeoLibre")).size(11.0).color(t.text_dim)); + } + for tool in found.iter().take(MAX) { + row(app, ui, tool); + } + if found.len() > MAX { + let more = crate::i18n::fmt("Refine the search to see {n} more", &[("n", &(found.len() - MAX).to_string())]); + ui.label(egui::RichText::new(more).size(11.0).color(t.text_dim)); + } + } return; }; // Tool form. @@ -598,10 +660,19 @@ fn geoprocessing(app: &mut RustGisApp, ui: &mut Ui, t: &Tokens) { } v }; - let first_layer = - spec.params.iter().find(|p| matches!(p.kind, ParamKind::Layer | ParamKind::PolygonLayer | ParamKind::PointLayer)).map(|p| p.name); + let kind_names = |raster: bool| -> Vec { + app.session.map().layers.iter().filter(|l| l.is_raster() == raster).map(|l| l.name.clone()).collect() + }; + let first_layer = spec + .params + .iter() + .find(|p| matches!(p.kind, ParamKind::Layer | ParamKind::PolygonLayer | ParamKind::PointLayer | ParamKind::VectorLayer)) + .map(|p| p.name); for p in spec.params { - ui.label(egui::RichText::new(format!("{}{}", tl!(p.label), if p.required { " *" } else { "" })).size(12.0)); + let label = ui.label(egui::RichText::new(format!("{}{}", tl!(p.label), if p.required { " *" } else { "" })).size(12.0)); + if !p.help.is_empty() { + label.on_hover_text(p.help); + } let cur = app.gp.values.get(p.name).cloned().unwrap_or_default(); let options: Option> = match p.kind { ParamKind::Layer => Some(layer_names(None)), @@ -625,6 +696,21 @@ fn geoprocessing(app: &mut RustGisApp, ui: &mut Ui, t: &Tokens) { Some(v) } ParamKind::Choice(c) => Some(c.iter().map(|s| s.to_string()).collect()), + ParamKind::RasterLayer | ParamKind::VectorLayer => { + let mut v = kind_names(p.kind == ParamKind::RasterLayer); + if !p.required { + v.insert(0, String::new()); + } + Some(v) + } + ParamKind::Bool => { + let mut on = cur == "true"; + if ui.checkbox(&mut on, "").changed() { + app.gp.values.insert(p.name, on.to_string()); + } + ui.add_space(4.0); + continue; + } _ => None, }; match options { @@ -652,7 +738,11 @@ fn geoprocessing(app: &mut RustGisApp, ui: &mut Ui, t: &Tokens) { } None => { let mut v = cur; - let hint = if p.kind == ParamKind::Number { "number" } else { "" }; + let hint = match p.kind { + ParamKind::Number => tl!("number"), + ParamKind::Path => tl!("file path"), + _ => "", + }; if ui.add(egui::TextEdit::singleline(&mut v).hint_text(hint).desired_width(f32::INFINITY)).changed() { app.gp.values.insert(p.name, v); } @@ -670,8 +760,11 @@ fn geoprocessing(app: &mut RustGisApp, ui: &mut Ui, t: &Tokens) { let mut params = serde_json::Map::new(); for p in spec.params { if let Some(v) = app.gp.values.get(p.name).filter(|v| !v.trim().is_empty()) { - let val = - if p.kind == ParamKind::Number { v.trim().parse::().map(|n| json!(n)).unwrap_or(json!(v)) } else { json!(v) }; + let val = match p.kind { + ParamKind::Number => v.trim().parse::().map(|n| json!(n)).unwrap_or(json!(v)), + ParamKind::Bool => json!(v == "true"), + _ => json!(v), + }; params.insert(p.name.to_string(), val); } } diff --git a/docs/user-guide.md b/docs/user-guide.md index 6a7f2fb0c5..2516daab61 100644 --- a/docs/user-guide.md +++ b/docs/user-guide.md @@ -126,6 +126,28 @@ gdp_md IS NULL Tools honour the current selection: with features selected, only those are processed. +### GeoLibre tools + +The desktop app and the command line also include the +[GeoLibre](https://github.com/opengeos/geolibre-rust) tool suite: over 1,000 tools from +Whitebox and GeoLibre, under **GeoLibre › Raster, Vector, Lidar, Hydrology, Terrain, +Conversion** in the Geoprocessing pane and the Catalog's toolboxes (Find Tools searches them). +Terrain analysis (slope, aspect, hillshade, curvature), hydrology (fill depressions, flow +direction and accumulation, watersheds), image processing, interpolation and many vector tools +run on the map's layers, and their outputs are added as new layers. + +- Raster inputs are passed as their own files; vector layers (or their selection) are written + in the first raster input's coordinate system, or the UTM zone around the data, so distances + and areas are in metres. Data spanning more than 40° of longitude stays in degrees. +- Raster outputs are kept inside the project, so they save and reopen with it. Text and table + reports appear in the tool's messages. +- LiDAR and other inputs RustGIS doesn't open as layers take a file path. +- From the command line: `gp.run={"tool":"geolibre:slope","params":{"input":"dem"}}`; + `gp.tools` lists every tool's parameters. + +The web app doesn't include them yet: the tools read and write files, which a browser page +can't. + ## Keyboard shortcuts | Keys | Action | diff --git a/xtask/src/main.rs b/xtask/src/main.rs index eb09db0f1b..ed75e52048 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -6,7 +6,8 @@ use std::process::{Command, ExitCode}; -const LAYERS: &[(&str, u8)] = &[("geom", 0), ("data", 1), ("map", 2), ("analysis", 2), ("render", 3), ("engine", 4), ("ui-egui", 6)]; +const LAYERS: &[(&str, u8)] = + &[("geom", 0), ("data", 1), ("map", 2), ("analysis", 2), ("render", 3), ("geolibre", 3), ("engine", 4), ("ui-egui", 6)]; const UI_ONLY: &[&str] = &["egui", "eframe", "egui_extras", "rfd", "winit", "egui_kittest"]; fn root() -> std::path::PathBuf { From ba6de32e742a47134d7400b3b7812fa34a11d989 Mon Sep 17 00:00:00 2001 From: giswqs Date: Sat, 10 Oct 2026 22:22:10 -0400 Subject: [PATCH 2/9] Pin geolibre-rust to the merged library API opengeos/geolibre-rust#572 merged: depend on its merge commit on main instead of the PR branch. --- Cargo.lock | 16 ++++++++-------- crates/geolibre/Cargo.toml | 3 ++- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ceea89b874..87ccaad23c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1670,7 +1670,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -2011,7 +2011,7 @@ dependencies = [ [[package]] name = "geolibre-cli" version = "1.5.9" -source = "git+https://github.com/opengeos/geolibre-rust?branch=feat%2Flibrary-api#49bb10db5957ed605689c40d2b4fae8e2854fee7" +source = "git+https://github.com/opengeos/geolibre-rust?rev=3cb8ac3771f0a055510ab5e0a86bd00315058c57#3cb8ac3771f0a055510ab5e0a86bd00315058c57" dependencies = [ "geolibre-tools", "serde_json", @@ -2022,7 +2022,7 @@ dependencies = [ [[package]] name = "geolibre-pmtiles" version = "1.5.9" -source = "git+https://github.com/opengeos/geolibre-rust?branch=feat%2Flibrary-api#49bb10db5957ed605689c40d2b4fae8e2854fee7" +source = "git+https://github.com/opengeos/geolibre-rust?rev=3cb8ac3771f0a055510ab5e0a86bd00315058c57#3cb8ac3771f0a055510ab5e0a86bd00315058c57" dependencies = [ "flate2", ] @@ -2030,7 +2030,7 @@ dependencies = [ [[package]] name = "geolibre-tools" version = "1.5.9" -source = "git+https://github.com/opengeos/geolibre-rust?branch=feat%2Flibrary-api#49bb10db5957ed605689c40d2b4fae8e2854fee7" +source = "git+https://github.com/opengeos/geolibre-rust?rev=3cb8ac3771f0a055510ab5e0a86bd00315058c57#3cb8ac3771f0a055510ab5e0a86bd00315058c57" dependencies = [ "calamine", "flate2", @@ -4978,7 +4978,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.12.1", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -5504,7 +5504,7 @@ dependencies = [ "getrandom 0.4.3", "once_cell", "rustix 1.1.5", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -5838,7 +5838,7 @@ checksum = "f2f6fb2847f6742cd76af783a2a2c49e9375d0a111c7bef6f71cd9e738c72d6e" dependencies = [ "memoffset", "tempfile", - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] @@ -6603,7 +6603,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] diff --git a/crates/geolibre/Cargo.toml b/crates/geolibre/Cargo.toml index 1636ddcf5e..4514c874b8 100644 --- a/crates/geolibre/Cargo.toml +++ b/crates/geolibre/Cargo.toml @@ -15,4 +15,5 @@ rustgis-analysis = { workspace = true } serde_json = { workspace = true } log = { workspace = true } # The tool registry and its manifests; native only (the tools read and write files). -geolibre-cli = { git = "https://github.com/opengeos/geolibre-rust", branch = "feat/library-api" } +# Pinned to a commit on main so the suite can't change under a build. +geolibre-cli = { git = "https://github.com/opengeos/geolibre-rust", rev = "3cb8ac3771f0a055510ab5e0a86bd00315058c57" } From afeb6e0cf5d703551dd30f1caf35e5dc42eb52cd Mon Sep 17 00:00:00 2001 From: giswqs Date: Sat, 10 Oct 2026 22:23:59 -0400 Subject: [PATCH 3/9] Address Claude review feedback - gp.run skips a raster output it can't open, reporting it in the run's messages, instead of failing after earlier outputs were added. - Each run's scratch folder is created fresh (create_dir, retried with a new name if one exists), never reused, so nothing left over or pre-created on a shared machine can pass for a tool's output. - Document that, like Add Data, a tool reads files named in its parameters, and that outputs only go to the run's scratch folder. --- crates/engine/src/cmd/gp.rs | 17 ++++++++++++----- crates/geolibre/src/lib.rs | 22 ++++++++++++++++++---- docs/user-guide.md | 3 ++- 3 files changed, 32 insertions(+), 10 deletions(-) diff --git a/crates/engine/src/cmd/gp.rs b/crates/engine/src/cmd/gp.rs index e73721a0b6..452a372f5d 100644 --- a/crates/engine/src/cmd/gp.rs +++ b/crates/engine/src/cmd/gp.rs @@ -58,7 +58,7 @@ fn run(s: &mut Session, p: &Value) -> CmdResult { let res = rustgis_analysis::run(&tool, &MapInputs(s.map(), &s.project.tables), ¶ms); let millis = now_ms().saturating_sub(t0); let name = rustgis_analysis::tool(&tool).map(|t| t.name).unwrap_or("Tool").to_string(); - let result = match res { + let mut result = match res { Err(e) => { s.project.gp_history.push(GpRecord { tool: name, params, ok: false, messages: vec![e.clone()], millis }); return Err(e); @@ -95,10 +95,17 @@ fn run(s: &mut Session, p: &Value) -> CmdResult { match o { OutputLayer::Vector(ds) => layers.push(super::layer::add_dataset(s, ds)), OutputLayer::Raster { name, file_name, bytes } => { - let r = rustgis_data::raster::read_bytes(&file_name, &bytes).map_err(|e| format!("{name}: {e}"))?; - let added = super::raster::add_raster(s, &name, rustgis_map::RasterLayer::from_bytes(r, file_name, bytes))?; - if let Some(id) = added.get("layer").and_then(Value::as_u64).and_then(|id| u32::try_from(id).ok()) { - layers.push(id); + // One unreadable output doesn't undo the others: it's reported instead. + let added = rustgis_data::raster::read_bytes(&file_name, &bytes) + .map_err(|e| format!("{name}: {e}")) + .and_then(|r| super::raster::add_raster(s, &name, rustgis_map::RasterLayer::from_bytes(r, file_name, bytes))); + match added { + Ok(v) => { + if let Some(id) = v.get("layer").and_then(Value::as_u64).and_then(|id| u32::try_from(id).ok()) { + layers.push(id); + } + } + Err(e) => result.messages.push(e), } } OutputLayer::Table(t) => { diff --git a/crates/geolibre/src/lib.rs b/crates/geolibre/src/lib.rs index a21bf147c6..db8041df6e 100644 --- a/crates/geolibre/src/lib.rs +++ b/crates/geolibre/src/lib.rs @@ -10,6 +10,10 @@ //! in a metric coordinate system (the first raster input's, or the UTM zone of the data), so //! distances and areas are in metres; outputs come back as new layers in longitude/latitude. //! Native only: the browser build has no file system for the tools to use. +//! +//! Like Add Data, a tool reads any file named in its parameters (a layer name that isn't a +//! layer is taken as a path, and LiDAR inputs are paths), with the user's permissions. Outputs +//! are always written to the run's own scratch folder. #![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)] use std::collections::HashMap; @@ -201,12 +205,22 @@ fn spec_of(m: &Value) -> Option<(ToolSpec, Meta)> { struct Scratch(PathBuf); impl Scratch { + /// A new, empty folder: never one that already exists (left over, or made by someone else + /// on a shared machine), so no old file can pass for a tool's output. fn new() -> Result { static N: std::sync::atomic::AtomicU64 = std::sync::atomic::AtomicU64::new(0); - let n = N.fetch_add(1, std::sync::atomic::Ordering::Relaxed); - let dir = std::env::temp_dir().join(format!("rustgis-gp-{}-{n}", std::process::id())); - std::fs::create_dir_all(&dir).map_err(|e| format!("can't create a scratch folder: {e}"))?; - Ok(Scratch(dir)) + let nanos = std::time::SystemTime::now().duration_since(std::time::UNIX_EPOCH).map(|d| d.subsec_nanos()).unwrap_or(0); + let mut last = None; + for _ in 0..16 { + let n = N.fetch_add(1, std::sync::atomic::Ordering::Relaxed); + let dir = std::env::temp_dir().join(format!("rustgis-gp-{}-{nanos:x}-{n}", std::process::id())); + match std::fs::create_dir(&dir) { + Ok(()) => return Ok(Scratch(dir)), + Err(e) if e.kind() == std::io::ErrorKind::AlreadyExists => last = Some(e), + Err(e) => return Err(format!("can't create a scratch folder: {e}")), + } + } + Err(format!("can't create a scratch folder: {}", last.map(|e| e.to_string()).unwrap_or_default())) } } diff --git a/docs/user-guide.md b/docs/user-guide.md index 2516daab61..dc1e249ec6 100644 --- a/docs/user-guide.md +++ b/docs/user-guide.md @@ -141,7 +141,8 @@ run on the map's layers, and their outputs are added as new layers. and areas are in metres. Data spanning more than 40° of longitude stays in degrees. - Raster outputs are kept inside the project, so they save and reopen with it. Text and table reports appear in the tool's messages. -- LiDAR and other inputs RustGIS doesn't open as layers take a file path. +- LiDAR and other inputs RustGIS doesn't open as layers take a file path, read like Add Data + reads one. Outputs are written to a fresh scratch folder and loaded from there. - From the command line: `gp.run={"tool":"geolibre:slope","params":{"input":"dem"}}`; `gp.tools` lists every tool's parameters. From 0622a9ea4a74e6a0fe0aa7634c99e7c3dfb5e622 Mon Sep 17 00:00:00 2001 From: giswqs Date: Sat, 10 Oct 2026 23:00:13 -0400 Subject: [PATCH 4/9] Run the GeoLibre tools through the optional runner MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Linking the suite took the desktop app from about 34 MB to 108 MB. The tools now run through the `geolibre` runner, a separate optional download (a native build of geolibre-rust's runner, about 19 MB compressed), so RustGIS stays at 34.6 MB and builds as fast as before. - geolibre: no longer depends on geolibre-cli. runner.rs finds the runner (a located path, RUSTGIS_GEOLIBRE, beside the app, PATH), checks it with `geolibre version`, reads `geolibre manifests` for the forms and runs `geolibre --k=v` per run, so a crashing tool can't take the app down. Tests needing a runner skip without one. - analysis: the external tools can be reloaded (a runner was located). - engine: gp.geolibre reports the runner; gp.setGeolibre picks one (not an edit: no undo entry). - ui: without a runner, the Geoprocessing pane shows a card with a download link and Locate…, which remembers the choice. The GeoLibre section sits at the top of the finder so it isn't lost below the built-in tools. - Docs: how to get and locate the runner. --- AGENTS.md | 2 +- ATTRIBUTION.md | 5 +- Cargo.lock | 2794 +------------------------------- README.md | 2 +- crates/analysis/src/lib.rs | 31 +- crates/engine/src/cmd/gp.rs | 37 + crates/engine/src/tests.rs | 10 + crates/geolibre/Cargo.toml | 5 +- crates/geolibre/src/lib.rs | 76 +- crates/geolibre/src/runner.rs | 152 ++ crates/geolibre/src/tests.rs | 36 +- crates/ui-egui/src/i18n/az.tsv | 7 + crates/ui-egui/src/i18n/de.tsv | 7 + crates/ui-egui/src/i18n/es.tsv | 7 + crates/ui-egui/src/i18n/fr.tsv | 7 + crates/ui-egui/src/i18n/id.tsv | 7 + crates/ui-egui/src/i18n/it.tsv | 7 + crates/ui-egui/src/i18n/ja.tsv | 7 + crates/ui-egui/src/i18n/ko.tsv | 7 + crates/ui-egui/src/i18n/nl.tsv | 7 + crates/ui-egui/src/i18n/pt.tsv | 7 + crates/ui-egui/src/i18n/ru.tsv | 7 + crates/ui-egui/src/i18n/tr.tsv | 7 + crates/ui-egui/src/i18n/vi.tsv | 7 + crates/ui-egui/src/i18n/zh.tsv | 7 + crates/ui-egui/src/lib.rs | 6 + crates/ui-egui/src/panes.rs | 128 +- docs/user-guide.md | 30 +- 28 files changed, 590 insertions(+), 2822 deletions(-) create mode 100644 crates/geolibre/src/runner.rs diff --git a/AGENTS.md b/AGENTS.md index 262a5844b3..cc43c11f14 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -19,7 +19,7 @@ egui front end, headless screenshots for UI work. | L1 | `data` | features, typed attributes, GeoJSON/CSV/Shapefile I/O, SQL where clauses, rasters (GeoTIFF/ASCII grid, EPSG reprojection) | | L2 | `map`, `analysis` | layers, symbology, labels, camera, basemaps; geoprocessing tools | | L3 | `render` | tiny-skia map renderer, label placement, PNG export, font discovery | -| L3 | `geolibre` | the GeoLibre/Whitebox tool suite as geoprocessing tools (native only, behind the engine's `geolibre` feature) | +| L3 | `geolibre` | the GeoLibre/Whitebox tool suite as geoprocessing tools, run through the optional `geolibre` runner executable (native only, behind the engine's `geolibre` feature) | | L4 | `engine` | `Session`, undo, command registry, ribbon feature catalog, sample project | | L6 | `ui-egui` | ribbon, panes, map view, attribute table, dialogs (swappable) | | apps | `rustgis`, `rustgis-cli`, `rustgis-web` | desktop app, command line, browser (WebAssembly) | diff --git a/ATTRIBUTION.md b/ATTRIBUTION.md index 3da6d20a86..ad6bb6122b 100644 --- a/ATTRIBUTION.md +++ b/ATTRIBUTION.md @@ -11,8 +11,9 @@ Raster coordinate systems are looked up by EPSG code in the PROJ definitions of app. The GeoLibre tool suite ([geolibre-rust](https://github.com/opengeos/geolibre-rust), MIT, built -on [whitebox-wasm](https://github.com/opengeos/whitebox-wasm), MIT) is linked into the desktop -app and command line as a library; its tool names and descriptions come from its manifests. +on [whitebox-wasm](https://github.com/opengeos/whitebox-wasm), MIT) is not part of RustGIS: the +desktop app and command line run its separately downloaded `geolibre` runner, and its tool +names and descriptions come from the runner's manifests. Icons are original vector drawings in code (`crates/ui-egui/src/icons.rs`). Fonts are not bundled: the interface uses an installed system sans-serif when one is found, otherwise the diff --git a/Cargo.lock b/Cargo.lock index 87ccaad23c..938b25a92d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -144,46 +144,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" dependencies = [ "cfg-if", - "const-random", "getrandom 0.3.4", "once_cell", "version_check", "zerocopy", ] -[[package]] -name = "aligned" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee4508988c62edf04abd8d92897fca0c2995d907ce1dfeaf369dac3716a40685" -dependencies = [ - "as-slice", -] - -[[package]] -name = "aligned-vec" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc890384c8602f339876ded803c97ad529f3842aba97f6392b3dba0dd171769b" -dependencies = [ - "equator", -] - -[[package]] -name = "alloc-no-stdlib" -version = "2.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" - -[[package]] -name = "alloc-stdlib" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e76a019e91224d279006ff972f1e984179a6e9feb050adba6ce8274aef23195" -dependencies = [ - "alloc-no-stdlib", -] - [[package]] name = "allocator-api2" version = "0.2.21" @@ -239,12 +205,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "arbitrary" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bc62ac97cc33321f50863d514c3bc38a453947a8f9e781137e47c7401020aed" - [[package]] name = "arboard" version = "3.6.1" @@ -265,17 +225,6 @@ dependencies = [ "x11rb", ] -[[package]] -name = "arg_enum_proc_macro" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ae92a5119aa49cdbcf6b9f893fe4e1d98b04ccbf82ee0584ad948a44a734dea" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.119", -] - [[package]] name = "arrayref" version = "0.3.9" @@ -288,98 +237,12 @@ version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3fb67a6e08acf24fdeccbac2cb6ac4305825bd1f117462e0e6f2f193345ad56" -[[package]] -name = "arrow-array" -version = "58.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae33dad492b7df00a217563a7b0ef2874df68a0deea1b1a3acf628152f7f7a69" -dependencies = [ - "ahash", - "arrow-buffer", - "arrow-data", - "arrow-schema", - "chrono", - "half", - "hashbrown 0.17.1", - "num-complex", - "num-integer", - "num-traits", -] - -[[package]] -name = "arrow-buffer" -version = "58.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9552f96391c005e6ab449fa941420935e7e062489b12b8b1b08879b2163f5b5" -dependencies = [ - "bytes", - "half", - "num-bigint", - "num-traits", -] - -[[package]] -name = "arrow-data" -version = "58.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b24852db04738907e06c04ea61e42fe7fda962a34513022dc0d0e754fb7976b" -dependencies = [ - "arrow-buffer", - "arrow-schema", - "half", - "num-integer", - "num-traits", -] - -[[package]] -name = "arrow-ipc" -version = "58.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29a908a11fcfb3fb2f6730f4ac15e367bc644e419155e96238f68cf3adde572b" -dependencies = [ - "arrow-array", - "arrow-buffer", - "arrow-data", - "arrow-schema", - "arrow-select", - "flatbuffers 25.12.19", -] - -[[package]] -name = "arrow-schema" -version = "58.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21ca356ad6425cecb6eb7b28e4f659f1ee7880fbb1a16127de7dd62901efee9e" - -[[package]] -name = "arrow-select" -version = "58.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c58da39eb3d8350ad4a549e5c2bc49284dac554016c69829310350f1731b0aad" -dependencies = [ - "ahash", - "arrow-array", - "arrow-buffer", - "arrow-data", - "arrow-schema", - "num-traits", -] - [[package]] name = "as-raw-xcb-connection" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "175571dd1d178ced59193a6fc02dde1b972eb0bc56c892cde9beeceac5bf0f6b" -[[package]] -name = "as-slice" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "516b6b4f0e40d50dcda9365d53964ec74560ad4284da2e7fc97122cd83174516" -dependencies = [ - "stable_deref_trait", -] - [[package]] name = "ash" version = "0.38.0+1.3.281" @@ -520,16 +383,6 @@ dependencies = [ "syn 3.0.7", ] -[[package]] -name = "atoi_simd" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3cdb3708a128e559a30fb830e8a77a5022ee6902806925c216658652b452a44" -dependencies = [ - "debug_unsafe", - "rustversion", -] - [[package]] name = "atomic-waker" version = "1.1.2" @@ -579,81 +432,12 @@ version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" -[[package]] -name = "av-scenechange" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f321d77c20e19b92c39e7471cf986812cbb46659d2af674adc4331ef3f18394" -dependencies = [ - "aligned", - "anyhow", - "arg_enum_proc_macro", - "arrayvec", - "log", - "num-rational", - "num-traits", - "pastey", - "rayon", - "thiserror 2.0.21", - "v_frame", - "y4m", -] - -[[package]] -name = "av1-grain" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cfddb07216410377231960af4fcab838eaa12e013417781b78bd95ee22077f8" -dependencies = [ - "anyhow", - "arrayvec", - "log", - "nom", - "num-rational", - "v_frame", -] - -[[package]] -name = "avif-serialize" -version = "0.8.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7178fe5f7d460b13895ebb9dcb28a3a6216d2df2574a0806cb51b555d297f38" -dependencies = [ - "arrayvec", -] - [[package]] name = "base64" version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" -[[package]] -name = "bin-rs" -version = "0.0.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23f756521115a60a84bc45722261eaf03aa6a59d886c9c3b41d08ac1c39e3e24" - -[[package]] -name = "bincode" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36eaf5d7b090263e8150820482d5d93cd964a81e4019913c972f4edcc6edb740" -dependencies = [ - "bincode_derive", - "serde", - "unty", -] - -[[package]] -name = "bincode_derive" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf95709a440f45e986983918d0e8a1f30a9b1df04918fc828670606804ac3c09" -dependencies = [ - "virtue", -] - [[package]] name = "bit-set" version = "0.10.0" @@ -669,12 +453,6 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b71798fca2c1fe1086445a7258a4bc81e6e49dcd24c8d0dd9a1e57395b603f51" -[[package]] -name = "bit_field" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e4b40c7323adcfc0a41c4b88143ed58346ff65a288fc144329c5c45e05d70c6" - [[package]] name = "bitflags" version = "1.3.2" @@ -687,27 +465,6 @@ version = "2.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3ded4057c258ba199e2d26386d3af3780957ecaee6c4ef4041c6b4b8b97c0b06" -[[package]] -name = "bitstream-io" -version = "4.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7eff00be299a18769011411c9def0d827e8f2d7bf0c3dbf53633147a8867fd1f" -dependencies = [ - "no_std_io2", -] - -[[package]] -name = "bitvec" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddcec3d12c579d40898fe0a9a358a803c23e9c52ca3c425707f81c9436211837" -dependencies = [ - "funty", - "radium", - "tap", - "wyz", -] - [[package]] name = "block2" version = "0.5.1" @@ -739,60 +496,12 @@ dependencies = [ "piper", ] -[[package]] -name = "brotli" -version = "3.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d640d25bc63c50fb1f0b545ffd80207d2e10a4c965530809b40ba3386825c391" -dependencies = [ - "alloc-no-stdlib", - "alloc-stdlib", - "brotli-decompressor 2.5.1", -] - -[[package]] -name = "brotli" -version = "8.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc91aac060a7a1e25823bdccbfb6af1875b88f17c6daac97894eed8207166b3" -dependencies = [ - "alloc-no-stdlib", - "alloc-stdlib", - "brotli-decompressor 5.0.3", -] - -[[package]] -name = "brotli-decompressor" -version = "2.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e2e4afe60d7dd600fdd3de8d0f08c2b7ec039712e3b6137ff98b7004e82de4f" -dependencies = [ - "alloc-no-stdlib", - "alloc-stdlib", -] - -[[package]] -name = "brotli-decompressor" -version = "5.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a32acac15fe1967bc3986b2a6347dffc965602354ea6f450ad07e8bfd253583" -dependencies = [ - "alloc-no-stdlib", - "alloc-stdlib", -] - [[package]] name = "bufrw" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "394c22b416e3981206df472c3bcbbf9ae130883619aefc2199e6087517af1bba" -[[package]] -name = "built" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c0e531d93d39c34eef561e929e8a7f86d77a5af08aac4f6d6e39976c51858e9" - [[package]] name = "bumpalo" version = "3.20.3" @@ -837,23 +546,6 @@ version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04" -[[package]] -name = "calamine" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fa68281b1a76b54a62156474adb06bb380a67e07dd60656e3217152b42183f3" -dependencies = [ - "atoi_simd", - "byteorder", - "codepage", - "encoding_rs", - "fast-float2", - "log", - "quick-xml", - "serde", - "zip", -] - [[package]] name = "calloop" version = "0.13.0" @@ -937,30 +629,6 @@ dependencies = [ "libc", ] -[[package]] -name = "chacha20" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65c35e4b699c7e15ccbe7ee35c005e4fc0a278d22238a2857e6ce2dadeda1b06" -dependencies = [ - "cfg-if", - "cpufeatures", - "rand_core 0.10.1", -] - -[[package]] -name = "chrono" -version = "0.4.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aa79e62e7697b8e29b513a68abacf485adcd1fe8284a4316c5ae868e6633327" -dependencies = [ - "iana-time-zone", - "js-sys", - "num-traits", - "wasm-bindgen", - "windows-link", -] - [[package]] name = "clipboard-win" version = "5.4.1" @@ -970,15 +638,6 @@ dependencies = [ "error-code", ] -[[package]] -name = "codepage" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdff162541cd8b79de82e2edcc7eff3a8c2a6dc3d75152636028f96d93de3b26" -dependencies = [ - "encoding_rs", -] - [[package]] name = "codespan-reporting" version = "0.13.1" @@ -999,12 +658,6 @@ dependencies = [ "bytemuck", ] -[[package]] -name = "color_quant" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" - [[package]] name = "colored" version = "2.2.0" @@ -1044,26 +697,6 @@ dependencies = [ "web-sys", ] -[[package]] -name = "const-random" -version = "0.1.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87e00182fe74b066627d63b85fd550ac2998d4b0bd86bfed477a0ae4c7c71359" -dependencies = [ - "const-random-macro", -] - -[[package]] -name = "const-random-macro" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" -dependencies = [ - "getrandom 0.2.17", - "once_cell", - "tiny-keccak", -] - [[package]] name = "core-foundation" version = "0.9.4" @@ -1104,21 +737,6 @@ dependencies = [ "libc", ] -[[package]] -name = "core_detect" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f8f80099a98041a3d1622845c271458a2d73e688351bf3cb999266764b81d48" - -[[package]] -name = "cpufeatures" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ca28b0ae3115b884660db4118d803791fd6756b6e88f39c0f3f7859060d7566" -dependencies = [ - "libc", -] - [[package]] name = "crc32fast" version = "1.5.2" @@ -1192,41 +810,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f27ae1dd37df86211c42e150270f82743308803d90a6f6e6651cd730d5e1732f" -[[package]] -name = "darling" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" -dependencies = [ - "darling_core", - "darling_macro", -] - -[[package]] -name = "darling_core" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim", - "syn 1.0.109", -] - -[[package]] -name = "darling_macro" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" -dependencies = [ - "darling_core", - "quote", - "syn 1.0.109", -] - [[package]] name = "dbase" version = "0.8.0" @@ -1239,51 +822,22 @@ dependencies = [ ] [[package]] -name = "debug_unsafe" -version = "0.1.4" +name = "deranged" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7eed2c4702fa172d1ce21078faa7c5203e69f5394d48cc436d25928394a867a2" +checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c" [[package]] -name = "deku" -version = "0.15.1" +name = "dify" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d631ba36587888e2f176cda075d73971c504283efd7d0112997a3fd02372c0" +checksum = "90ce0fb972943b4e88cd03b8f92953df0c71bb05e0bde8e5b684895d808013cc" dependencies = [ - "bitvec", - "deku_derive", -] - -[[package]] -name = "deku_derive" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9009099da9734d3dc49ce9c8c7f9b12905612c84c6dd4b4c075455743e47840d" -dependencies = [ - "darling", - "proc-macro-crate 1.3.1", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "deranged" -version = "0.5.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c" - -[[package]] -name = "dify" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ce0fb972943b4e88cd03b8f92953df0c71bb05e0bde8e5b684895d808013cc" -dependencies = [ - "anyhow", - "colored", - "getopts", - "image", - "rayon", + "anyhow", + "colored", + "getopts", + "image", + "rayon", ] [[package]] @@ -1304,17 +858,6 @@ dependencies = [ "objc2 0.6.5", ] -[[package]] -name = "displaydoc" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6232dd377dcc64799954cbd3a9bb882e9cdc1308ccd87b1c098f1fb2eaf82a8" -dependencies = [ - "proc-macro2", - "quote", - "syn 3.0.7", -] - [[package]] name = "dlib" version = "0.5.3" @@ -1345,16 +888,6 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d8b14ccef22fc6f5a8f4d7d768562a182c04ce9a3b3157b91390b52ddfdf1a76" -[[package]] -name = "duplicate" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de78e66ac9061e030587b2a2e75cc88f22304913c907b11307bca737141230cb" -dependencies = [ - "heck", - "proc-macro-error", -] - [[package]] name = "earcut" version = "0.4.5" @@ -1420,7 +953,7 @@ dependencies = [ "bitflags 2.13.2", "emath", "epaint", - "itertools 0.15.0", + "itertools", "log", "nohash-hasher", "profiling", @@ -1479,7 +1012,7 @@ dependencies = [ "ahash", "egui", "enum-map", - "itertools 0.15.0", + "itertools", "log", "profiling", ] @@ -1534,20 +1067,6 @@ dependencies = [ "bytemuck", ] -[[package]] -name = "encoding_rs" -version = "0.8.42" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e985e0451871ad22fb8d2b6b076e2028a502a0d3950998c2c5c0a4f9b5d9679" -dependencies = [ - "cfg-if", - "core_detect", - "multiversion_no_op", - "rustversion", - "scopeguard", - "simdutf8", -] - [[package]] name = "endi" version = "1.1.1" @@ -1626,43 +1145,12 @@ version = "0.36.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773fa9c96dd0dbef887e39d0ed6177f141cce4d68e6041df77570aa3702dfa13" -[[package]] -name = "equator" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4711b213838dfee0117e3be6ac926007d7f433d7bbe33595975d4190cb07e6fc" -dependencies = [ - "equator-macro", -] - -[[package]] -name = "equator-macro" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44f23cf4b44bfce11a86ace86f8a73ffdec849c9fd00a386a53d278bd9e81fb3" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.119", -] - [[package]] name = "equivalent" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" -[[package]] -name = "erased-serde" -version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2add8a07dd6a8d93ff627029c51de145e12686fbc36ecb298ac22e74cf02dec" -dependencies = [ - "serde", - "serde_core", - "typeid", -] - [[package]] name = "errno" version = "0.3.14" @@ -1688,12 +1176,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "evalexpr" -version = "13.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25929004897f2bbab309121a60400d36992f6d911d09baa6c172f6cc55706601" - [[package]] name = "event-listener" version = "5.4.2" @@ -1714,29 +1196,6 @@ dependencies = [ "pin-project-lite", ] -[[package]] -name = "exr" -version = "1.74.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711fe42c9964295e01ee3fba3f9fe0e1d24b98886950d68efe81b1c76e21adf3" -dependencies = [ - "bit_field", - "half", - "lebe", - "miniz_oxide 0.8.9", - "num-complex", - "pulp", - "rayon-core", - "smallvec", - "zune-inflate", -] - -[[package]] -name = "fast-float2" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6e8948ce679d00a02a94739ea185595dca7118ed04feb991127e443bd3d761f" - [[package]] name = "fastrand" version = "2.5.0" @@ -1764,42 +1223,12 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b97b65636e5b9ef369943878ac74335ba1c55c1cb6adbf1e2c293c624248d693" -[[package]] -name = "filetime" -version = "0.2.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c287a33c7f0a620c38e641e7f60827713987b3c0f26e8ddc9462cc69cf75759" -dependencies = [ - "cfg-if", - "libc", -] - [[package]] name = "find-msvc-tools" version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aedcfb3409746eddb02b9e19ebda1c3394f759a152e48ee875a0844d1b955484" -[[package]] -name = "flatbuffers" -version = "24.12.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f1baf0dbf96932ec9a3038d57900329c015b0bfb7b63d904f3bc27e2b02a096" -dependencies = [ - "bitflags 1.3.2", - "rustc_version", -] - -[[package]] -name = "flatbuffers" -version = "25.12.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35f6839d7b3b98adde531effaf34f0c2badc6f4735d26fe74709d8e513a96ef3" -dependencies = [ - "bitflags 2.13.2", - "rustc_version", -] - [[package]] name = "flate2" version = "1.1.10" @@ -1811,24 +1240,12 @@ dependencies = [ "zlib-rs", ] -[[package]] -name = "float_eq" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28a80e3145d8ad11ba0995949bbcf48b9df2be62772b3d351ef017dff6ecb853" - [[package]] name = "float_next_after" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37007738a80ea34f969af54a3390dd72cacdef654974cfd449c9f6f72dbaac10" -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - [[package]] name = "foldhash" version = "0.2.0" @@ -1871,37 +1288,6 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" -[[package]] -name = "form_urlencoded" -version = "1.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" -dependencies = [ - "percent-encoding", -] - -[[package]] -name = "freestiler-core" -version = "0.1.0" -source = "git+https://github.com/giswqs/freestiler?rev=b77f7f0d76e11bf105e913ab6d553eb2a4a7ca00#b77f7f0d76e11bf105e913ab6d553eb2a4a7ca00" -dependencies = [ - "flate2", - "geo", - "geo-types", - "integer-encoding 4.1.0", - "pmtiles2", - "prost", - "rayon", - "serde", - "serde_json", -] - -[[package]] -name = "funty" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" - [[package]] name = "futures-core" version = "0.3.34" @@ -1970,7 +1356,7 @@ dependencies = [ "i_overlay", "log", "num-traits", - "rand 0.10.3", + "rand", "rand_pcg", "robust", "rstar", @@ -1978,12 +1364,6 @@ dependencies = [ "spade", ] -[[package]] -name = "geo-traits" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e7c353d12a704ccfab1ba8bfb1a7fe6cb18b665bf89d37f4f7890edcd260206" - [[package]] name = "geo-types" version = "0.7.20" @@ -2008,50 +1388,6 @@ dependencies = [ "libm", ] -[[package]] -name = "geolibre-cli" -version = "1.5.9" -source = "git+https://github.com/opengeos/geolibre-rust?rev=3cb8ac3771f0a055510ab5e0a86bd00315058c57#3cb8ac3771f0a055510ab5e0a86bd00315058c57" -dependencies = [ - "geolibre-tools", - "serde_json", - "wbcore", - "wbtools_oss", -] - -[[package]] -name = "geolibre-pmtiles" -version = "1.5.9" -source = "git+https://github.com/opengeos/geolibre-rust?rev=3cb8ac3771f0a055510ab5e0a86bd00315058c57#3cb8ac3771f0a055510ab5e0a86bd00315058c57" -dependencies = [ - "flate2", -] - -[[package]] -name = "geolibre-tools" -version = "1.5.9" -source = "git+https://github.com/opengeos/geolibre-rust?rev=3cb8ac3771f0a055510ab5e0a86bd00315058c57#3cb8ac3771f0a055510ab5e0a86bd00315058c57" -dependencies = [ - "calamine", - "flate2", - "freestiler-core", - "geo", - "geolibre-pmtiles", - "h3o", - "kamadak-exif", - "kdtree", - "parquet", - "png 0.17.16", - "quick-xml", - "rstar", - "serde_json", - "wbcore", - "wblidar", - "wbraster", - "wbvector", - "zip", -] - [[package]] name = "gethostname" version = "1.1.0" @@ -2071,17 +1407,6 @@ dependencies = [ "unicode-width", ] -[[package]] -name = "getrandom" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" -dependencies = [ - "cfg-if", - "libc", - "wasi", -] - [[package]] name = "getrandom" version = "0.3.4" @@ -2103,17 +1428,6 @@ dependencies = [ "cfg-if", "libc", "r-efi 6.0.0", - "rand_core 0.10.1", -] - -[[package]] -name = "gif" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee8cfcc411d9adbbaba82fb72661cc1bcca13e8bba98b364e62b2dba8f960159" -dependencies = [ - "color_quant", - "weezl", ] [[package]] @@ -2127,114 +1441,6 @@ dependencies = [ "xml-rs", ] -[[package]] -name = "glam" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "333928d5eb103c5d4050533cec0384302db6be8ef7d3cebd30ec6a35350353da" - -[[package]] -name = "glam" -version = "0.15.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3abb554f8ee44336b72d522e0a7fe86a29e09f839a36022fa869a7dfe941a54b" - -[[package]] -name = "glam" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4126c0479ccf7e8664c36a2d719f5f2c140fbb4f9090008098d2c291fa5b3f16" - -[[package]] -name = "glam" -version = "0.17.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e01732b97afd8508eee3333a541b9f7610f454bb818669e66e90f5f57c93a776" - -[[package]] -name = "glam" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525a3e490ba77b8e326fb67d4b44b4bd2f920f44d4cc73ccec50adc68e3bee34" - -[[package]] -name = "glam" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b8509e6791516e81c1a630d0bd7fbac36d2fa8712a9da8662e716b52d5051ca" - -[[package]] -name = "glam" -version = "0.20.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43e957e744be03f5801a55472f593d43fabdebf25a4585db250f04d86b1675f" - -[[package]] -name = "glam" -version = "0.21.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "518faa5064866338b013ff9b2350dc318e14cc4fcd6cb8206d7e7c9886c98815" - -[[package]] -name = "glam" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f597d56c1bd55a811a1be189459e8fad2bbc272616375602443bdfb37fa774" - -[[package]] -name = "glam" -version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e4afd9ad95555081e109fe1d21f2a30c691b5f0919c67dfa690a2e1eb6bd51c" - -[[package]] -name = "glam" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5418c17512bdf42730f9032c74e1ae39afc408745ebb2acf72fbc4691c17945" - -[[package]] -name = "glam" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "151665d9be52f9bb40fc7966565d39666f2d1e69233571b71b87791c7e0528b3" - -[[package]] -name = "glam" -version = "0.27.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e05e7e6723e3455f4818c7b26e855439f7546cf617ef669d1adedb8669e5cb9" - -[[package]] -name = "glam" -version = "0.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "779ae4bf7e8421cf91c0b3b64e7e8b40b862fba4d393f59150042de7c4965a94" - -[[package]] -name = "glam" -version = "0.29.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8babf46d4c1c9d92deac9f7be466f76dfc4482b6452fc5024b5e8daf6ffeb3ee" - -[[package]] -name = "glam" -version = "0.30.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19fc433e8437a212d1b6f1e68c7824af3aed907da60afa994e7f542d18d12aa9" - -[[package]] -name = "glam" -version = "0.31.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "556f6b2ea90b8d15a74e0e7bb41671c9bdf38cd9f78c284d750b9ce58a2b5be7" - -[[package]] -name = "glam" -version = "0.32.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f70749695b063ecbf6b62949ccccde2e733ec3ecbbd71d467dca4e5c6c97cca0" - [[package]] name = "glifo" version = "0.2.0" @@ -2352,28 +1558,6 @@ dependencies = [ "euclid", ] -[[package]] -name = "h3o" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f033ee4f3b98f6842df9ce5111ff2dd36fd9be9804b9c0afd43e69e3891a6fbf" -dependencies = [ - "ahash", - "either", - "float_eq", - "geo", - "geo-traits", - "h3o-bit", - "libm", - "ordered-float 5.5.0", -] - -[[package]] -name = "h3o-bit" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b42eb4efef1f96510ae1a33b2682562a677d504641e9903a77bf5c666b9013e" - [[package]] name = "half" version = "2.7.1" @@ -2437,12 +1621,6 @@ dependencies = [ "stable_deref_trait", ] -[[package]] -name = "heck" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" - [[package]] name = "hermit-abi" version = "0.5.3" @@ -2455,12 +1633,6 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" -[[package]] -name = "hilbert_2d" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "705f81e042b11734af35c701c7f6b65f8a968a430621fa2c95e72e27f9f8be5c" - [[package]] name = "i_float" version = "1.16.0" @@ -2508,179 +1680,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4804bdc1dc124eb7e1aa9e144ecc04096bcf787a10a15fa44af682b51f0f6cce" [[package]] -name = "iana-time-zone" -version = "0.1.65" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470" -dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "log", - "wasm-bindgen", - "windows-core", -] - -[[package]] -name = "iana-time-zone-haiku" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" -dependencies = [ - "cc", -] - -[[package]] -name = "icu_collections" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa68d21081c4a05d5a901a1c62add574c77048b6a1c67be3b50ce0b60d4ca513" -dependencies = [ - "displaydoc", - "potential_utf", - "utf8_iter", - "yoke", - "zerofrom", - "zerovec", -] - -[[package]] -name = "icu_locale_core" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d56e28588da92eee5c3201a6eff33fabdd49b62269c8938d4ff050ce4d900deb" -dependencies = [ - "displaydoc", - "litemap", - "tinystr", - "writeable", - "zerovec", -] - -[[package]] -name = "icu_normalizer" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f9cf5f235641ed274641dd81c3f28d870e276763d0797aeeab72317b1c646f" -dependencies = [ - "icu_collections", - "icu_normalizer_data", - "icu_properties", - "icu_provider", - "smallvec", - "zerovec", -] - -[[package]] -name = "icu_normalizer_data" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1563da1ed3e0b3bf3d74c9b85917ac9c56464d2f57242270c09c9e752f8021a0" - -[[package]] -name = "icu_properties" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e7ca276ad3145661a65914e6daf131ca5120cd3dcee8f8f3214b8875184a148" -dependencies = [ - "displaydoc", - "icu_collections", - "icu_locale_core", - "icu_properties_data", - "icu_provider", - "zerotrie", - "zerovec", -] - -[[package]] -name = "icu_properties_data" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e590f038c1464a96894fd6d10127e90a8be4509f56ff7ecef851b15cee0b7caa" - -[[package]] -name = "icu_provider" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d27bbb9d3abbefac45d55f647c9de1d44aafcd1186eb91879afef17c396c3e73" -dependencies = [ - "displaydoc", - "icu_locale_core", - "writeable", - "yoke", - "zerofrom", - "zerotrie", - "zerovec", -] - -[[package]] -name = "ident_case" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" - -[[package]] -name = "idna" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" -dependencies = [ - "idna_adapter", - "smallvec", - "utf8_iter", -] - -[[package]] -name = "idna_adapter" -version = "1.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714" -dependencies = [ - "icu_normalizer", - "icu_properties", -] - -[[package]] -name = "image" -version = "0.25.10" +name = "image" +version = "0.25.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85ab80394333c02fe689eaf900ab500fbd0c2213da414687ebf995a65d5a6104" dependencies = [ "bytemuck", "byteorder-lite", - "color_quant", - "exr", - "gif", - "image-webp", "moxcms", "num-traits", - "png 0.18.1", - "qoi", - "ravif", - "rayon", - "rgb", + "png", "tiff", - "zune-core", - "zune-jpeg", -] - -[[package]] -name = "image-webp" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525e9ff3e1a4be2fbea1fdf0e98686a6d98b4d8f937e1bf7402245af1909e8c3" -dependencies = [ - "byteorder-lite", - "quick-error", ] -[[package]] -name = "imgref" -version = "1.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e44b0a4eaa4c82f441d50a963f2d5f05a787240aeee097597033e72accfd22f" - [[package]] name = "indexmap" version = "2.14.2" @@ -2691,38 +1703,6 @@ dependencies = [ "hashbrown 0.17.1", ] -[[package]] -name = "integer-encoding" -version = "3.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bb03732005da905c88227371639bf1ad885cc712789c011c31c5fb3ab3ccf02" - -[[package]] -name = "integer-encoding" -version = "4.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c00403deb17c3221a1fe4fb571b9ed0370b3dcd116553c77fa294a3d918699" - -[[package]] -name = "interpolate_name" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c34819042dc3d3971c46c2190835914dfbe0c3c13f61449b2997f4e9722dfa60" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.119", -] - -[[package]] -name = "inventory" -version = "0.3.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6928282826c822ad91bf1c9a1cb90a30ba1c26770749929b4656cd6be829cd7c" -dependencies = [ - "rustversion", -] - [[package]] name = "is-docker" version = "0.2.0" @@ -2742,15 +1722,6 @@ dependencies = [ "once_cell", ] -[[package]] -name = "itertools" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" -dependencies = [ - "either", -] - [[package]] name = "itertools" version = "0.15.0" @@ -2834,27 +1805,6 @@ dependencies = [ "libc", ] -[[package]] -name = "jpeg-decoder" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00810f1d8b74be64b13dbf3db89ac67740615d6c891f0e7b6179326533011a07" -dependencies = [ - "rayon", -] - -[[package]] -name = "jpeg-encoder" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b454d911ac55068f53495488d8ccd0646eaa540c033a28ee15b07838afafb01f" - -[[package]] -name = "jpeg-encoder" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0370574b86f7eca156b9f298392b5e69a23f8c86f3f865add60bbc2e79467a6" - [[package]] name = "js-sys" version = "0.3.106" @@ -2866,203 +1816,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "jxl-bitstream" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b480e752277e29eb4054f69546887a9b84656fe78c08f54ba5850ced98a378fe" -dependencies = [ - "tracing", -] - -[[package]] -name = "jxl-coding" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd972bcd125e776f1eb241ac50e39f956095a1c2770c64736c968f8946bd9a3c" -dependencies = [ - "jxl-bitstream", - "tracing", -] - -[[package]] -name = "jxl-color" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f316b1358c1711755b3ee8e8cb5c4a1dad12e796233088a7a513440782de80b2" -dependencies = [ - "jxl-bitstream", - "jxl-coding", - "jxl-grid", - "jxl-image", - "jxl-oxide-common", - "jxl-threadpool", - "tracing", -] - -[[package]] -name = "jxl-frame" -version = "0.13.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d967c6fd669c7c01060b5022d8835fa82fd46b06ffc98b549f17600a097c2b3" -dependencies = [ - "jxl-bitstream", - "jxl-coding", - "jxl-grid", - "jxl-image", - "jxl-modular", - "jxl-oxide-common", - "jxl-threadpool", - "jxl-vardct", - "tracing", -] - -[[package]] -name = "jxl-grid" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01671307879a033bfa52e6e8784b941aca770b3f3a7d33830b455b6844f793fb" -dependencies = [ - "tracing", -] - -[[package]] -name = "jxl-image" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f752d62577c702a94dbbce4045caf08cb58639e8a4d56464b40ecf33ffe565" -dependencies = [ - "jxl-bitstream", - "jxl-grid", - "jxl-oxide-common", - "tracing", -] - -[[package]] -name = "jxl-jbr" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e35d032bcec660647828527ff42c6f5776d2fd44b8357f9f6d9ac6dc07218e46" -dependencies = [ - "brotli-decompressor 5.0.3", - "jxl-bitstream", - "jxl-frame", - "jxl-grid", - "jxl-image", - "jxl-modular", - "jxl-oxide-common", - "jxl-threadpool", - "jxl-vardct", - "tracing", -] - -[[package]] -name = "jxl-modular" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a2f045b24c738dd91d482be385512b512721ae08a671bd4b27bf1c47f215235" -dependencies = [ - "jxl-bitstream", - "jxl-coding", - "jxl-grid", - "jxl-oxide-common", - "jxl-threadpool", - "tracing", -] - -[[package]] -name = "jxl-oxide" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d36c662923f47586880211f3bc7c0d83fb3a9b410d278c7bde93450748abeef3" -dependencies = [ - "brotli-decompressor 5.0.3", - "jxl-bitstream", - "jxl-color", - "jxl-frame", - "jxl-grid", - "jxl-image", - "jxl-jbr", - "jxl-oxide-common", - "jxl-render", - "jxl-threadpool", - "tracing", -] - -[[package]] -name = "jxl-oxide-common" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b62394c5021b3a9e7e0dbb2d639d555d019090c9946c39f6d3b09d390db4157b" -dependencies = [ - "jxl-bitstream", -] - -[[package]] -name = "jxl-render" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d34386bfdb6a19b5a30cc9beb4d475d537422c31ae8c39bb69640fcce3fcaf19" -dependencies = [ - "bytemuck", - "jxl-bitstream", - "jxl-coding", - "jxl-color", - "jxl-frame", - "jxl-grid", - "jxl-image", - "jxl-modular", - "jxl-oxide-common", - "jxl-threadpool", - "jxl-vardct", - "tracing", -] - -[[package]] -name = "jxl-threadpool" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25f15eb830aa77a7f21148d72e153562a26bfe570139bd4922eab1908dd499d3" -dependencies = [ - "rayon", - "rayon-core", - "tracing", -] - -[[package]] -name = "jxl-vardct" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce72a18c6d3a47172ab6c479be2bdb56f22066b5d7092663f03b4490820b4511" -dependencies = [ - "jxl-bitstream", - "jxl-coding", - "jxl-grid", - "jxl-modular", - "jxl-oxide-common", - "jxl-threadpool", - "tracing", -] - -[[package]] -name = "kamadak-exif" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1130d80c7374efad55a117d715a3af9368f0fa7a2c54573afc15a188cd984837" -dependencies = [ - "mutate_once", -] - -[[package]] -name = "kdtree" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cd666c2aae5dde60d2f9bfa4e1f8c17698fce13d599c0f9b76725641fec13d9" -dependencies = [ - "num-traits", - "thiserror 2.0.21", -] - [[package]] name = "khronos-egl" version = "6.0.0" @@ -3108,28 +1861,12 @@ version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "20870f649af7073d53e38067b2a84312175d56ea15217e1b15bc83506ec50afb" -[[package]] -name = "lebe" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a79a3332a6609480d7d0c9eab957bca6b455b91bb84e66d19f5ff66294b85b8" - [[package]] name = "libc" version = "0.2.190" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce5d3ddc6d3fa000eb1536d85e147bfe31aacaba692ed6a876f95cb7c855be78" -[[package]] -name = "libfuzzer-sys" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9fd2f41a1cba099f79a0b6b6c35656cf7c03351a7bae8ff0f28f25270f929d2" -dependencies = [ - "arbitrary", - "cc", -] - [[package]] name = "libloading" version = "0.8.9" @@ -3176,12 +1913,6 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" -[[package]] -name = "litemap" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47d9d19d1d6efa0109d2f65ff4c85cddd50bd572e5a00127ab10987290bcefae" - [[package]] name = "litrs" version = "1.0.0" @@ -3203,53 +1934,6 @@ version = "0.4.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9f8bd3e56ce4dfc153cf470fffbfa98c7620958b312ca5c3a4b8d5181fd13c6" -[[package]] -name = "loop9" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fae87c125b03c1d2c0150c90365d7d6bcc53fb73a9acaef207d2d065860f062" -dependencies = [ - "imgref", -] - -[[package]] -name = "lz4_flex" -version = "0.11.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "373f5eceeeab7925e0c1098212f2fbc4d416adec9d35051a6ab251e824c1854a" -dependencies = [ - "twox-hash", -] - -[[package]] -name = "lz4_flex" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef0d4ed8669f8f8826eb00dc878084aa8f253506c4fd5e8f58f5bce72ddb97e" -dependencies = [ - "twox-hash", -] - -[[package]] -name = "matrixmultiply" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f607c237553f086e7043417a51df26b2eb899d3caff94e6a67592ff992fedc7" -dependencies = [ - "autocfg", - "rawpointer", -] - -[[package]] -name = "maybe-rayon" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea1f30cedd69f0a2954655f7188c6a834246d2bcf1e315e2ac40c4b24dc9519" -dependencies = [ - "cfg-if", - "rayon", -] - [[package]] name = "memchr" version = "2.8.3" @@ -3304,18 +1988,6 @@ dependencies = [ "pxfm", ] -[[package]] -name = "multiversion_no_op" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "743fb55ba31b18fb1ecef6bdc9aa2743314978ac084044301a7eee33fb99a20d" - -[[package]] -name = "mutate_once" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13d2233c9842d08cfe13f9eac96e207ca6a2ea10b80259ebe8ad0268be27d2af" - [[package]] name = "naga" version = "30.0.1" @@ -3355,211 +2027,46 @@ dependencies = [ ] [[package]] -name = "nalgebra" -version = "0.34.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df76ea0ff5c7e6b88689085804d6132ded0ddb9de5ca5b8aeb9eeadc0508a70a" -dependencies = [ - "approx", - "glam 0.14.0", - "glam 0.15.2", - "glam 0.16.0", - "glam 0.17.3", - "glam 0.18.0", - "glam 0.19.0", - "glam 0.20.5", - "glam 0.21.3", - "glam 0.22.0", - "glam 0.23.0", - "glam 0.24.2", - "glam 0.25.0", - "glam 0.27.0", - "glam 0.28.0", - "glam 0.29.3", - "glam 0.30.10", - "glam 0.31.1", - "glam 0.32.1", - "matrixmultiply", - "nalgebra-macros", - "num-complex", - "num-rational", - "num-traits", - "serde", - "simba", - "typenum", -] - -[[package]] -name = "nalgebra-macros" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "973e7178a678cfd059ccec50887658d482ce16b0aa9da3888ddeab5cd5eb4889" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.119", -] - -[[package]] -name = "ndarray" -version = "0.15.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adb12d4e967ec485a5f71c6311fe28158e9d6f4bc4a447b474184d0f91a8fa32" -dependencies = [ - "matrixmultiply", - "num-complex", - "num-integer", - "num-traits", - "rawpointer", - "serde", -] - -[[package]] -name = "ndk" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" -dependencies = [ - "bitflags 2.13.2", - "jni-sys 0.3.1", - "log", - "ndk-sys", - "num_enum", - "raw-window-handle", - "thiserror 1.0.69", -] - -[[package]] -name = "ndk-context" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" - -[[package]] -name = "ndk-sys" -version = "0.6.0+11769913" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee6cda3051665f1fb8d9e08fc35c96d5a244fb1be711a03b71118828afc9a873" -dependencies = [ - "jni-sys 0.3.1", -] - -[[package]] -name = "new_debug_unreachable" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" - -[[package]] -name = "no_std_io2" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418abd1b6d34fbf6cae440dc874771b0525a604428704c76e48b29a5e67b8003" -dependencies = [ - "memchr", -] - -[[package]] -name = "nohash-hasher" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" - -[[package]] -name = "nom" -version = "8.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df9761775871bdef83bee530e60050f7e54b1105350d6884eb0fb4f46c2f9405" -dependencies = [ - "memchr", -] - -[[package]] -name = "noop_proc_macro" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0676bb32a98c1a483ce53e500a81ad9c3d5b3f7c920c28c24e9cb0980d0b5bc8" - -[[package]] -name = "num" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" -dependencies = [ - "num-bigint", - "num-complex", - "num-integer", - "num-iter", - "num-rational", - "num-traits", -] - -[[package]] -name = "num-bigint" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c89e69e7e0f03bea5ef08013795c25018e101932225a656383bd384495ecc367" -dependencies = [ - "num-integer", - "num-traits", -] - -[[package]] -name = "num-complex" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" -dependencies = [ - "bytemuck", - "num-traits", -] - -[[package]] -name = "num-conv" -version = "0.2.2" +name = "ndk" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "521739c6d2bac4aa25192232afe6841231376b2b26d4d9fae5ecf8ca5772e441" +checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" +dependencies = [ + "bitflags 2.13.2", + "jni-sys 0.3.1", + "log", + "ndk-sys", + "num_enum", + "raw-window-handle", + "thiserror 1.0.69", +] [[package]] -name = "num-derive" -version = "0.4.2" +name = "ndk-context" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.119", -] +checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" [[package]] -name = "num-integer" -version = "0.1.47" +name = "ndk-sys" +version = "0.6.0+11769913" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ce2d95d4b3734dc35aa2f45e1aa22cd416814592a4f9d9205e11affd5b8e10b" +checksum = "ee6cda3051665f1fb8d9e08fc35c96d5a244fb1be711a03b71118828afc9a873" dependencies = [ - "num-traits", + "jni-sys 0.3.1", ] [[package]] -name = "num-iter" -version = "0.1.46" +name = "nohash-hasher" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c92800bd69a1eac91786bcfe9da64a897eb72911b8dc3095decbd07429e8048b" -dependencies = [ - "num-integer", - "num-traits", -] +checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" [[package]] -name = "num-rational" -version = "0.4.2" +name = "num-conv" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" -dependencies = [ - "num-bigint", - "num-integer", - "num-traits", -] +checksum = "521739c6d2bac4aa25192232afe6841231376b2b26d4d9fae5ecf8ca5772e441" [[package]] name = "num-traits" @@ -3587,7 +2094,7 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "680998035259dcfcafe653688bf2aa6d3e2dc05e98be6ab46afb089dc84f1df8" dependencies = [ - "proc-macro-crate 3.5.0", + "proc-macro-crate", "proc-macro2", "quote", "syn 2.0.119", @@ -3930,15 +2437,6 @@ dependencies = [ "libredox", ] -[[package]] -name = "ordered-float" -version = "2.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68f19d67e5a2795c94e73e0bb1cc1a7edeb2e28efd39e2e1c9b7a40c1108b11c" -dependencies = [ - "num-traits", -] - [[package]] name = "ordered-float" version = "5.5.0" @@ -3996,51 +2494,6 @@ dependencies = [ "windows-link", ] -[[package]] -name = "parquet" -version = "58.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d298093b2dec60289dce0684c986d0f7679e9dd15771c2c65406e1aaf604a704" -dependencies = [ - "ahash", - "arrow-array", - "arrow-buffer", - "arrow-data", - "arrow-ipc", - "arrow-schema", - "arrow-select", - "base64", - "brotli 8.0.4", - "bytes", - "chrono", - "flate2", - "half", - "hashbrown 0.17.1", - "lz4_flex 0.13.1", - "num-bigint", - "num-integer", - "num-traits", - "paste", - "seq-macro", - "simdutf8", - "snap", - "thrift", - "twox-hash", - "zstd 0.13.3", -] - -[[package]] -name = "paste" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" - -[[package]] -name = "pastey" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35fb2e5f958ec131621fdd531e9fc186ed768cbe395337403ae56c17a74c68ec" - [[package]] name = "peniko" version = "0.6.1" @@ -4152,36 +2605,6 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" -[[package]] -name = "pmtiles2" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df68cae0754066c0ba89fd4ca1307f496623ed49edabed4b3cafad335448cd77" -dependencies = [ - "ahash", - "brotli 3.5.0", - "deku", - "duplicate", - "flate2", - "hilbert_2d", - "integer-encoding 3.0.4", - "serde_json", - "zstd 0.11.2+zstd.1.5.2", -] - -[[package]] -name = "png" -version = "0.17.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82151a2fc869e011c153adc57cf2789ccb8d9906ce52c0b39a6b5697749d7526" -dependencies = [ - "bitflags 1.3.2", - "crc32fast", - "fdeflate", - "flate2", - "miniz_oxide 0.8.9", -] - [[package]] name = "png" version = "0.18.1" @@ -4245,86 +2668,25 @@ dependencies = [ "portable-atomic", ] -[[package]] -name = "potential_utf" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d83eb9bc6d8e5cf568e7a1101d60ee05e81ed50ea106026f3d18deeb046d7661" -dependencies = [ - "zerovec", -] - [[package]] name = "powerfmt" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4a6394b9e965e73d0a289ee54f589087e2c676aedf60885baf52c76b771e4958" -[[package]] -name = "ppv-lite86" -version = "0.2.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" -dependencies = [ - "zerocopy", -] - [[package]] name = "presser" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8cf8e6a8aa66ce33f63993ffc4ea4271eb5b0530a9002db8455ea6050c77bfa" -[[package]] -name = "primal-check" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc0d895b311e3af9902528fbb8f928688abbd95872819320517cc24ca6b2bd08" -dependencies = [ - "num-integer", -] - -[[package]] -name = "proc-macro-crate" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" -dependencies = [ - "once_cell", - "toml_edit 0.19.15", -] - [[package]] name = "proc-macro-crate" version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f" dependencies = [ - "toml_edit 0.25.17+spec-1.1.0", -] - -[[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "syn 1.0.109", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" -dependencies = [ - "proc-macro2", - "quote", - "version_check", + "toml_edit", ] [[package]] @@ -4341,19 +2703,6 @@ name = "profiling" version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d595e54a326bc53c1c197b32d295e14b169e3cfeaa8dc82b529f947fba6bcf5" -dependencies = [ - "profiling-procmacros", -] - -[[package]] -name = "profiling-procmacros" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4488a4a36b9a4ba6b9334a32a39971f77c1436ec82c38707bce707699cc3bbcb" -dependencies = [ - "quote", - "syn 2.0.119", -] [[package]] name = "proj4rs" @@ -4368,67 +2717,12 @@ dependencies = [ "web-sys", ] -[[package]] -name = "prost" -version = "0.13.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2796faa41db3ec313a31f7624d9286acf277b52de526150b7e69f3debf891ee5" -dependencies = [ - "bytes", - "prost-derive", -] - -[[package]] -name = "prost-derive" -version = "0.13.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a56d757972c98b346a9b766e3f02746cde6dd1cd1d1d563472929fdd74bec4d" -dependencies = [ - "anyhow", - "itertools 0.14.0", - "proc-macro2", - "quote", - "syn 2.0.119", -] - -[[package]] -name = "pulp" -version = "0.22.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "046aa45b989642ec2e4717c8e72d677b13edd831a4d3b6cf37d9a3e54912496a" -dependencies = [ - "bytemuck", - "cfg-if", - "libm", - "num-complex", - "paste", - "pulp-wasm-simd-flag", - "raw-cpuid", - "reborrow", - "version_check", -] - -[[package]] -name = "pulp-wasm-simd-flag" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d8f70e07b9c3962945a74e59ca1c511bba65b6419468acc217c457d93f3c740" - [[package]] name = "pxfm" version = "0.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d55d956fa96f5ec02be2e13af0e20391a5aa83d6a074e3ad368959d0fab299ea" -[[package]] -name = "qoi" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f6d64c71eb498fe9eae14ce4ec935c555749aef511cca85b5568910d6e48001" -dependencies = [ - "bytemuck", -] - [[package]] name = "quick-error" version = "2.0.1" @@ -4441,7 +2735,6 @@ version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e660451e55124f798a69a5af3f49ccfbefbd41910eefd25caf2393e1f3473ec1" dependencies = [ - "encoding_rs", "memchr", ] @@ -4466,161 +2759,35 @@ version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" -[[package]] -name = "radium" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" - -[[package]] -name = "rand" -version = "0.8.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e058c7de0b26af77780c769414d6257830bb240f3c38477dbc2c16e5f54d6d4c" -dependencies = [ - "libc", - "rand_chacha 0.3.1", - "rand_core 0.6.4", -] - -[[package]] -name = "rand" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ef1d0d795eb7d84685bca4f72f3649f064e6641543d3a8c415898726a57b41" -dependencies = [ - "rand_chacha 0.9.0", - "rand_core 0.9.5", -] - [[package]] name = "rand" version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "65c9fb96cbc91e3478eaae79a69fcd3f1ae4ad052e471fe6732fff548984b4af" dependencies = [ - "chacha20", - "getrandom 0.4.3", - "rand_core 0.10.1", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core 0.6.4", -] - -[[package]] -name = "rand_chacha" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" -dependencies = [ - "ppv-lite86", - "rand_core 0.9.5", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom 0.2.17", -] - -[[package]] -name = "rand_core" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" -dependencies = [ - "getrandom 0.3.4", -] - -[[package]] -name = "rand_core" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69" - -[[package]] -name = "rand_pcg" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "caa0f4137e1c0a72f4c651489402276c8e8e1cf081f3b0ba156d2cbeef09e86a" -dependencies = [ - "rand_core 0.10.1", + "rand_core", ] [[package]] -name = "range-alloc" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca45419789ae5a7899559e9512e58ca889e41f04f1f2445e9f4b290ceccd1d08" - -[[package]] -name = "rav1e" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43b6dd56e85d9483277cde964fd1bdb0428de4fec5ebba7540995639a21cb32b" -dependencies = [ - "aligned-vec", - "arbitrary", - "arg_enum_proc_macro", - "arrayvec", - "av-scenechange", - "av1-grain", - "bitstream-io", - "built", - "cfg-if", - "interpolate_name", - "itertools 0.14.0", - "libc", - "libfuzzer-sys", - "log", - "maybe-rayon", - "new_debug_unreachable", - "noop_proc_macro", - "num-derive", - "num-traits", - "paste", - "profiling", - "rand 0.9.5", - "rand_chacha 0.9.0", - "simd_helpers", - "thiserror 2.0.21", - "v_frame", - "wasm-bindgen", -] +name = "rand_core" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69" [[package]] -name = "ravif" -version = "0.13.0" +name = "rand_pcg" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e52310197d971b0f5be7fe6b57530dcd27beb35c1b013f29d66c1ad73fbbcc45" +checksum = "caa0f4137e1c0a72f4c651489402276c8e8e1cf081f3b0ba156d2cbeef09e86a" dependencies = [ - "avif-serialize", - "imgref", - "loop9", - "quick-error", - "rav1e", - "rayon", - "rgb", + "rand_core", ] [[package]] -name = "raw-cpuid" -version = "11.6.0" +name = "range-alloc" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "498cd0dc59d73224351ee52a95fee0f1a617a2eae0e7d9d720cc622c73a54186" -dependencies = [ - "bitflags 2.13.2", -] +checksum = "ca45419789ae5a7899559e9512e58ca889e41f04f1f2445e9f4b290ceccd1d08" [[package]] name = "raw-window-handle" @@ -4640,12 +2807,6 @@ dependencies = [ "objc2-quartz-core 0.3.2", ] -[[package]] -name = "rawpointer" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" - [[package]] name = "rayon" version = "1.12.0" @@ -4677,12 +2838,6 @@ dependencies = [ "once_cell", ] -[[package]] -name = "reborrow" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03251193000f4bd3b042892be858ee50e8b3719f2b08e5833ac4353724632430" - [[package]] name = "redox_syscall" version = "0.4.1" @@ -4743,26 +2898,6 @@ dependencies = [ "windows-sys 0.61.2", ] -[[package]] -name = "rgb" -version = "0.8.53" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47b34b781b31e5d73e9fbc8689c70551fd1ade9a19e3e28cfec8580a79290cc4" - -[[package]] -name = "ring" -version = "0.17.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" -dependencies = [ - "cc", - "cfg-if", - "getrandom 0.2.17", - "libc", - "untrusted", - "windows-sys 0.52.0", -] - [[package]] name = "robust" version = "1.2.0" @@ -4801,20 +2936,6 @@ dependencies = [ "semver", ] -[[package]] -name = "rustfft" -version = "6.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21db5f9893e91f41798c88680037dba611ca6674703c1a18601b01a72c8adb89" -dependencies = [ - "num-complex", - "num-integer", - "num-traits", - "primal-check", - "strength_reduce", - "transpose", -] - [[package]] name = "rustgis" version = "0.1.0" @@ -4882,7 +3003,6 @@ dependencies = [ name = "rustgis-geolibre" version = "0.1.0" dependencies = [ - "geolibre-cli", "log", "rustgis-analysis", "rustgis-data", @@ -4981,80 +3101,18 @@ dependencies = [ "windows-sys 0.59.0", ] -[[package]] -name = "rustls" -version = "0.23.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d41d731c7d2f962d1ccc364cec258de3c0e93b38c2fb3ba97ac74513048d634" -dependencies = [ - "log", - "once_cell", - "ring", - "rustls-pki-types", - "rustls-webpki", - "subtle", - "zeroize", -] - -[[package]] -name = "rustls-pki-types" -version = "1.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f4925028c7eb5d1fcdaf196971378ed9d2c1c4efc7dc5d011256f76c99c0a96" -dependencies = [ - "zeroize", -] - -[[package]] -name = "rustls-webpki" -version = "0.103.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3c3cf1d8b1e7d4927e2d154c3fcb02979afb9939629c62cd9048d4f07b60ac2" -dependencies = [ - "ring", - "rustls-pki-types", - "untrusted", -] - [[package]] name = "rustversion" version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f" -[[package]] -name = "ruzstd" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7c1c839d570d835527c9a5e4db7cb2198683a988cb9d7293fc8674e6bd58fc8" -dependencies = [ - "twox-hash", -] - [[package]] name = "ryu" version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" -[[package]] -name = "safe_arch" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96b02de82ddbe1b636e6170c21be622223aea188ef2e139be0a5b219ec215323" -dependencies = [ - "bytemuck", -] - -[[package]] -name = "safe_arch" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42c6efa15875e6ecb39ca61fb0b0c1a40b84fac5a5ffe71eef7d1000c8eb3f5f" -dependencies = [ - "bytemuck", -] - [[package]] name = "same-file" version = "1.0.6" @@ -5088,12 +3146,6 @@ version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" -[[package]] -name = "seq-macro" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bc711410fbe7399f390ca1c3b60ad0f53f80e95c5eb935e52268a0e2cd49acc" - [[package]] name = "serde" version = "1.0.229" @@ -5189,19 +3241,6 @@ dependencies = [ "libc", ] -[[package]] -name = "simba" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c99284beb21666094ba2b75bbceda012e610f5479dfcc2d6e2426f53197ffd95" -dependencies = [ - "approx", - "num-complex", - "num-traits", - "paste", - "wide 0.7.33", -] - [[package]] name = "simd-adler32" version = "0.3.10" @@ -5218,15 +3257,6 @@ dependencies = [ "simdutf8", ] -[[package]] -name = "simd_helpers" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95890f873bec569a0362c235787f3aca6e1e887302ba4840839bcc6459c42da6" -dependencies = [ - "quote", -] - [[package]] name = "simdutf8" version = "0.1.5" @@ -5270,22 +3300,6 @@ version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b3dc8af474f516a851ff4bd12db780f948b9250ad37211e4eec0bccea54e01b" -[[package]] -name = "smartcore" -version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95448e4a8d52c5fb6a738005deaa11e16cd963d85406610673fde23d80653240" -dependencies = [ - "approx", - "cfg-if", - "num", - "num-traits", - "ordered-float 5.5.0", - "rand 0.8.8", - "serde", - "typetag", -] - [[package]] name = "smithay-client-toolkit" version = "0.19.2" @@ -5358,12 +3372,6 @@ dependencies = [ "serde", ] -[[package]] -name = "snap" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "199905e6153d6405f9728fe44daace35f8f837bbf830bb6e85fbd5828709a886" - [[package]] name = "spade" version = "2.15.1" @@ -5397,41 +3405,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" -[[package]] -name = "strength_reduce" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe895eb47f22e2ddd4dabc02bce419d2e643c8e3b585c78158b349195bc24d82" - [[package]] name = "strict-num" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6637bab7722d379c8b41ba849228d680cc12d0a45ba1fa2b48f2a30577a06731" -[[package]] -name = "strsim" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" - -[[package]] -name = "subtle" -version = "2.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" - -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - [[package]] name = "syn" version = "2.0.119" @@ -5454,17 +3433,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "synstructure" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "901704edd0dfe137f1987838ee4f259e4e063c31371bdb423f7ae38ec6f77f02" -dependencies = [ - "proc-macro2", - "quote", - "syn 3.0.7", -] - [[package]] name = "sys-locale" version = "0.3.2" @@ -5477,23 +3445,6 @@ dependencies = [ "web-sys", ] -[[package]] -name = "tap" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" - -[[package]] -name = "tar" -version = "0.4.46" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f6221d9a6003c78398e3b239969f352578258df48c8eb051caadae0015bc840" -dependencies = [ - "filetime", - "libc", - "xattr", -] - [[package]] name = "tempfile" version = "3.27.0" @@ -5556,17 +3507,6 @@ dependencies = [ "syn 3.0.7", ] -[[package]] -name = "thrift" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e54bc85fc7faa8bc175c4bab5b92ba8d9a3ce893d0e9f42cc455c8ab16a9e09" -dependencies = [ - "byteorder", - "integer-encoding 3.0.4", - "ordered-float 2.10.1", -] - [[package]] name = "tiff" version = "0.11.3" @@ -5592,7 +3532,6 @@ dependencies = [ "powerfmt", "serde_core", "time-core", - "time-macros", ] [[package]] @@ -5601,25 +3540,6 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e1c906769ad99c88eaa54e728060edef082f8e358ff32030cb7c7d315e81109" -[[package]] -name = "time-macros" -version = "0.2.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e689342a48d2ea927c87ea50cabf8594854bf940e9310208848d680d668ed85" -dependencies = [ - "num-conv", - "time-core", -] - -[[package]] -name = "tiny-keccak" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" -dependencies = [ - "crunchy", -] - [[package]] name = "tiny-skia" version = "0.12.0" @@ -5631,7 +3551,7 @@ dependencies = [ "bytemuck", "cfg-if", "log", - "png 0.18.1", + "png", "tiny-skia-path", ] @@ -5646,16 +3566,6 @@ dependencies = [ "strict-num", ] -[[package]] -name = "tinystr" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1e27c91459209c2986af3dcf603a5a74a4368754ce37414f59acc971167f643" -dependencies = [ - "displaydoc", - "zerovec", -] - [[package]] name = "tokio" version = "1.53.2" @@ -5673,17 +3583,11 @@ checksum = "20489e00e4d8741d6be680764cc12e270655e375a20d1011e844a9c3379e678d" dependencies = [ "serde_core", "serde_spanned", - "toml_datetime 1.1.2+spec-1.1.0", + "toml_datetime", "toml_parser", - "winnow 1.0.4", + "winnow", ] -[[package]] -name = "toml_datetime" -version = "0.6.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" - [[package]] name = "toml_datetime" version = "1.1.2+spec-1.1.0" @@ -5693,17 +3597,6 @@ dependencies = [ "serde_core", ] -[[package]] -name = "toml_edit" -version = "0.19.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" -dependencies = [ - "indexmap", - "toml_datetime 0.6.11", - "winnow 0.5.40", -] - [[package]] name = "toml_edit" version = "0.25.17+spec-1.1.0" @@ -5711,9 +3604,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3641d5bbb5349a79e1020a242d251efbc546ad8048d133958323ce9c40a9c9c" dependencies = [ "indexmap", - "toml_datetime 1.1.2+spec-1.1.0", + "toml_datetime", "toml_parser", - "winnow 1.0.4", + "winnow", ] [[package]] @@ -5722,7 +3615,7 @@ version = "1.1.5+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baa693a8032d7e1cada7d0041e96126df243179ff061456783ac7f12bda4744c" dependencies = [ - "winnow 1.0.4", + "winnow", ] [[package]] @@ -5757,28 +3650,12 @@ dependencies = [ "once_cell", ] -[[package]] -name = "transpose" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad61aed86bc3faea4300c7aee358b4c6d0c8d6ccc36524c96e4c92ccf26e77e" -dependencies = [ - "num-integer", - "strength_reduce", -] - [[package]] name = "ttf-parser" version = "0.25.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2df906b07856748fa3f6e0ad0cbaa047052d4a7dd609e231c4f72cee8c36f31" -[[package]] -name = "twox-hash" -version = "2.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86a801b3cea342a06d468c8710662aa29e5e05e4f5c0d62f00bbb7f2ad7941c2" - [[package]] name = "type-map" version = "0.5.1" @@ -5788,48 +3665,6 @@ dependencies = [ "rustc-hash 2.1.3", ] -[[package]] -name = "typed-path" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e28f89b80c87b8fb0cf04ab448d5dd0dd0ade2f8891bae878de66a75a28600e" - -[[package]] -name = "typeid" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc7d623258602320d5c55d1bc22793b57daff0ec7efc270ea7d55ce1d5f5471c" - -[[package]] -name = "typenum" -version = "1.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20" - -[[package]] -name = "typetag" -version = "0.2.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c90e86058a30d42a1a928dfb4b49bb33c98c3a2b4909492e6b0881cd94798ec2" -dependencies = [ - "erased-serde", - "inventory", - "once_cell", - "serde", - "typetag-impl", -] - -[[package]] -name = "typetag-impl" -version = "0.2.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f153acc4e99a5f2a5aefa09fb078be54e26271b2813f6041200b224c098d8328" -dependencies = [ - "proc-macro2", - "quote", - "syn 3.0.7", -] - [[package]] name = "uds_windows" version = "1.2.1" @@ -5865,73 +3700,14 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" -[[package]] -name = "untrusted" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" - -[[package]] -name = "unty" -version = "0.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d49784317cd0d1ee7ec5c716dd598ec5b4483ea832a2dced265471cc0f690ae" - -[[package]] -name = "ureq" -version = "2.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02d1a66277ed75f640d608235660df48c8e3c19f3b4edb6a263315626cc3c01d" -dependencies = [ - "base64", - "flate2", - "log", - "once_cell", - "rustls", - "rustls-pki-types", - "serde", - "serde_json", - "url", - "webpki-roots 0.26.11", -] - -[[package]] -name = "url" -version = "2.5.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" -dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", - "serde", -] - -[[package]] -name = "utf8_iter" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" - [[package]] name = "uuid" version = "1.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cc1186384beb7dd8eedea376413fd654937285ea6c9cfbb928dc3043ea4b606" -dependencies = [ - "js-sys", - "serde_core", - "wasm-bindgen", -] - -[[package]] -name = "v_frame" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "666b7727c8875d6ab5db9533418d7c764233ac9c0cff1d469aec8fa127597be2" +checksum = "7cc1186384beb7dd8eedea376413fd654937285ea6c9cfbb928dc3043ea4b606" dependencies = [ - "aligned-vec", - "num-traits", + "js-sys", + "serde_core", "wasm-bindgen", ] @@ -5968,12 +3744,6 @@ version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" -[[package]] -name = "virtue" -version = "0.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "051eb1abcf10076295e815102942cc58f9d5e3b4560e46e53c21e8ff6f3af7b1" - [[package]] name = "walkdir" version = "2.5.0" @@ -5984,12 +3754,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "wasi" -version = "0.11.1+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" - [[package]] name = "wasip2" version = "1.0.4+wasi-0.2.12" @@ -6190,157 +3954,6 @@ dependencies = [ "pkg-config", ] -[[package]] -name = "wbcore" -version = "0.1.1" -source = "git+https://github.com/opengeos/whitebox-wasm#a32201b4c937abdbeed452b47c675be12613a988" -dependencies = [ - "serde", - "serde_json", - "thiserror 1.0.69", -] - -[[package]] -name = "wbgeotiff" -version = "0.1.2" -source = "git+https://github.com/opengeos/whitebox-wasm#a32201b4c937abdbeed452b47c675be12613a988" -dependencies = [ - "flate2", - "jpeg-decoder", - "jpeg-encoder 0.6.1", - "jxl-oxide", - "lz4_flex 0.11.6", - "png 0.17.16", - "rayon", - "thiserror 1.0.69", - "webp-rust", - "weezl", - "zune-core", - "zune-jpegxl", -] - -[[package]] -name = "wbhdf" -version = "0.1.0" -source = "git+https://github.com/opengeos/whitebox-wasm#a32201b4c937abdbeed452b47c675be12613a988" -dependencies = [ - "byteorder", - "flate2", - "miniz_oxide 0.8.9", - "thiserror 1.0.69", -] - -[[package]] -name = "wblidar" -version = "0.1.2" -source = "git+https://github.com/opengeos/whitebox-wasm#a32201b4c937abdbeed452b47c675be12613a988" -dependencies = [ - "rayon", - "wbhdf", - "wbprojection", - "wide 1.7.1", -] - -[[package]] -name = "wbprojection" -version = "0.3.0" -source = "git+https://github.com/opengeos/whitebox-wasm#a32201b4c937abdbeed452b47c675be12613a988" -dependencies = [ - "thiserror 1.0.69", - "wide 1.7.1", -] - -[[package]] -name = "wbraster" -version = "0.2.0" -source = "git+https://github.com/opengeos/whitebox-wasm#a32201b4c937abdbeed452b47c675be12613a988" -dependencies = [ - "flate2", - "jpeg-decoder", - "jpeg-encoder 0.7.1", - "lz4_flex 0.13.1", - "png 0.18.1", - "rayon", - "ruzstd", - "serde", - "serde_json", - "tar", - "thiserror 2.0.21", - "wbgeotiff", - "wbhdf", - "wbprojection", - "wide 1.7.1", - "zip", -] - -[[package]] -name = "wbspatialstats" -version = "0.1.0" -source = "git+https://github.com/opengeos/whitebox-wasm#a32201b4c937abdbeed452b47c675be12613a988" -dependencies = [ - "log", - "nalgebra", - "ndarray", - "rand 0.8.8", - "rayon", - "serde", - "serde_json", - "thiserror 1.0.69", -] - -[[package]] -name = "wbtools_oss" -version = "0.1.2" -source = "git+https://github.com/opengeos/whitebox-wasm#a32201b4c937abdbeed452b47c675be12613a988" -dependencies = [ - "bincode", - "chrono", - "evalexpr", - "image", - "kdtree", - "nalgebra", - "rand 0.10.3", - "rayon", - "rustfft", - "serde", - "serde_json", - "smartcore", - "time", - "ureq", - "wbcore", - "wbgeotiff", - "wblidar", - "wbprojection", - "wbraster", - "wbspatialstats", - "wbtopology", - "wbvector", - "wide 1.7.1", -] - -[[package]] -name = "wbtopology" -version = "0.2.0" -source = "git+https://github.com/opengeos/whitebox-wasm#a32201b4c937abdbeed452b47c675be12613a988" -dependencies = [ - "rayon", - "robust", - "wbvector", -] - -[[package]] -name = "wbvector" -version = "0.1.4" -source = "git+https://github.com/opengeos/whitebox-wasm#a32201b4c937abdbeed452b47c675be12613a988" -dependencies = [ - "bytes", - "flatbuffers 24.12.23", - "parquet", - "serde_json", - "thiserror 1.0.69", - "wbprojection", -] - [[package]] name = "web-sys" version = "0.3.106" @@ -6361,33 +3974,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "webp-rust" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d5967f27dbd1796f7ca3f9f555500ed7ae4aef4c153bf1f8e9e8a72751ed1b4" -dependencies = [ - "bin-rs", -] - -[[package]] -name = "webpki-roots" -version = "0.26.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "521bc38abb08001b01866da9f51eb7c5d647a19260e00054a8c7fd5f9e57f7a9" -dependencies = [ - "webpki-roots 1.0.9", -] - -[[package]] -name = "webpki-roots" -version = "1.0.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dcd9d09a39985f5344844e66b0c530a33843579125f23e21e9f0f220850f22a" -dependencies = [ - "rustls-pki-types", -] - [[package]] name = "weezl" version = "0.1.12" @@ -6529,7 +4115,7 @@ dependencies = [ "objc2-metal 0.3.2", "objc2-quartz-core 0.3.2", "once_cell", - "ordered-float 5.5.0", + "ordered-float", "parking_lot", "portable-atomic", "portable-atomic-util", @@ -6577,26 +4163,6 @@ dependencies = [ "web-sys", ] -[[package]] -name = "wide" -version = "0.7.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ce5da8ecb62bcd8ec8b7ea19f69a51275e91299be594ea5cc6ef7819e16cd03" -dependencies = [ - "bytemuck", - "safe_arch 0.7.4", -] - -[[package]] -name = "wide" -version = "1.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d920ac99c3c8edce110cb8d07dbb324d6d026011dce85b1e9355b70f0adacc4f" -dependencies = [ - "bytemuck", - "safe_arch 1.2.0", -] - [[package]] name = "winapi-util" version = "0.1.11" @@ -6932,15 +4498,6 @@ dependencies = [ "xkbcommon-dl", ] -[[package]] -name = "winnow" -version = "0.5.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" -dependencies = [ - "memchr", -] - [[package]] name = "winnow" version = "1.0.4" @@ -6956,21 +4513,6 @@ version = "0.57.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" -[[package]] -name = "writeable" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ad82d2a33cdc9674dc7465672f271e096168fcdbe0f799d9e6db8c5892679dc" - -[[package]] -name = "wyz" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" -dependencies = [ - "tap", -] - [[package]] name = "x11-dl" version = "2.21.0" @@ -7003,16 +4545,6 @@ version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea6fc2961e4ef194dcbfe56bb845534d0dc8098940c7e5c012a258bfec6701bd" -[[package]] -name = "xattr" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32e45ad4206f6d2479085147f02bc2ef834ac85886624a23575ae137c8aa8156" -dependencies = [ - "libc", - "rustix 1.1.5", -] - [[package]] name = "xcursor" version = "0.3.11" @@ -7048,35 +4580,6 @@ checksum = "e450f9b2ed1dff33c94c12589a87338689467b9c4f5d8a5710bd09a847d2c8a7" name = "xtask" version = "0.1.0" -[[package]] -name = "y4m" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5a4b21e1a62b67a2970e6831bc091d7b87e119e7f9791aef9702e3bef04448" - -[[package]] -name = "yoke" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "709fe23a0424b6a435d82152b1bd3fdfb0833487d5fa90d05d42762a9891fef5" -dependencies = [ - "stable_deref_trait", - "yoke-derive", - "zerofrom", -] - -[[package]] -name = "yoke-derive" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec8ebde2db3681e8c9980cc27822030e68752690ddfa9473e739aeb4dbde6d71" -dependencies = [ - "proc-macro2", - "quote", - "syn 3.0.7", - "synstructure", -] - [[package]] name = "zbus" version = "5.19.0" @@ -7106,7 +4609,7 @@ dependencies = [ "uds_windows", "uuid", "windows-sys 0.61.2", - "winnow 1.0.4", + "winnow", "zbus_macros", "zbus_names", "zvariant", @@ -7142,7 +4645,7 @@ version = "5.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2990635d09ade6df1868f72f8cac69a876a90981e8bd3c40b1be413f8dc88f40" dependencies = [ - "proc-macro-crate 3.5.0", + "proc-macro-crate", "proc-macro2", "quote", "syn 3.0.7", @@ -7158,7 +4661,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d8bf88b4a3ff53e883001e0e0115b297a9d53c31b9c1edd2bfdd853e3428624e" dependencies = [ "serde", - "winnow 1.0.4", + "winnow", "zvariant", ] @@ -7169,7 +4672,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d1586c021a01ca0a9216dcd874e546382e156a5cbab5fab6cb5f10087e22682a" dependencies = [ "serde", - "winnow 1.0.4", + "winnow", "zbus_names", "zvariant", ] @@ -7203,80 +4706,6 @@ dependencies = [ "syn 2.0.119", ] -[[package]] -name = "zerofrom" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ec05a11813ea801ff6d75110ad09cd0824ddba17dfe17128ea0d5f68e6c5272" -dependencies = [ - "zerofrom-derive", -] - -[[package]] -name = "zerofrom-derive" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f75b4683f6c7f45248d4d64056a24298c6281e0993356d7d1b4a1a962ef10d4a" -dependencies = [ - "proc-macro2", - "quote", - "syn 3.0.7", - "synstructure", -] - -[[package]] -name = "zeroize" -version = "1.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13084392c5e4bc371903e2935a5eaeed24905a7511356b883835e18a78f6879" - -[[package]] -name = "zerotrie" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ea269c3bd32f0a32c321907a2ae912ba6f4649bb0fc764a15627e99a7095a3f" -dependencies = [ - "displaydoc", - "yoke", - "zerofrom", -] - -[[package]] -name = "zerovec" -version = "0.11.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb0464e17806c1d976d5cba29399c7f08e516e279e2ba493f63123b5fca67dd8" -dependencies = [ - "yoke", - "zerofrom", - "zerovec-derive", -] - -[[package]] -name = "zerovec-derive" -version = "0.11.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34df6fc39dbd26ddc9c10e6a2984476e13acce22e64e4487636ef494369225da" -dependencies = [ - "proc-macro2", - "quote", - "syn 3.0.7", -] - -[[package]] -name = "zip" -version = "8.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d04a6b5381502aa6087c94c669499eb1602eb9c5e8198e534de571f7154809b" -dependencies = [ - "crc32fast", - "flate2", - "indexmap", - "memchr", - "typed-path", - "zopfli", -] - [[package]] name = "zlib-rs" version = "0.6.8" @@ -7289,80 +4718,12 @@ version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b" -[[package]] -name = "zopfli" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f05cd8797d63865425ff89b5c4a48804f35ba0ce8d125800027ad6017d2b5249" -dependencies = [ - "bumpalo", - "crc32fast", - "log", - "simd-adler32", -] - -[[package]] -name = "zstd" -version = "0.11.2+zstd.1.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" -dependencies = [ - "zstd-safe 5.0.2+zstd.1.5.2", -] - -[[package]] -name = "zstd" -version = "0.13.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e91ee311a569c327171651566e07972200e76fcfe2242a4fa446149a3881c08a" -dependencies = [ - "zstd-safe 7.3.0", -] - -[[package]] -name = "zstd-safe" -version = "5.0.2+zstd.1.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" -dependencies = [ - "libc", - "zstd-sys", -] - -[[package]] -name = "zstd-safe" -version = "7.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64d80649ab6db9d9f6f9c80a40becd948eda4714a0a5ac8c4d157a32231c7882" -dependencies = [ - "zstd-sys", -] - -[[package]] -name = "zstd-sys" -version = "2.1.1+zstd.1.5.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aeec9eaf2dffbbd09201e23bd0ffcbaa33bb8e9266a10734fd7ed90a85eca078" -dependencies = [ - "cc", - "pkg-config", -] - [[package]] name = "zune-core" version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d56377fd46368984a170bc5aac5567e52ca5da874caa60bea39fcbca78fb658b" -[[package]] -name = "zune-inflate" -version = "0.2.54" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73ab332fe2f6680068f3582b16a24f90ad7096d5d39b974d1c0aff0125116f02" -dependencies = [ - "simd-adler32", -] - [[package]] name = "zune-jpeg" version = "0.5.15" @@ -7372,15 +4733,6 @@ dependencies = [ "zune-core", ] -[[package]] -name = "zune-jpegxl" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cba11ecd07cc23351500e840ae03841b7e4997923ec8e4832ee3ae199ea0b6b4" -dependencies = [ - "zune-core", -] - [[package]] name = "zvariant" version = "5.15.0" @@ -7390,7 +4742,7 @@ dependencies = [ "endi", "enumflags2", "serde", - "winnow 1.0.4", + "winnow", "zcheapstr", "zvariant_derive", "zvariant_utils", @@ -7402,7 +4754,7 @@ version = "5.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "864155e69b4352db0c7f374917bf45d1e0c8d17659c8b3dbf9795f3673f8c497" dependencies = [ - "proc-macro-crate 3.5.0", + "proc-macro-crate", "proc-macro2", "quote", "syn 3.0.7", @@ -7419,5 +4771,5 @@ dependencies = [ "quote", "serde", "syn 3.0.7", - "winnow 1.0.4", + "winnow", ] diff --git a/README.md b/README.md index a545a0d875..dc94cb821b 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ Every screenshot is RustGIS itself, rendered offscreen by `cargo run -p rustgis- | **Labeling** | Per-layer labels with field, size, colour, bold and halo; collision-free placement | | **Selection** | Click and box select (add/remove), Select By Attributes with live SQL validation, Select By Location, switch/clear/zoom to selection, layer from selection | | **Editing** | Create points, lines and polygons; delete; edit cells in the attribute table; add, delete and calculate fields; undo/redo for everything | -| **Analysis** | Buffer, Clip, Erase, Dissolve, Minimum Bounding Geometry, Feature To Point, Simplify, Summarize Within, Calculate Geometry, Summary Statistics, Export Features; plus 1,000+ raster, vector, LiDAR, hydrology and terrain tools from the [GeoLibre](https://github.com/opengeos/geolibre-rust) suite (desktop and command line) | +| **Analysis** | Buffer, Clip, Erase, Dissolve, Minimum Bounding Geometry, Feature To Point, Simplify, Summarize Within, Calculate Geometry, Summary Statistics, Export Features; plus 1,000+ raster, vector, LiDAR, hydrology and terrain tools from the [GeoLibre](https://github.com/opengeos/geolibre-rust) suite (desktop and command line, with the optional GeoLibre runner download) | | **Inquiry** | Identify pop-ups, geodesic distance and area measurement, live coordinates (DD or DMS) | | **Share** | PNG export with labels and a scale bar at any DPI; export layers to GeoJSON/CSV | | **Productivity** | Command search (Ctrl+K), keyboard shortcuts, dark mode, Catalog pane with folder browsing | diff --git a/crates/analysis/src/lib.rs b/crates/analysis/src/lib.rs index 4b6bc995a0..e930512ee2 100644 --- a/crates/analysis/src/lib.rs +++ b/crates/analysis/src/lib.rs @@ -127,7 +127,9 @@ pub type ExternalRunner = fn(&ToolSpec, &dyn Inputs, &Value) -> Result Vec; static PROVIDER: std::sync::OnceLock<(ExternalProvider, ExternalRunner)> = std::sync::OnceLock::new(); -static EXTERNAL: std::sync::OnceLock> = std::sync::OnceLock::new(); +/// The loaded external tools. Each load is leaked (it lives as long as the app, and reloads are +/// rare: the user installs or locates the suite), so specs can be handed out as `&'static`. +static EXTERNAL: std::sync::RwLock> = std::sync::RwLock::new(None); /// Adds an external tool suite. Only the first registration counts; the provider runs lazily, /// so registering costs nothing until a tool list is needed. @@ -137,14 +139,31 @@ pub fn register_external(provider: ExternalProvider, runner: ExternalRunner) { /// The external tools (empty when none are registered). pub fn external_tools() -> &'static [ToolSpec] { - match PROVIDER.get() { - Some((provider, _)) => EXTERNAL.get_or_init(|| { - std::panic::catch_unwind(provider).unwrap_or_else(|_| { + let Some((provider, _)) = PROVIDER.get() else { return &[] }; + if let Ok(cur) = EXTERNAL.read() + && let Some(tools) = *cur + { + return tools; + } + let tools: &'static [ToolSpec] = Box::leak( + std::panic::catch_unwind(provider) + .unwrap_or_else(|_| { log::error!("the external tool suite failed to load"); Vec::new() }) - }), - None => &[], + .into_boxed_slice(), + ); + match EXTERNAL.write() { + Ok(mut cur) => cur.get_or_insert(tools), + Err(_) => tools, + } +} + +/// Loads the external tools again the next time they're needed (the suite was installed, +/// located or removed). +pub fn reload_external() { + if let Ok(mut cur) = EXTERNAL.write() { + *cur = None; } } diff --git a/crates/engine/src/cmd/gp.rs b/crates/engine/src/cmd/gp.rs index 452a372f5d..1aa7b523c8 100644 --- a/crates/engine/src/cmd/gp.rs +++ b/crates/engine/src/cmd/gp.rs @@ -21,6 +21,10 @@ pub fn commands() -> Vec { )) }) .view(), + C::new("gp.geolibre", "GeoLibre Tools", "Analysis › Geoprocessing", |_, _| Ok(geolibre_status())).view(), + C::new("gp.setGeolibre", "Locate GeoLibre Runner", "Analysis › Geoprocessing", set_geolibre) + .view() + .params(r#"{"path"?: "the geolibre executable (empty: look in the usual places)"}"#), C::new("gp.clearHistory", "Clear History", "Analysis › Geoprocessing › History", |s, _| { s.project.gp_history.clear(); Ok(Value::Null) @@ -28,6 +32,39 @@ pub fn commands() -> Vec { ] } +/// Whether the GeoLibre tools are available: the runner in use, its version and tool count. +pub fn geolibre_status() -> Value { + #[cfg(feature = "geolibre")] + { + let found = rustgis_geolibre::runner::find(); + json!({ + "supported": true, + "available": found.is_some(), + "path": found.as_ref().map(|(p, _)| p.display().to_string()), + "version": found.map(|(_, v)| v), + "tools": rustgis_analysis::external_tools().len(), + "download": rustgis_geolibre::runner::DOWNLOAD_URL, + }) + } + #[cfg(not(feature = "geolibre"))] + json!({"supported": false, "available": false}) +} + +/// Chooses the GeoLibre runner (an optional download), or looks for it again. +fn set_geolibre(_s: &mut Session, p: &Value) -> CmdResult { + #[cfg(feature = "geolibre")] + { + let path = ps(p, "path").map(str::trim).filter(|p| !p.is_empty()).map(std::path::PathBuf::from); + rustgis_geolibre::set_runner(path)?; + Ok(geolibre_status()) + } + #[cfg(not(feature = "geolibre"))] + { + let _ = p; + Err("this build doesn't include the GeoLibre tools".into()) + } +} + struct MapInputs<'a>(&'a rustgis_map::Map, &'a [Dataset]); impl Inputs for MapInputs<'_> { diff --git a/crates/engine/src/tests.rs b/crates/engine/src/tests.rs index 61536ce12e..ca55ecebe6 100644 --- a/crates/engine/src/tests.rs +++ b/crates/engine/src/tests.rs @@ -367,6 +367,16 @@ fn hostile_params_never_panic() { #[test] fn geolibre_tools_run_on_layers_and_add_their_outputs() { let mut s = with_raster(); + let st = s.run("gp.geolibre", &Value::Null).unwrap(); + assert_eq!(st["supported"], true); + assert!(s.run("gp.setGeolibre", &json!({"path": "/no/such/geolibre"})).is_err(), "not a runner"); + let undo = s.undo_label(); + s.run("gp.setGeolibre", &json!({"path": ""})).unwrap(); + assert_eq!(s.undo_label(), undo, "choosing a runner isn't an edit"); + if st["available"] != true { + eprintln!("skipped: no GeoLibre runner (set RUSTGIS_GEOLIBRE)"); + return; + } let tools = s.run("gp.tools", &Value::Null).unwrap(); assert!(tools.as_array().unwrap().iter().any(|t| t["id"] == "geolibre:slope")); let before = s.map().layers.len(); diff --git a/crates/geolibre/Cargo.toml b/crates/geolibre/Cargo.toml index 4514c874b8..78aae04ace 100644 --- a/crates/geolibre/Cargo.toml +++ b/crates/geolibre/Cargo.toml @@ -3,7 +3,7 @@ name = "rustgis-geolibre" version.workspace = true edition.workspace = true license.workspace = true -description = "RustGIS L2: the GeoLibre/Whitebox tool suite (1,000+ raster, vector, LiDAR and hydrology tools) as geoprocessing tools" +description = "RustGIS L3: the GeoLibre/Whitebox tool suite (1,000+ raster, vector, LiDAR and hydrology tools) as geoprocessing tools, through the optional geolibre runner" [lints] workspace = true @@ -14,6 +14,3 @@ rustgis-data = { workspace = true } rustgis-analysis = { workspace = true } serde_json = { workspace = true } log = { workspace = true } -# The tool registry and its manifests; native only (the tools read and write files). -# Pinned to a commit on main so the suite can't change under a build. -geolibre-cli = { git = "https://github.com/opengeos/geolibre-rust", rev = "3cb8ac3771f0a055510ab5e0a86bd00315058c57" } diff --git a/crates/geolibre/src/lib.rs b/crates/geolibre/src/lib.rs index db8041df6e..b62289c153 100644 --- a/crates/geolibre/src/lib.rs +++ b/crates/geolibre/src/lib.rs @@ -1,9 +1,11 @@ //! L2: the GeoLibre tool suite (Whitebox's tools plus GeoLibre's own: 1,000+ raster, vector, //! LiDAR, hydrology and terrain tools) as geoprocessing tools. //! -//! [`register`] adds them to [`rustgis_analysis`], which lists them next to the built-in tools -//! under "GeoLibre ›" toolboxes. Their forms come from the suite's manifests: each parameter -//! says whether it is a raster or vector input, an output, a choice, a number or a switch. +//! The suite is an optional download: the `geolibre` runner, a separate executable (see +//! [`runner`]). [`register`] adds its tools to [`rustgis_analysis`], which lists them next to +//! the built-in tools under "GeoLibre ›" toolboxes; without a runner there are none. Their +//! forms come from the runner's manifests: each parameter says whether it is a raster or vector +//! input, an output, a choice, a number or a switch. //! //! The tools read and write files, so a run stages its inputs in a temporary folder: raster //! layers as their own file (or the embedded copy), vector layers as GeoJSON. Vector data goes @@ -16,12 +18,12 @@ //! are always written to the run's own scratch folder. #![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)] +pub mod runner; + use std::collections::HashMap; use std::path::{Path, PathBuf}; -use std::sync::{Mutex, OnceLock}; +use std::sync::Mutex; -use geolibre_cli::ToolRegistry; -use geolibre_cli::wbcore::{AllowAllCapabilities, ProgressSink, ToolArgs, ToolContext}; use rustgis_analysis::{Inputs, Output, OutputLayer, ParamKind, ParamSpec, ToolResult, ToolSpec}; use rustgis_data::raster::{Crs, Transformer}; use rustgis_data::{Coord, Dataset, Extent}; @@ -30,15 +32,18 @@ use serde_json::{Value, json}; /// Tool ids get this prefix, so they never clash with the built-in tools. pub const PREFIX: &str = "geolibre:"; -/// Adds the suite to the geoprocessing tools. The registry and manifests load the first time -/// the tools are listed. +/// Adds the suite to the geoprocessing tools. The runner is found and its manifests read the +/// first time the tools are listed. pub fn register() { rustgis_analysis::register_external(specs, run); } -fn registry() -> &'static ToolRegistry { - static REGISTRY: OnceLock = OnceLock::new(); - REGISTRY.get_or_init(geolibre_cli::build_registry) +/// Uses `exe` as the runner (`None`: look in the usual places), and reloads the tool list. +/// Returns the runner in use and its version. +pub fn set_runner(exe: Option) -> Result, String> { + let found = runner::choose(exe)?; + rustgis_analysis::reload_external(); + Ok(found) } /// What a parameter is for. @@ -96,7 +101,7 @@ struct Meta { params: Vec, } -static META: OnceLock> = OnceLock::new(); +static META: Mutex>> = Mutex::new(None); fn leak(s: impl Into) -> &'static str { Box::leak(s.into().into_boxed_str()) @@ -109,10 +114,14 @@ fn label_of(name: &str) -> String { c.next().map(|f| f.to_uppercase().chain(c).collect()).unwrap_or_default() } -/// Builds every tool's spec from the suite's manifests (once). +/// Builds every tool's spec from the runner's manifests (none without a runner). fn specs() -> Vec { + let manifests = runner::manifests().unwrap_or_else(|e| { + log::info!("GeoLibre tools: {e}"); + Vec::new() + }); let mut meta = HashMap::new(); - let mut out: Vec = geolibre_cli::manifests_json(registry()) + let mut out: Vec = manifests .iter() .filter_map(|m| { let (spec, info) = spec_of(m)?; @@ -120,7 +129,9 @@ fn specs() -> Vec { Some(spec) }) .collect(); - let _ = META.set(meta); + if let Ok(mut m) = META.lock() { + *m = Some(meta); + } out.sort_by(|a, b| a.toolbox.cmp(b.toolbox).then(a.name.cmp(b.name))); out } @@ -230,21 +241,6 @@ impl Drop for Scratch { } } -/// Collects a tool's messages (bounded: some tools report every row). -#[derive(Default)] -struct Messages(Mutex>); - -impl ProgressSink for Messages { - fn info(&self, msg: &str) { - if let Ok(mut v) = self.0.lock() - && v.len() < 40 - && !msg.trim().is_empty() - { - v.push(msg.trim().to_string()); - } - } -} - /// A file-name-safe version of a layer name. fn safe(name: &str) -> String { let s: String = name.chars().map(|c| if c.is_ascii_alphanumeric() || c == '-' { c } else { '_' }).take(60).collect(); @@ -426,7 +422,9 @@ fn text_message(path: &Path, layer_name: &str, messages: &mut Vec) { fn run(spec: &ToolSpec, inputs: &dyn Inputs, params: &Value) -> Result { let id = spec.id.strip_prefix(PREFIX).ok_or("not a GeoLibre tool")?; - let meta = META.get().and_then(|m| m.get(id)).ok_or_else(|| format!("{}: unknown tool", spec.name))?; + let meta = + META.lock().ok().and_then(|m| m.as_ref().and_then(|m| m.get(id)).cloned()).ok_or_else(|| format!("{}: unknown tool", spec.name))?; + let meta = &meta; let scratch = Scratch::new()?; let value_of = |name: &str| params.get(name).filter(|v| !v.is_null() && v.as_str() != Some("")); let names = |v: &Value| -> Vec { @@ -448,7 +446,7 @@ fn run(spec: &ToolSpec, inputs: &dyn Inputs, params: &Value) -> Result = Vec::new(); let mut outputs = Vec::new(); let n_outputs = meta.params.iter().filter(|p| p.role == Role::Output).count(); for p in &meta.params { @@ -457,28 +455,26 @@ fn run(spec: &ToolSpec, inputs: &dyn Inputs, params: &Value) -> Result, _>>()?; if !paths.is_empty() { - args.insert(p.name.clone(), Value::String(paths.join(";"))); + args.push((p.name.clone(), Value::String(paths.join(";")))); } } Role::Output => { let path = scratch.0.join(format!("{}.{}", safe(&p.name), output_ext(p, meta))); - args.insert(p.name.clone(), Value::String(path.display().to_string())); + args.push((p.name.clone(), Value::String(path.display().to_string()))); let name = if n_outputs > 1 { format!("{} {}", spec.name, label_of(&p.name).to_lowercase()) } else { spec.name.to_string() }; outputs.push((path, name)); } Role::Option => { if let Some(v) = value_of(&p.name) { - args.insert(p.name.clone(), option_value(v, p.data)); + args.push((p.name.clone(), option_value(v, p.data))); } } } } - let progress = Messages::default(); - let ctx = ToolContext { progress: &progress, capabilities: &AllowAllCapabilities }; - let result = registry().run(id, &args, &ctx).map_err(|e| format!("{}: {e}", spec.name))?; - let mut messages = progress.0.into_inner().unwrap_or_default(); + let ran = runner::run(id, &args, &scratch.0).map_err(|e| format!("{}: {e}", spec.name))?; + let mut messages = ran.messages; let mut layers = Vec::new(); for (path, name) in &outputs { @@ -499,7 +495,7 @@ fn run(spec: &ToolSpec, inputs: &dyn Inputs, params: &Value) -> Result continue, Value::String(s) => s.clone(), diff --git a/crates/geolibre/src/runner.rs b/crates/geolibre/src/runner.rs new file mode 100644 index 0000000000..c28157f474 --- /dev/null +++ b/crates/geolibre/src/runner.rs @@ -0,0 +1,152 @@ +//! The `geolibre` runner: a separate executable (an optional download) that runs the tools. +//! +//! RustGIS doesn't link the suite (it would triple the app's size). It runs the runner as a +//! subprocess instead: `geolibre manifests` for the tool forms, `geolibre --k=v …` for a +//! run. A tool that crashes or panics takes only the subprocess down. + +use std::path::{Path, PathBuf}; +use std::process::Command; +use std::sync::Mutex; + +use serde_json::Value; + +/// Where releases with the runner are published. +pub const DOWNLOAD_URL: &str = "https://github.com/opengeos/geolibre-rust/releases/latest"; + +/// The environment variable that names the runner, ahead of every other place. +pub const ENV: &str = "RUSTGIS_GEOLIBRE"; + +fn exe_name() -> &'static str { + if cfg!(windows) { "geolibre.exe" } else { "geolibre" } +} + +/// A runner the user chose (Locate…), ahead of the usual places. +static CHOSEN: Mutex> = Mutex::new(None); + +/// The runner found, with its version, cached until the choice changes. +static FOUND: Mutex>> = Mutex::new(None); + +/// A command for the runner, without a console window on Windows. +fn command(exe: &Path) -> Command { + #[allow(unused_mut)] + let mut c = Command::new(exe); + #[cfg(windows)] + { + use std::os::windows::process::CommandExt; + const CREATE_NO_WINDOW: u32 = 0x0800_0000; + c.creation_flags(CREATE_NO_WINDOW); + } + c +} + +/// The runner's version, if `exe` is a GeoLibre runner (not some other program called geolibre). +pub fn version_of(exe: &Path) -> Option { + if !exe.is_file() { + return None; + } + let out = command(exe).arg("version").output().ok()?; + let text = String::from_utf8_lossy(&out.stdout).trim().to_string(); + (out.status.success() && text.starts_with("geolibre-cli")).then_some(text) +} + +/// The places a runner is looked for, in order. +fn candidates() -> Vec { + let mut v = Vec::new(); + if let Ok(p) = CHOSEN.lock() + && let Some(p) = p.clone() + { + v.push(p); + } + if let Some(p) = std::env::var_os(ENV) { + v.push(PathBuf::from(p)); + } + // Beside the app (a bundle that ships it), or in a `geolibre` folder there. + if let Some(dir) = std::env::current_exe().ok().and_then(|e| e.parent().map(Path::to_path_buf)) { + v.push(dir.join(exe_name())); + v.push(dir.join("geolibre").join(exe_name())); + } + if let Some(path) = std::env::var_os("PATH") { + v.extend(std::env::split_paths(&path).map(|d| d.join(exe_name()))); + } + v +} + +/// The runner to use and its version, or `None` when there isn't one. +pub fn find() -> Option<(PathBuf, String)> { + let Ok(mut found) = FOUND.lock() else { return None }; + if found.is_none() { + *found = Some(candidates().into_iter().find_map(|p| version_of(&p).map(|v| (p, v)))); + } + found.clone().flatten() +} + +/// Uses `exe` as the runner (`None`: look in the usual places again). Fails, keeping the +/// current choice, when `exe` isn't a GeoLibre runner. +pub fn choose(exe: Option) -> Result, String> { + if let Some(p) = &exe + && version_of(p).is_none() + { + return Err(format!("{} is not a GeoLibre runner", p.display())); + } + if let Ok(mut c) = CHOSEN.lock() { + *c = exe; + } + if let Ok(mut f) = FOUND.lock() { + *f = None; + } + Ok(find()) +} + +/// Every tool's manifest, from `geolibre manifests`. +pub fn manifests() -> Result, String> { + let (exe, _) = find().ok_or("the GeoLibre runner isn't installed")?; + let out = command(&exe).arg("manifests").output().map_err(|e| format!("{}: {e}", exe.display()))?; + if !out.status.success() { + return Err(format!("{}: {}", exe.display(), String::from_utf8_lossy(&out.stderr).trim())); + } + match serde_json::from_slice::(&out.stdout) { + Ok(Value::Array(v)) => Ok(v), + _ => Err(format!("{}: unexpected manifests output", exe.display())), + } +} + +/// A parameter value as the runner's `--key=value` text. +pub fn arg_text(v: &Value) -> String { + match v { + Value::String(s) => s.clone(), + other => other.to_string(), + } +} + +/// What a run printed: its messages, and the structured outputs (the last line, JSON). +pub struct Ran { + pub messages: Vec, + pub outputs: serde_json::Map, +} + +/// Runs one tool in `dir`. The error carries what the tool wrote to stderr. +pub fn run(id: &str, args: &[(String, Value)], dir: &Path) -> Result { + let (exe, _) = find().ok_or("the GeoLibre runner isn't installed")?; + let mut c = command(&exe); + c.current_dir(dir).arg(id); + for (k, v) in args { + c.arg(format!("--{k}={}", arg_text(v))); + } + let out = c.output().map_err(|e| format!("{}: {e}", exe.display()))?; + let stdout = String::from_utf8_lossy(&out.stdout); + if !out.status.success() { + let err = String::from_utf8_lossy(&out.stderr); + let err = err.trim(); + let err = if err.is_empty() { "the tool stopped unexpectedly" } else { err }; + return Err(err.lines().take(20).collect::>().join("\n")); + } + let mut lines: Vec<&str> = stdout.lines().map(str::trim).filter(|l| !l.is_empty()).collect(); + let outputs = match lines.last().map(|l| serde_json::from_str::(l)) { + Some(Ok(Value::Object(m))) => { + lines.pop(); + m + } + _ => serde_json::Map::new(), + }; + Ok(Ran { messages: lines.into_iter().take(40).map(str::to_string).collect(), outputs }) +} diff --git a/crates/geolibre/src/tests.rs b/crates/geolibre/src/tests.rs index 8da6653499..68c0dda12b 100644 --- a/crates/geolibre/src/tests.rs +++ b/crates/geolibre/src/tests.rs @@ -41,14 +41,36 @@ impl Inputs for Fixture { } } -fn setup() -> Fixture { +/// The fixture, or `None` (the test is skipped) when no runner is installed: set +/// `RUSTGIS_GEOLIBRE` to a `geolibre` executable, or put one on PATH, to run these. +fn setup() -> Option { register(); - Fixture::new() + if runner::find().is_none() { + eprintln!("skipped: no GeoLibre runner (set {})", runner::ENV); + return None; + } + Some(Fixture::new()) +} + +#[test] +fn runner_values_and_choices() { + assert_eq!(runner::arg_text(&json!("a b")), "a b"); + assert_eq!(runner::arg_text(&json!(true)), "true"); + assert_eq!(runner::arg_text(&json!(2.5)), "2.5"); + // Not a runner: refused, and the choice stays as it was. + let before = runner::find(); + let me = std::env::current_exe().unwrap(); + assert!(runner::version_of(&me).is_none()); + assert!(set_runner(Some(me)).is_err()); + assert!(set_runner(Some(PathBuf::from("/no/such/geolibre"))).is_err()); + assert_eq!(runner::find(), before); + assert_eq!(label_of("z_factor"), "Z factor"); + assert_eq!(safe("a b/c.tif"), "a_b_c_tif"); } #[test] fn manifests_become_tool_forms() { - setup(); + let Some(_) = setup() else { return }; let tools = rustgis_analysis::external_tools(); assert!(tools.len() > 1000, "{}", tools.len()); let slope = rustgis_analysis::tool("geolibre:slope").unwrap(); @@ -65,7 +87,7 @@ fn manifests_become_tool_forms() { #[test] fn slope_runs_on_a_raster_layer() { - let f = setup(); + let Some(f) = setup() else { return }; let r = rustgis_analysis::run("geolibre:slope", &f, &json!({"input": "dem", "units": "degrees"})).unwrap(); // An embedded raster is staged as a file with its extension. assert!(rustgis_analysis::run("geolibre:slope", &f, &json!({"input": "embedded"})).is_ok()); @@ -82,7 +104,7 @@ fn slope_runs_on_a_raster_layer() { #[test] fn vector_tools_work_in_metres_and_return_lonlat() { - let f = setup(); + let Some(f) = setup() else { return }; let r = rustgis_analysis::run("geolibre:buffer_vector", &f, &json!({"input": "pts", "distance": "1000"})).unwrap(); let Output::Layers(layers) = r.output else { panic!("layers") }; let Some(OutputLayer::Vector(ds)) = layers.first() else { panic!("a vector layer: {layers:?}") }; @@ -94,7 +116,7 @@ fn vector_tools_work_in_metres_and_return_lonlat() { #[test] fn rasters_and_points_meet_in_one_coordinate_system() { - let f = setup(); + let Some(f) = setup() else { return }; let r = rustgis_analysis::run("geolibre:extract_raster_values_at_points", &f, &json!({"rasters": "dem", "points": "pts"})).unwrap(); let Output::Layers(layers) = r.output else { panic!("layers") }; let Some(OutputLayer::Vector(ds)) = layers.first() else { panic!("points: {layers:?}") }; @@ -109,7 +131,7 @@ fn rasters_and_points_meet_in_one_coordinate_system() { #[test] fn bad_inputs_are_errors_not_crashes() { - let f = setup(); + let Some(f) = setup() else { return }; assert!(rustgis_analysis::run("geolibre:slope", &f, &json!({})).unwrap_err().contains("required")); assert!(rustgis_analysis::run("geolibre:slope", &f, &json!({"input": "nope"})).unwrap_err().contains("no layer or file")); assert!(rustgis_analysis::run("geolibre:slope", &f, &json!({"input": "pts"})).is_err(), "a vector where a raster belongs"); diff --git a/crates/ui-egui/src/i18n/az.tsv b/crates/ui-egui/src/i18n/az.tsv index 13770dd490..09586f8f02 100644 --- a/crates/ui-egui/src/i18n/az.tsv +++ b/crates/ui-egui/src/i18n/az.tsv @@ -185,6 +185,7 @@ Distance Məsafə Double Double Double-click İki dəfə klik Double-click to add Əlavə etmək üçün iki dəfə klikləyin +Download the GeoLibre runner GeoLibre işlədicisini endir Downloaded {name} {name} endirildi DRA DRA Drag / middle-drag Sürüklə / orta düymə ilə sürüklə @@ -269,6 +270,8 @@ Generalization Ümumiləşdirmə Geo-\nprocessing Geo-\nemal GeoJSON or CSV GeoJSON və ya CSV GeoLibre GeoLibre +GeoLibre Tools GeoLibre alətləri +GeoLibre tools GeoLibre alətləri Geometry Həndəsə Geoprocessing Geoemal Geoprocessing history. Geoemal tarixçəsi. @@ -337,6 +340,9 @@ LineString LineString List Commands Əmrlərin siyahısı Lit İşıqlı Locate Yer tap +Locate GeoLibre Runner GeoLibre işlədicisini tap +Locate the GeoLibre runner GeoLibre işlədicisini tap +Locate… Tap… Location Məkan Long Long Longitude (X) Uzunluq dairəsi (X) @@ -424,6 +430,7 @@ Outline color Kontur rəngi Outline width Kontur qalınlığı Output Çıxış Output Name Çıxış adı +Over 1,000 raster, vector, LiDAR, hydrology and terrain tools, from an optional download: the GeoLibre runner. Unpack it and locate the geolibre program. İstəyə bağlı endirmə ilə 1000-dən çox raster, vektor, LiDAR, hidrologiya və relyef aləti: GeoLibre işlədicisi. Arxivi açın və geolibre proqramını göstərin. Overlay Üst-üstə qoyma Pan (Explore) · any tool Sürüşdür (Kəşf) · istənilən alət Pan to a longitude/latitude. Uzunluq/en dairəsinə sürüşdürün. diff --git a/crates/ui-egui/src/i18n/de.tsv b/crates/ui-egui/src/i18n/de.tsv index 6b4008cefa..88c126b8b1 100644 --- a/crates/ui-egui/src/i18n/de.tsv +++ b/crates/ui-egui/src/i18n/de.tsv @@ -185,6 +185,7 @@ Distance Entfernung Double Double (Dezimalzahl) Double-click Doppelklick Double-click to add Zum Hinzufügen doppelklicken +Download the GeoLibre runner GeoLibre-Runner herunterladen Downloaded {name} {name} heruntergeladen DRA DRA Drag / middle-drag Ziehen / mittlere Maustaste ziehen @@ -269,6 +270,8 @@ Generalization Generalisierung Geo-\nprocessing Geover-\narbeitung GeoJSON or CSV GeoJSON oder CSV GeoLibre GeoLibre +GeoLibre Tools GeoLibre-Werkzeuge +GeoLibre tools GeoLibre-Werkzeuge Geometry Geometrie Geoprocessing Geoverarbeitung Geoprocessing history. Geoverarbeitungsverlauf. @@ -337,6 +340,9 @@ LineString LineString List Commands Befehle auflisten Lit Beleuchtet Locate Lokalisieren +Locate GeoLibre Runner GeoLibre-Runner suchen +Locate the GeoLibre runner GeoLibre-Runner suchen +Locate… Suchen… Location Lage Long Long (Ganzzahl) Longitude (X) Länge (X) @@ -424,6 +430,7 @@ Outline color Umrissfarbe Outline width Umrissbreite Output Ausgabe Output Name Ausgabename +Over 1,000 raster, vector, LiDAR, hydrology and terrain tools, from an optional download: the GeoLibre runner. Unpack it and locate the geolibre program. Über 1.000 Raster-, Vektor-, LiDAR-, Hydrologie- und Geländewerkzeuge als optionaler Download: der GeoLibre-Runner. Entpacken Sie ihn und wählen Sie das Programm geolibre aus. Overlay Überlagerung Pan (Explore) · any tool Verschieben (Erkunden) · jedes Werkzeug Pan to a longitude/latitude. Zu einer Länge/Breite verschieben. diff --git a/crates/ui-egui/src/i18n/es.tsv b/crates/ui-egui/src/i18n/es.tsv index 26d50dd7ba..d01860dc84 100644 --- a/crates/ui-egui/src/i18n/es.tsv +++ b/crates/ui-egui/src/i18n/es.tsv @@ -185,6 +185,7 @@ Distance Distancia Double Doble Double-click Doble clic Double-click to add Doble clic para añadir +Download the GeoLibre runner Descargar el ejecutor de GeoLibre Downloaded {name} {name} descargado DRA DRA Drag / middle-drag Arrastrar / arrastrar con botón central @@ -269,6 +270,8 @@ Generalization Generalización Geo-\nprocessing Geoproce-\nsamiento GeoJSON or CSV GeoJSON o CSV GeoLibre GeoLibre +GeoLibre Tools Herramientas de GeoLibre +GeoLibre tools Herramientas de GeoLibre Geometry Geometría Geoprocessing Geoprocesamiento Geoprocessing history. Historial de geoprocesamiento. @@ -337,6 +340,9 @@ LineString LineString List Commands Listar comandos Lit Iluminado Locate Localizar +Locate GeoLibre Runner Localizar el ejecutor de GeoLibre +Locate the GeoLibre runner Localizar el ejecutor de GeoLibre +Locate… Localizar… Location Ubicación Long Entero largo Longitude (X) Longitud (X) @@ -424,6 +430,7 @@ Outline color Color del contorno Outline width Ancho del contorno Output Salida Output Name Nombre de salida +Over 1,000 raster, vector, LiDAR, hydrology and terrain tools, from an optional download: the GeoLibre runner. Unpack it and locate the geolibre program. Más de 1.000 herramientas ráster, vectoriales, LiDAR, hidrológicas y de terreno, en una descarga opcional: el ejecutor de GeoLibre. Descomprímalo y localice el programa geolibre. Overlay Superposición Pan (Explore) · any tool Desplazar (Explorar) · cualquier herramienta Pan to a longitude/latitude. Desplazarse a una longitud/latitud. diff --git a/crates/ui-egui/src/i18n/fr.tsv b/crates/ui-egui/src/i18n/fr.tsv index 61db885cca..fc19dd6f9a 100644 --- a/crates/ui-egui/src/i18n/fr.tsv +++ b/crates/ui-egui/src/i18n/fr.tsv @@ -185,6 +185,7 @@ Distance Distance Double Réel double Double-click Double-clic Double-click to add Double-cliquez pour ajouter +Download the GeoLibre runner Télécharger l'exécuteur GeoLibre Downloaded {name} {name} téléchargé DRA DRA Drag / middle-drag Glisser / glisser avec le bouton du milieu @@ -269,6 +270,8 @@ Generalization Généralisation Geo-\nprocessing Géo-\ntraitement GeoJSON or CSV GeoJSON ou CSV GeoLibre GeoLibre +GeoLibre Tools Outils GeoLibre +GeoLibre tools Outils GeoLibre Geometry Géométrie Geoprocessing Géotraitement Geoprocessing history. Historique de géotraitement. @@ -337,6 +340,9 @@ LineString LineString List Commands Lister les commandes Lit Éclairé Locate Localiser +Locate GeoLibre Runner Localiser l'exécuteur GeoLibre +Locate the GeoLibre runner Localiser l'exécuteur GeoLibre +Locate… Localiser… Location Localisation Long Entier long Longitude (X) Longitude (X) @@ -424,6 +430,7 @@ Outline color Couleur du contour Outline width Épaisseur du contour Output Sortie Output Name Nom en sortie +Over 1,000 raster, vector, LiDAR, hydrology and terrain tools, from an optional download: the GeoLibre runner. Unpack it and locate the geolibre program. Plus de 1 000 outils raster, vecteur, LiDAR, hydrologie et terrain, en téléchargement facultatif : l'exécuteur GeoLibre. Décompressez-le et localisez le programme geolibre. Overlay Superposition Pan (Explore) · any tool Déplacer (Explorer) · tout outil Pan to a longitude/latitude. Se déplacer vers une longitude/latitude. diff --git a/crates/ui-egui/src/i18n/id.tsv b/crates/ui-egui/src/i18n/id.tsv index a48a6549ae..b6ffb88ef1 100644 --- a/crates/ui-egui/src/i18n/id.tsv +++ b/crates/ui-egui/src/i18n/id.tsv @@ -185,6 +185,7 @@ Distance Jarak Double Double Double-click Klik ganda Double-click to add Klik ganda untuk menambah +Download the GeoLibre runner Unduh runner GeoLibre Downloaded {name} {name} telah diunduh DRA DRA Drag / middle-drag Seret / seret tombol tengah @@ -269,6 +270,8 @@ Generalization Generalisasi Geo-\nprocessing Geo-\nprosesing GeoJSON or CSV GeoJSON atau CSV GeoLibre GeoLibre +GeoLibre Tools Alat GeoLibre +GeoLibre tools Alat GeoLibre Geometry Geometri Geoprocessing Geoprosesing Geoprocessing history. Riwayat geoprosesing. @@ -337,6 +340,9 @@ LineString LineString List Commands Daftar Perintah Lit Terang Locate Temukan Lokasi +Locate GeoLibre Runner Temukan runner GeoLibre +Locate the GeoLibre runner Temukan runner GeoLibre +Locate… Temukan… Location Lokasi Long Long Longitude (X) Bujur (X) @@ -424,6 +430,7 @@ Outline color Warna garis tepi Outline width Lebar garis tepi Output Keluaran Output Name Nama Keluaran +Over 1,000 raster, vector, LiDAR, hydrology and terrain tools, from an optional download: the GeoLibre runner. Unpack it and locate the geolibre program. Lebih dari 1.000 alat raster, vektor, LiDAR, hidrologi, dan medan, dari unduhan opsional: runner GeoLibre. Ekstrak lalu tunjukkan program geolibre. Overlay Overlay Pan (Explore) · any tool Geser (Jelajah) · alat apa pun Pan to a longitude/latitude. Geser ke bujur/lintang. diff --git a/crates/ui-egui/src/i18n/it.tsv b/crates/ui-egui/src/i18n/it.tsv index f7d83dd663..e4387f3abd 100644 --- a/crates/ui-egui/src/i18n/it.tsv +++ b/crates/ui-egui/src/i18n/it.tsv @@ -185,6 +185,7 @@ Distance Distanza Double Decimale Double-click Doppio clic Double-click to add Doppio clic per aggiungere +Download the GeoLibre runner Scarica l'esecutore GeoLibre Downloaded {name} Scaricato {name} DRA DRA Drag / middle-drag Trascina / trascina col tasto centrale @@ -269,6 +270,8 @@ Generalization Generalizzazione Geo-\nprocessing Geo-\nprocessing GeoJSON or CSV GeoJSON o CSV GeoLibre GeoLibre +GeoLibre Tools Strumenti GeoLibre +GeoLibre tools Strumenti GeoLibre Geometry Geometria Geoprocessing Geoprocessing Geoprocessing history. Cronologia del geoprocessing. @@ -337,6 +340,9 @@ LineString LineString List Commands Elenca comandi Lit Illuminato Locate Localizza +Locate GeoLibre Runner Individua l'esecutore GeoLibre +Locate the GeoLibre runner Individua l'esecutore GeoLibre +Locate… Individua… Location Posizione Long Intero lungo Longitude (X) Longitudine (X) @@ -424,6 +430,7 @@ Outline color Colore contorno Outline width Spessore contorno Output Output Output Name Nome output +Over 1,000 raster, vector, LiDAR, hydrology and terrain tools, from an optional download: the GeoLibre runner. Unpack it and locate the geolibre program. Oltre 1.000 strumenti raster, vettoriali, LiDAR, idrologici e del terreno, in un download facoltativo: l'esecutore GeoLibre. Decomprimilo e individua il programma geolibre. Overlay Sovrapposizione Pan (Explore) · any tool Pan (Esplora) · qualsiasi strumento Pan to a longitude/latitude. Sposta la vista su una longitudine/latitudine. diff --git a/crates/ui-egui/src/i18n/ja.tsv b/crates/ui-egui/src/i18n/ja.tsv index 4dc95d17e1..77e8368fd9 100644 --- a/crates/ui-egui/src/i18n/ja.tsv +++ b/crates/ui-egui/src/i18n/ja.tsv @@ -185,6 +185,7 @@ Distance 距離 Double 倍精度 Double-click ダブルクリック Double-click to add ダブルクリックで追加 +Download the GeoLibre runner GeoLibre ランナーをダウンロード Downloaded {name} {name} をダウンロードしました DRA DRA Drag / middle-drag ドラッグ / 中ボタン ドラッグ @@ -269,6 +270,8 @@ Generalization ジェネラライズ Geo-\nprocessing ジオプロ\nセシング GeoJSON or CSV GeoJSON または CSV GeoLibre GeoLibre +GeoLibre Tools GeoLibre ツール +GeoLibre tools GeoLibre ツール Geometry ジオメトリ Geoprocessing ジオプロセシング Geoprocessing history. ジオプロセシングの履歴。 @@ -337,6 +340,9 @@ LineString ライン ストリング List Commands コマンド一覧 Lit 明部 Locate 位置 +Locate GeoLibre Runner GeoLibre ランナーの場所を指定 +Locate the GeoLibre runner GeoLibre ランナーの場所を指定 +Locate… 場所を指定… Location 場所 Long 長整数 Longitude (X) 経度(X) @@ -424,6 +430,7 @@ Outline color アウトラインの色 Outline width アウトラインの幅 Output 出力 Output Name 出力名 +Over 1,000 raster, vector, LiDAR, hydrology and terrain tools, from an optional download: the GeoLibre runner. Unpack it and locate the geolibre program. ラスター、ベクター、LiDAR、水文、地形の 1,000 以上のツールを、オプションのダウンロード (GeoLibre ランナー) で利用できます。展開して geolibre プログラムの場所を指定してください。 Overlay オーバーレイ Pan (Explore) · any tool 画面移動(マップ操作)· 任意のツール Pan to a longitude/latitude. 経度/緯度に画面移動します。 diff --git a/crates/ui-egui/src/i18n/ko.tsv b/crates/ui-egui/src/i18n/ko.tsv index 4dbf62ffda..032878decd 100644 --- a/crates/ui-egui/src/i18n/ko.tsv +++ b/crates/ui-egui/src/i18n/ko.tsv @@ -185,6 +185,7 @@ Distance 거리 Double 실수 Double-click 더블클릭 Double-click to add 더블클릭하여 추가 +Download the GeoLibre runner GeoLibre 실행기 다운로드 Downloaded {name} {name} 다운로드됨 DRA DRA Drag / middle-drag 드래그 / 가운데 버튼 드래그 @@ -269,6 +270,8 @@ Generalization 일반화 Geo-\nprocessing 지오프로\n세싱 GeoJSON or CSV GeoJSON 또는 CSV GeoLibre GeoLibre +GeoLibre Tools GeoLibre 도구 +GeoLibre tools GeoLibre 도구 Geometry 지오메트리 Geoprocessing 지오프로세싱 Geoprocessing history. 지오프로세싱 기록. @@ -337,6 +340,9 @@ LineString LineString List Commands 명령 목록 Lit 밝은 면 Locate 위치 찾기 +Locate GeoLibre Runner GeoLibre 실행기 찾기 +Locate the GeoLibre runner GeoLibre 실행기 찾기 +Locate… 찾기… Location 위치 Long 정수 Longitude (X) 경도(X) @@ -424,6 +430,7 @@ Outline color 외곽선 색상 Outline width 외곽선 두께 Output 출력 Output Name 출력 이름 +Over 1,000 raster, vector, LiDAR, hydrology and terrain tools, from an optional download: the GeoLibre runner. Unpack it and locate the geolibre program. 래스터, 벡터, LiDAR, 수문, 지형 도구 1,000개 이상을 선택적 다운로드인 GeoLibre 실행기로 제공합니다. 압축을 풀고 geolibre 프로그램을 지정하세요. Overlay 중첩 Pan (Explore) · any tool 이동(탐색) · 모든 도구 Pan to a longitude/latitude. 경도/위도로 이동합니다. diff --git a/crates/ui-egui/src/i18n/nl.tsv b/crates/ui-egui/src/i18n/nl.tsv index 8817b6fbf4..5ffbcb2f11 100644 --- a/crates/ui-egui/src/i18n/nl.tsv +++ b/crates/ui-egui/src/i18n/nl.tsv @@ -185,6 +185,7 @@ Distance Afstand Double Decimaal getal Double-click Dubbelklik Double-click to add Dubbelklik om toe te voegen +Download the GeoLibre runner GeoLibre-runner downloaden Downloaded {name} {name} gedownload DRA DRA Drag / middle-drag Slepen / slepen met middelste knop @@ -269,6 +270,8 @@ Generalization Generalisatie Geo-\nprocessing Geo-\nverwerking GeoJSON or CSV GeoJSON of CSV GeoLibre GeoLibre +GeoLibre Tools GeoLibre-gereedschappen +GeoLibre tools GeoLibre-gereedschappen Geometry Geometrie Geoprocessing Geoverwerking Geoprocessing history. Geschiedenis van geoverwerking. @@ -337,6 +340,9 @@ LineString LineString List Commands Opdrachten weergeven Lit Belicht Locate Lokaliseren +Locate GeoLibre Runner GeoLibre-runner zoeken +Locate the GeoLibre runner GeoLibre-runner zoeken +Locate… Zoeken… Location Locatie Long Lang geheel getal Longitude (X) Lengtegraad (X) @@ -424,6 +430,7 @@ Outline color Omtrekkleur Outline width Omtrekdikte Output Uitvoer Output Name Uitvoernaam +Over 1,000 raster, vector, LiDAR, hydrology and terrain tools, from an optional download: the GeoLibre runner. Unpack it and locate the geolibre program. Meer dan 1.000 raster-, vector-, LiDAR-, hydrologie- en terreingereedschappen als optionele download: de GeoLibre-runner. Pak hem uit en wijs het programma geolibre aan. Overlay Overlay Pan (Explore) · any tool Pannen (Verkennen) · elk gereedschap Pan to a longitude/latitude. Pannen naar een lengte-/breedtegraad. diff --git a/crates/ui-egui/src/i18n/pt.tsv b/crates/ui-egui/src/i18n/pt.tsv index 302534fe05..68f59a8abd 100644 --- a/crates/ui-egui/src/i18n/pt.tsv +++ b/crates/ui-egui/src/i18n/pt.tsv @@ -185,6 +185,7 @@ Distance Distância Double Duplo Double-click Clique duplo Double-click to add Clique duplo para adicionar +Download the GeoLibre runner Baixar o executor do GeoLibre Downloaded {name} {name} baixado DRA DRA Drag / middle-drag Arrastar / arrastar com botão do meio @@ -269,6 +270,8 @@ Generalization Generalização Geo-\nprocessing Geoproces-\nsamento GeoJSON or CSV GeoJSON ou CSV GeoLibre GeoLibre +GeoLibre Tools Ferramentas GeoLibre +GeoLibre tools Ferramentas GeoLibre Geometry Geometria Geoprocessing Geoprocessamento Geoprocessing history. Histórico de geoprocessamento. @@ -337,6 +340,9 @@ LineString LineString List Commands Listar comandos Lit Iluminado Locate Localizar +Locate GeoLibre Runner Localizar o executor do GeoLibre +Locate the GeoLibre runner Localizar o executor do GeoLibre +Locate… Localizar… Location Localização Long Inteiro longo Longitude (X) Longitude (X) @@ -424,6 +430,7 @@ Outline color Cor do contorno Outline width Largura do contorno Output Saída Output Name Nome de saída +Over 1,000 raster, vector, LiDAR, hydrology and terrain tools, from an optional download: the GeoLibre runner. Unpack it and locate the geolibre program. Mais de 1.000 ferramentas raster, vetoriais, LiDAR, hidrológicas e de terreno, em um download opcional: o executor do GeoLibre. Descompacte-o e localize o programa geolibre. Overlay Sobreposição Pan (Explore) · any tool Deslocar (Explorar) · qualquer ferramenta Pan to a longitude/latitude. Deslocar para uma longitude/latitude. diff --git a/crates/ui-egui/src/i18n/ru.tsv b/crates/ui-egui/src/i18n/ru.tsv index 8734db0f19..db960cc18a 100644 --- a/crates/ui-egui/src/i18n/ru.tsv +++ b/crates/ui-egui/src/i18n/ru.tsv @@ -185,6 +185,7 @@ Distance Расстояние Double Вещественное Double-click Двойной щелчок Double-click to add Двойной щелчок — добавить +Download the GeoLibre runner Скачать модуль запуска GeoLibre Downloaded {name} Загружено: {name} DRA DRA Drag / middle-drag Перетаскивание / средней кнопкой @@ -269,6 +270,8 @@ Generalization Генерализация Geo-\nprocessing Гео-\nобработка GeoJSON or CSV GeoJSON или CSV GeoLibre GeoLibre +GeoLibre Tools Инструменты GeoLibre +GeoLibre tools Инструменты GeoLibre Geometry Геометрия Geoprocessing Геообработка Geoprocessing history. История геообработки. @@ -337,6 +340,9 @@ LineString LineString List Commands Список команд Lit Освещено Locate Найти место +Locate GeoLibre Runner Указать модуль запуска GeoLibre +Locate the GeoLibre runner Указать модуль запуска GeoLibre +Locate… Указать… Location Расположение Long Длинное целое Longitude (X) Долгота (X) @@ -424,6 +430,7 @@ Outline color Цвет контура Outline width Толщина контура Output Вывод Output Name Имя результата +Over 1,000 raster, vector, LiDAR, hydrology and terrain tools, from an optional download: the GeoLibre runner. Unpack it and locate the geolibre program. Более 1000 инструментов для растров, векторов, LiDAR, гидрологии и рельефа в необязательной загрузке: модуль запуска GeoLibre. Распакуйте его и укажите программу geolibre. Overlay Наложение Pan (Explore) · any tool Панорамирование (обзор) · любой инструмент Pan to a longitude/latitude. Переместиться к долготе/широте. diff --git a/crates/ui-egui/src/i18n/tr.tsv b/crates/ui-egui/src/i18n/tr.tsv index 902d076a16..9351e0e46f 100644 --- a/crates/ui-egui/src/i18n/tr.tsv +++ b/crates/ui-egui/src/i18n/tr.tsv @@ -185,6 +185,7 @@ Distance Mesafe Double Ondalık (Double) Double-click Çift tıklama Double-click to add Eklemek için çift tıklayın +Download the GeoLibre runner GeoLibre çalıştırıcısını indir Downloaded {name} {name} indirildi DRA DRA Drag / middle-drag Sürükleme / orta tuşla sürükleme @@ -269,6 +270,8 @@ Generalization Genelleştirme Geo-\nprocessing Coğrafi\nİşleme GeoJSON or CSV GeoJSON veya CSV GeoLibre GeoLibre +GeoLibre Tools GeoLibre araçları +GeoLibre tools GeoLibre araçları Geometry Geometri Geoprocessing Coğrafi İşleme Geoprocessing history. Coğrafi işleme geçmişi. @@ -337,6 +340,9 @@ LineString LineString List Commands Komutları Listele Lit Aydınlık Locate Konum Bul +Locate GeoLibre Runner GeoLibre çalıştırıcısını bul +Locate the GeoLibre runner GeoLibre çalıştırıcısını bul +Locate… Bul… Location Konum Long Tamsayı (Long) Longitude (X) Boylam (X) @@ -424,6 +430,7 @@ Outline color Dış çizgi rengi Outline width Dış çizgi kalınlığı Output Çıktı Output Name Çıktı Adı +Over 1,000 raster, vector, LiDAR, hydrology and terrain tools, from an optional download: the GeoLibre runner. Unpack it and locate the geolibre program. İsteğe bağlı bir indirmeyle 1.000'den fazla raster, vektör, LiDAR, hidroloji ve arazi aracı: GeoLibre çalıştırıcısı. Arşivi açın ve geolibre programını gösterin. Overlay Bindirme Pan (Explore) · any tool Kaydır (Keşfet) · herhangi bir araç Pan to a longitude/latitude. Bir boylam/enleme kaydır. diff --git a/crates/ui-egui/src/i18n/vi.tsv b/crates/ui-egui/src/i18n/vi.tsv index dfed445ec0..b413566ba2 100644 --- a/crates/ui-egui/src/i18n/vi.tsv +++ b/crates/ui-egui/src/i18n/vi.tsv @@ -185,6 +185,7 @@ Distance Khoảng cách Double Số thực Double-click Nhấp đúp Double-click to add Nhấp đúp để thêm +Download the GeoLibre runner Tải trình chạy GeoLibre Downloaded {name} Đã tải xuống {name} DRA DRA Drag / middle-drag Kéo / kéo chuột giữa @@ -269,6 +270,8 @@ Generalization Khái quát hóa Geo-\nprocessing Xử lý\nkhông gian GeoJSON or CSV GeoJSON hoặc CSV GeoLibre GeoLibre +GeoLibre Tools Công cụ GeoLibre +GeoLibre tools Công cụ GeoLibre Geometry Hình học Geoprocessing Xử lý không gian Geoprocessing history. Lịch sử xử lý không gian. @@ -337,6 +340,9 @@ LineString LineString List Commands Liệt kê lệnh Lit Sáng Locate Định vị +Locate GeoLibre Runner Tìm trình chạy GeoLibre +Locate the GeoLibre runner Tìm trình chạy GeoLibre +Locate… Tìm… Location Vị trí Long Số nguyên dài Longitude (X) Kinh độ (X) @@ -424,6 +430,7 @@ Outline color Màu viền Outline width Độ rộng viền Output Đầu ra Output Name Tên đầu ra +Over 1,000 raster, vector, LiDAR, hydrology and terrain tools, from an optional download: the GeoLibre runner. Unpack it and locate the geolibre program. Hơn 1.000 công cụ raster, vector, LiDAR, thủy văn và địa hình, qua một bản tải tùy chọn: trình chạy GeoLibre. Giải nén và chỉ đến chương trình geolibre. Overlay Chồng lớp Pan (Explore) · any tool Di chuyển (Khám phá) · mọi công cụ Pan to a longitude/latitude. Di chuyển tới kinh độ/vĩ độ. diff --git a/crates/ui-egui/src/i18n/zh.tsv b/crates/ui-egui/src/i18n/zh.tsv index 04ee35352a..929d55e0e0 100644 --- a/crates/ui-egui/src/i18n/zh.tsv +++ b/crates/ui-egui/src/i18n/zh.tsv @@ -185,6 +185,7 @@ Distance 距离 Double 双精度 Double-click 双击 Double-click to add 双击添加 +Download the GeoLibre runner 下载 GeoLibre 运行器 Downloaded {name} 已下载 {name} DRA DRA Drag / middle-drag 拖动 / 中键拖动 @@ -269,6 +270,8 @@ Generalization 综合 Geo-\nprocessing 地理\n处理 GeoJSON or CSV GeoJSON 或 CSV GeoLibre GeoLibre +GeoLibre Tools GeoLibre 工具 +GeoLibre tools GeoLibre 工具 Geometry 几何 Geoprocessing 地理处理 Geoprocessing history. 地理处理历史记录。 @@ -337,6 +340,9 @@ LineString 线串 List Commands 列出命令 Lit 亮面 Locate 定位 +Locate GeoLibre Runner 定位 GeoLibre 运行器 +Locate the GeoLibre runner 定位 GeoLibre 运行器 +Locate… 定位… Location 位置 Long 长整型 Longitude (X) 经度(X) @@ -424,6 +430,7 @@ Outline color 轮廓颜色 Outline width 轮廓宽度 Output 输出 Output Name 输出名称 +Over 1,000 raster, vector, LiDAR, hydrology and terrain tools, from an optional download: the GeoLibre runner. Unpack it and locate the geolibre program. 1000 多个栅格、矢量、LiDAR、水文和地形工具,来自可选下载:GeoLibre 运行器。解压后定位 geolibre 程序。 Overlay 叠加 Pan (Explore) · any tool 平移(浏览)· 任意工具 Pan to a longitude/latitude. 平移到某个经度/纬度。 diff --git a/crates/ui-egui/src/lib.rs b/crates/ui-egui/src/lib.rs index cfb0949bb4..05c3692e7e 100644 --- a/crates/ui-egui/src/lib.rs +++ b/crates/ui-egui/src/lib.rs @@ -163,6 +163,12 @@ impl RustGisApp { if let Some(m) = self.services.load_pref.as_ref().and_then(|load| load("ribbon_minimized")) { self.ui.ribbon_minimized = m == "true"; } + // A GeoLibre runner located earlier (Locate… in the Geoprocessing pane). + if let Some(path) = self.services.load_pref.as_ref().and_then(|load| load("geolibre_runner")).filter(|p| !p.is_empty()) + && let Err(e) = self.session.run("gp.setGeolibre", &json!({"path": path})) + { + log::warn!("{e}"); + } self } diff --git a/crates/ui-egui/src/panes.rs b/crates/ui-egui/src/panes.rs index 507579b7d8..923324a99d 100644 --- a/crates/ui-egui/src/panes.rs +++ b/crates/ui-egui/src/panes.rs @@ -557,6 +557,53 @@ impl GpForm { } } +/// Where to get the GeoLibre tools when the runner isn't installed (desktop and CLI builds only). +fn geolibre_card(app: &mut RustGisApp, ui: &mut Ui, t: &Tokens) { + let status = app.session.run("gp.geolibre", &Value::Null).unwrap_or(Value::Null); + if status["supported"] != true { + return; + } + let download = status["download"].as_str().unwrap_or("https://github.com/opengeos/geolibre-rust/releases/latest").to_string(); + ui.add_space(6.0); + egui::Frame::NONE + .stroke(Stroke::new(1.0, t.border)) + .corner_radius(CornerRadius::same(6)) + .inner_margin(egui::Margin::same(10)) + .show(ui, |ui| { + ui.set_width(ui.available_width()); + ui.label(egui::RichText::new(tl!("GeoLibre tools")).font(semibold(13.0))); + ui.label( + egui::RichText::new(tl!( + "Over 1,000 raster, vector, LiDAR, hydrology and terrain tools, from an optional download: the GeoLibre runner. Unpack it and locate the geolibre program." + )) + .size(11.5) + .color(t.text_dim), + ); + ui.add_space(4.0); + ui.add(egui::Hyperlink::from_label_and_url(tl!("Download the GeoLibre runner"), download).open_in_new_tab(true)); + #[cfg(not(target_arch = "wasm32"))] + if ui.button(tl!("Locate…")).clicked() + && let Some(path) = rfd::FileDialog::new().set_title(tl!("Locate the GeoLibre runner")).pick_file() + { + let path = path.display().to_string(); + match app.run("gp.setGeolibre", json!({"path": path})) { + Ok(_) => { + if let Some(save) = &app.services.save_pref { + save("geolibre_runner", &path); + } + app.gp.last = None; + } + Err(e) => app.gp.last = Some((false, vec![e])), + } + } + if let Some((false, msgs)) = &app.gp.last { + for m in msgs { + ui.label(egui::RichText::new(m).size(11.0).color(t.red)); + } + } + }); +} + fn geoprocessing(app: &mut RustGisApp, ui: &mut Ui, t: &Tokens) { let Some(spec) = app.gp.tool.and_then(rustgis_engine::analysis::tool) else { // Tool finder. @@ -589,6 +636,52 @@ fn geoprocessing(app: &mut RustGisApp, ui: &mut Ui, t: &Tokens) { app.gp.open(Some(tool.id), &app.session); } }; + // The GeoLibre suite: a thousand tools, so its toolboxes stay closed until opened (or, + // without the runner, a card says where to get it). Above the built-in tools when + // browsing, so it isn't lost below them; after them when searching. + let external = rustgis_engine::analysis::external_tools(); + let geolibre_section = |app: &mut RustGisApp, ui: &mut Ui| { + if external.is_empty() { + if q.is_empty() { + geolibre_card(app, ui, t); + ui.add_space(8.0); + } + return; + } + if q.is_empty() { + ui.label(egui::RichText::new(tl!("GeoLibre")).size(11.0).color(t.text_dim)); + let mut boxes: Vec<&str> = external.iter().map(|t| t.toolbox).collect(); + boxes.dedup(); + for b in boxes { + let n = external.iter().filter(|x| x.toolbox == b).count(); + egui::CollapsingHeader::new(format!("{} ({n})", crate::i18n::location(b.rsplit(" › ").next().unwrap_or(b)))) + .id_salt(("gp-box", b)) + .default_open(false) + .show(ui, |ui| { + for tool in external.iter().filter(|x| x.toolbox == b) { + row(app, ui, tool); + } + }); + } + ui.add_space(8.0); + } else { + const MAX: usize = 60; + let found: Vec<_> = external.iter().filter(|x| matches(x)).collect(); + if !found.is_empty() { + ui.label(egui::RichText::new(tl!("GeoLibre")).size(11.0).color(t.text_dim)); + } + for tool in found.iter().take(MAX) { + row(app, ui, tool); + } + if found.len() > MAX { + let more = crate::i18n::fmt("Refine the search to see {n} more", &[("n", &(found.len() - MAX).to_string())]); + ui.label(egui::RichText::new(more).size(11.0).color(t.text_dim)); + } + } + }; + if q.is_empty() { + geolibre_section(app, ui); + } let mut boxes: Vec<&str> = rustgis_engine::analysis::TOOLS.iter().map(|t| t.toolbox).collect(); boxes.sort(); boxes.dedup(); @@ -603,39 +696,8 @@ fn geoprocessing(app: &mut RustGisApp, ui: &mut Ui, t: &Tokens) { } ui.add_space(6.0); } - // The GeoLibre suite: a thousand tools, so toolboxes stay closed until opened, and a - // search lists the first matches. - let external = rustgis_engine::analysis::external_tools(); - if external.is_empty() { - return; - } - if q.is_empty() { - let mut boxes: Vec<&str> = external.iter().map(|t| t.toolbox).collect(); - boxes.dedup(); - for b in boxes { - let n = external.iter().filter(|x| x.toolbox == b).count(); - egui::CollapsingHeader::new(format!("{} ({n})", crate::i18n::location(b))).id_salt(("gp-box", b)).default_open(false).show( - ui, - |ui| { - for tool in external.iter().filter(|x| x.toolbox == b) { - row(app, ui, tool); - } - }, - ); - } - } else { - const MAX: usize = 60; - let found: Vec<_> = external.iter().filter(|x| matches(x)).collect(); - if !found.is_empty() { - ui.label(egui::RichText::new(tl!("GeoLibre")).size(11.0).color(t.text_dim)); - } - for tool in found.iter().take(MAX) { - row(app, ui, tool); - } - if found.len() > MAX { - let more = crate::i18n::fmt("Refine the search to see {n} more", &[("n", &(found.len() - MAX).to_string())]); - ui.label(egui::RichText::new(more).size(11.0).color(t.text_dim)); - } + if !q.is_empty() { + geolibre_section(app, ui); } return; }; diff --git a/docs/user-guide.md b/docs/user-guide.md index dc1e249ec6..ffc25b5aa1 100644 --- a/docs/user-guide.md +++ b/docs/user-guide.md @@ -128,13 +128,27 @@ Tools honour the current selection: with features selected, only those are proce ### GeoLibre tools -The desktop app and the command line also include the +The desktop app and the command line can also run the [GeoLibre](https://github.com/opengeos/geolibre-rust) tool suite: over 1,000 tools from -Whitebox and GeoLibre, under **GeoLibre › Raster, Vector, Lidar, Hydrology, Terrain, -Conversion** in the Geoprocessing pane and the Catalog's toolboxes (Find Tools searches them). -Terrain analysis (slope, aspect, hillshade, curvature), hydrology (fill depressions, flow -direction and accumulation, watersheds), image processing, interpolation and many vector tools -run on the map's layers, and their outputs are added as new layers. +Whitebox and GeoLibre for terrain analysis (slope, aspect, hillshade, curvature), hydrology +(fill depressions, flow direction and accumulation, watersheds), image processing, +interpolation and vector work. They run on the map's layers and add their outputs as new +layers. + +The suite is an optional download, so RustGIS itself stays small: the **GeoLibre runner**, a +single `geolibre` program (about 19 MB to download). + +1. Download the archive for your platform (`geolibre--.tar.gz`, or `.zip` + on Windows) from the [geolibre-rust releases](https://github.com/opengeos/geolibre-rust/releases/latest) + and unpack it anywhere. +2. In the Geoprocessing pane, click **Locate…** under *GeoLibre tools* and pick the + `geolibre` program. RustGIS remembers it. + +RustGIS also finds the runner without asking when it is next to the RustGIS program (or in a +`geolibre` folder beside it), on your `PATH`, or named by the `RUSTGIS_GEOLIBRE` environment +variable (the command line uses these). The tools then appear under **GeoLibre › Raster, +Vector, Lidar, Hydrology, Terrain, Conversion** in the Geoprocessing pane and the Catalog's +toolboxes, and Find Tools searches them. - Raster inputs are passed as their own files; vector layers (or their selection) are written in the first raster input's coordinate system, or the UTM zone around the data, so distances @@ -143,8 +157,10 @@ run on the map's layers, and their outputs are added as new layers. reports appear in the tool's messages. - LiDAR and other inputs RustGIS doesn't open as layers take a file path, read like Add Data reads one. Outputs are written to a fresh scratch folder and loaded from there. +- Each run is a separate `geolibre` process, so a tool that fails can't take RustGIS down. - From the command line: `gp.run={"tool":"geolibre:slope","params":{"input":"dem"}}`; - `gp.tools` lists every tool's parameters. + `gp.tools` lists every tool's parameters, `gp.geolibre` shows the runner in use and + `gp.setGeolibre={"path":"…"}` picks one. The web app doesn't include them yet: the tools read and write files, which a browser page can't. From 38dba4f983357972691d5c4950d770e68c572981 Mon Sep 17 00:00:00 2001 From: giswqs Date: Sat, 10 Oct 2026 23:57:55 -0400 Subject: [PATCH 5/9] Address review feedback - Staged inputs get numbered file names, so two layers whose safe names collide (Roads 2020 / Roads_2020, non-ASCII names) can't overwrite each other's file; regression test added. - Geometry that can't be converted to or from the working coordinate system is dropped with a message instead of being written with null coordinates. - The version and manifests queries time out (10 s / 60 s) and kill the process, so a program that is only called geolibre can't hang the app. Tool runs keep no limit. - Docs: the module is L3; outputs the tool declares go to scratch (the runner is trusted like any installed program); the web build simply doesn't enable the integration; the app waits while a tool runs. - Test: defaults are JSON text, which the form and the runner parse. --- crates/geolibre/src/lib.rs | 117 +++++++++++++++++++++++++--------- crates/geolibre/src/runner.rs | 43 ++++++++++++- crates/geolibre/src/tests.rs | 15 +++++ docs/user-guide.md | 7 +- 4 files changed, 146 insertions(+), 36 deletions(-) diff --git a/crates/geolibre/src/lib.rs b/crates/geolibre/src/lib.rs index b62289c153..6a712b176c 100644 --- a/crates/geolibre/src/lib.rs +++ b/crates/geolibre/src/lib.rs @@ -1,4 +1,4 @@ -//! L2: the GeoLibre tool suite (Whitebox's tools plus GeoLibre's own: 1,000+ raster, vector, +//! L3: the GeoLibre tool suite (Whitebox's tools plus GeoLibre's own: 1,000+ raster, vector, //! LiDAR, hydrology and terrain tools) as geoprocessing tools. //! //! The suite is an optional download: the `geolibre` runner, a separate executable (see @@ -14,8 +14,9 @@ //! Native only: the browser build has no file system for the tools to use. //! //! Like Add Data, a tool reads any file named in its parameters (a layer name that isn't a -//! layer is taken as a path, and LiDAR inputs are paths), with the user's permissions. Outputs -//! are always written to the run's own scratch folder. +//! layer is taken as a path, and LiDAR inputs are paths), with the user's permissions. The +//! outputs a tool declares are written to the run's own scratch folder; the runner is trusted +//! like any program the user installs, so a tool could write elsewhere if asked to. #![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)] pub mod runner; @@ -26,7 +27,7 @@ use std::sync::Mutex; use rustgis_analysis::{Inputs, Output, OutputLayer, ParamKind, ParamSpec, ToolResult, ToolSpec}; use rustgis_data::raster::{Crs, Transformer}; -use rustgis_data::{Coord, Dataset, Extent}; +use rustgis_data::{Coord, Dataset, Extent, Geometry}; use serde_json::{Value, json}; /// Tool ids get this prefix, so they never clash with the built-in tools. @@ -213,7 +214,11 @@ fn spec_of(m: &Value) -> Option<(ToolSpec, Meta)> { } /// A scratch folder for one run, removed afterwards. -struct Scratch(PathBuf); +struct Scratch { + dir: PathBuf, + /// Staged inputs so far, so each gets its own file name. + staged: std::cell::Cell, +} impl Scratch { /// A new, empty folder: never one that already exists (left over, or made by someone else @@ -226,7 +231,7 @@ impl Scratch { let n = N.fetch_add(1, std::sync::atomic::Ordering::Relaxed); let dir = std::env::temp_dir().join(format!("rustgis-gp-{}-{nanos:x}-{n}", std::process::id())); match std::fs::create_dir(&dir) { - Ok(()) => return Ok(Scratch(dir)), + Ok(()) => return Ok(Scratch { dir, staged: std::cell::Cell::new(0) }), Err(e) if e.kind() == std::io::ErrorKind::AlreadyExists => last = Some(e), Err(e) => return Err(format!("can't create a scratch folder: {e}")), } @@ -235,12 +240,48 @@ impl Scratch { } } +impl Scratch { + /// A new file name for a staged input. Numbered, because two layer names can map to the + /// same safe name (`Roads 2020` and `Roads_2020`, or any two non-ASCII names), and one + /// file must never replace another. + fn input(&self, name: &str, ext: &str) -> PathBuf { + let n = self.staged.get(); + self.staged.set(n + 1); + self.dir.join(format!("in{n}-{}.{ext}", safe(name))) + } +} + impl Drop for Scratch { fn drop(&mut self) { - let _ = std::fs::remove_dir_all(&self.0); + let _ = std::fs::remove_dir_all(&self.dir); } } +/// `g` with every point converted by `f`, or `None` when a point can't be (rather than +/// geometry with null coordinates). +fn convert(g: &Geometry, f: impl Fn(Coord) -> Option) -> Option { + let ok = std::cell::Cell::new(true); + let out = g.map_coords(&|c| { + f(c).filter(|m| m.is_finite()).unwrap_or_else(|| { + ok.set(false); + c + }) + }); + ok.get().then_some(out) +} + +/// Converts every feature's geometry, clearing those that can't be converted; returns how many. +fn convert_features(ds: &mut Dataset, f: impl Fn(Coord) -> Option) -> usize { + let mut lost = 0; + for ft in &mut ds.features { + if let Some(g) = &ft.geometry { + ft.geometry = convert(g, &f); + lost += usize::from(ft.geometry.is_none()); + } + } + lost +} + /// A file-name-safe version of a layer name. fn safe(name: &str) -> String { let s: String = name.chars().map(|c| if c.is_ascii_alphanumeric() || c == '-' { c } else { '_' }).take(60).collect(); @@ -262,18 +303,14 @@ fn working_crs(rasters: &[Crs], vectors: &[Extent]) -> Crs { Crs::from_epsg(if c.y >= 0.0 { 32600 + zone } else { 32700 + zone }).unwrap_or(Crs::LonLat) } -/// A vector layer (its selection, if any) as GeoJSON in `crs`. -fn write_vector(ds: &Dataset, rows: &[usize], crs: Crs, tf: &Transformer, path: &Path) -> Result<(), String> { +/// A vector layer (its selection, if any) as GeoJSON in `crs`; returns how many features' +/// geometry couldn't be converted (they're written without geometry). +fn write_vector(ds: &Dataset, rows: &[usize], crs: Crs, tf: &Transformer, path: &Path) -> Result { let mut out = ds.clone(); if !rows.is_empty() { out.features = rows.iter().filter_map(|&r| ds.features.get(r).cloned()).collect(); } - if crs != Crs::LonLat { - let f = |c: Coord| tf.from_lonlat(c).unwrap_or(Coord::new(f64::NAN, f64::NAN)); - for ft in &mut out.features { - ft.geometry = ft.geometry.as_ref().map(|g| g.map_coords(&f)); - } - } + let lost = if crs != Crs::LonLat { convert_features(&mut out, |c| tf.from_lonlat(c)) } else { 0 }; let mut json = rustgis_data::io::to_geojson(&out); if crs != Crs::LonLat && let Some(o) = json.as_object_mut() @@ -282,11 +319,21 @@ fn write_vector(ds: &Dataset, rows: &[usize], crs: Crs, tf: &Transformer, path: o.insert("crs".into(), json!({"type": "name", "properties": {"name": format!("urn:ogc:def:crs:EPSG::{}", crs.epsg())}})); } let text = serde_json::to_string(&json).map_err(|e| e.to_string())?; - std::fs::write(path, text).map_err(|e| format!("can't write {}: {e}", path.display())) + std::fs::write(path, text).map_err(|e| format!("can't write {}: {e}", path.display()))?; + Ok(lost) } /// Writes one input (a layer by name, or a file path) to the scratch folder; returns its path. -fn stage(inputs: &dyn Inputs, value: &str, data: Data, crs: Crs, tf: &Transformer, dir: &Path) -> Result { +/// Problems that don't stop the run go to `notes`. +fn stage( + inputs: &dyn Inputs, + value: &str, + data: Data, + crs: Crs, + tf: &Transformer, + scratch: &Scratch, + notes: &mut Vec, +) -> Result { if let Some(r) = inputs.raster(value) { if let Some(p) = r.path.filter(|p| Path::new(p).is_file()) { return Ok(p.to_string()); @@ -294,24 +341,27 @@ fn stage(inputs: &dyn Inputs, value: &str, data: Data, crs: Crs, tf: &Transforme if let Some((file_name, bytes)) = r.embedded { // The tools tell formats apart by extension. let ext = Path::new(file_name).extension().and_then(|e| e.to_str()).map(safe).unwrap_or_else(|| "tif".into()); - let path = dir.join(format!("{}.{ext}", safe(value))); + let path = scratch.input(value, &ext); std::fs::write(&path, bytes).map_err(|e| format!("can't write {}: {e}", path.display()))?; return Ok(path.display().to_string()); } let bytes = rustgis_data::raster::geotiff::write(r.raster, 0).map_err(|e| format!("{value}: {e}"))?; - let path = dir.join(format!("{}.tif", safe(value))); + let path = scratch.input(value, "tif"); std::fs::write(&path, bytes).map_err(|e| format!("can't write {}: {e}", path.display()))?; return Ok(path.display().to_string()); } if let Some(ds) = inputs.dataset(value) { if data == Data::Table || (ds.features.iter().all(|f| f.geometry.is_none()) && data != Data::Vector) { - let path = dir.join(format!("{}.csv", safe(value))); + let path = scratch.input(value, "csv"); let text = rustgis_data::io::to_csv(ds).map_err(|e| format!("{value}: {e}"))?; std::fs::write(&path, text).map_err(|e| format!("can't write {}: {e}", path.display()))?; return Ok(path.display().to_string()); } - let path = dir.join(format!("{}.geojson", safe(value))); - write_vector(ds, inputs.selection(value), crs, tf, &path)?; + let path = scratch.input(value, "geojson"); + let lost = write_vector(ds, inputs.selection(value), crs, tf, &path)?; + if lost > 0 { + notes.push(format!("{value}: {lost} features lie outside the working coordinate system and were passed without geometry")); + } return Ok(path.display().to_string()); } if Path::new(value).exists() { @@ -373,9 +423,11 @@ fn load(path: &Path, layer_name: &str, crs: Crs, tf: &Transformer, messages: &mu Ok((mut ds, _)) => { ds.name = layer_name.to_string(); if crs != Crs::LonLat && looks_projected(&ds) { - let f = |c: Coord| tf.to_lonlat(c).unwrap_or(Coord::new(f64::NAN, f64::NAN)); - for ft in &mut ds.features { - ft.geometry = ft.geometry.as_ref().map(|g| g.map_coords(&f)); + let lost = convert_features(&mut ds, |c| tf.to_lonlat(c)); + if lost > 0 { + messages.push(format!( + "{layer_name}: {lost} features couldn't be converted to longitude/latitude and have no geometry" + )); } } Some(if ds.features.iter().all(|f| f.geometry.is_none()) { OutputLayer::Table(ds) } else { OutputLayer::Vector(ds) }) @@ -447,19 +499,21 @@ fn run(spec: &ToolSpec, inputs: &dyn Inputs, params: &Value) -> Result = Vec::new(); + let mut notes = Vec::new(); let mut outputs = Vec::new(); let n_outputs = meta.params.iter().filter(|p| p.role == Role::Output).count(); for p in &meta.params { match p.role { Role::Input => { let Some(v) = value_of(&p.name) else { continue }; - let paths = names(v).iter().map(|n| stage(inputs, n, p.data, crs, &tf, &scratch.0)).collect::, _>>()?; + let paths = + names(v).iter().map(|n| stage(inputs, n, p.data, crs, &tf, &scratch, &mut notes)).collect::, _>>()?; if !paths.is_empty() { args.push((p.name.clone(), Value::String(paths.join(";")))); } } Role::Output => { - let path = scratch.0.join(format!("{}.{}", safe(&p.name), output_ext(p, meta))); + let path = scratch.dir.join(format!("{}.{}", safe(&p.name), output_ext(p, meta))); args.push((p.name.clone(), Value::String(path.display().to_string()))); let name = if n_outputs > 1 { format!("{} {}", spec.name, label_of(&p.name).to_lowercase()) } else { spec.name.to_string() }; @@ -473,8 +527,9 @@ fn run(spec: &ToolSpec, inputs: &dyn Inputs, params: &Value) -> Result Result Result continue, diff --git a/crates/geolibre/src/runner.rs b/crates/geolibre/src/runner.rs index c28157f474..74f5b16913 100644 --- a/crates/geolibre/src/runner.rs +++ b/crates/geolibre/src/runner.rs @@ -5,8 +5,9 @@ //! run. A tool that crashes or panics takes only the subprocess down. use std::path::{Path, PathBuf}; -use std::process::Command; +use std::process::{Command, Output, Stdio}; use std::sync::Mutex; +use std::time::{Duration, Instant}; use serde_json::Value; @@ -39,12 +40,46 @@ fn command(exe: &Path) -> Command { c } +/// Runs `c` to completion, or kills it after `limit`. For the quick queries (version, +/// manifests): a program that only happens to be called `geolibre` mustn't hang the app. Tool +/// runs have no limit, since a large raster can legitimately take a long time. +fn output_within(mut c: Command, limit: Duration) -> Option { + let mut child = c.stdin(Stdio::null()).stdout(Stdio::piped()).stderr(Stdio::piped()).spawn().ok()?; + // Drain stdout on a thread, so a large output (the manifests) can't fill the pipe and stall. + let mut stdout = child.stdout.take()?; + let reader = std::thread::spawn(move || { + let mut buf = Vec::new(); + let _ = std::io::Read::read_to_end(&mut stdout, &mut buf); + buf + }); + let start = Instant::now(); + let status = loop { + match child.try_wait() { + Ok(Some(status)) => break status, + Ok(None) if start.elapsed() < limit => std::thread::sleep(Duration::from_millis(20)), + _ => { + let _ = child.kill(); + let _ = child.wait(); + return None; + } + } + }; + let stdout = reader.join().ok()?; + let mut stderr = Vec::new(); + if let Some(mut e) = child.stderr.take() { + let _ = std::io::Read::read_to_end(&mut e, &mut stderr); + } + Some(Output { status, stdout, stderr }) +} + /// The runner's version, if `exe` is a GeoLibre runner (not some other program called geolibre). pub fn version_of(exe: &Path) -> Option { if !exe.is_file() { return None; } - let out = command(exe).arg("version").output().ok()?; + let mut c = command(exe); + c.arg("version"); + let out = output_within(c, Duration::from_secs(10))?; let text = String::from_utf8_lossy(&out.stdout).trim().to_string(); (out.status.success() && text.starts_with("geolibre-cli")).then_some(text) } @@ -100,7 +135,9 @@ pub fn choose(exe: Option) -> Result, String> /// Every tool's manifest, from `geolibre manifests`. pub fn manifests() -> Result, String> { let (exe, _) = find().ok_or("the GeoLibre runner isn't installed")?; - let out = command(&exe).arg("manifests").output().map_err(|e| format!("{}: {e}", exe.display()))?; + let mut c = command(&exe); + c.arg("manifests"); + let out = output_within(c, Duration::from_secs(60)).ok_or_else(|| format!("{}: no answer to `manifests`", exe.display()))?; if !out.status.success() { return Err(format!("{}: {}", exe.display(), String::from_utf8_lossy(&out.stderr).trim())); } diff --git a/crates/geolibre/src/tests.rs b/crates/geolibre/src/tests.rs index 68c0dda12b..3e47c6419e 100644 --- a/crates/geolibre/src/tests.rs +++ b/crates/geolibre/src/tests.rs @@ -65,6 +65,19 @@ fn runner_values_and_choices() { assert!(set_runner(Some(PathBuf::from("/no/such/geolibre"))).is_err()); assert_eq!(runner::find(), before); assert_eq!(label_of("z_factor"), "Z factor"); + // Two layer names with the same safe name still get two files. + let scratch = Scratch::new().unwrap(); + let (a, b) = (scratch.input("Roads 2020", "geojson"), scratch.input("Roads_2020", "geojson")); + assert_ne!(a, b); + assert_ne!(scratch.input("城市", "tif"), scratch.input("道路", "tif")); + let dir = scratch.dir.clone(); + drop(scratch); + assert!(!dir.exists(), "removed after the run"); + // A point that can't be converted drops the geometry instead of writing nulls. + let line = Geometry::Line(vec![vec![Coord::new(0.0, 0.0), Coord::new(1.0, 1.0)]]); + assert!(convert(&line, |c| Some(Coord::new(c.x * 2.0, c.y))).is_some()); + assert!(convert(&line, |c| (c.x < 0.5).then_some(c)).is_none()); + assert!(convert(&line, |_| Some(Coord::new(f64::NAN, 0.0))).is_none()); assert_eq!(safe("a b/c.tif"), "a_b_c_tif"); } @@ -80,7 +93,9 @@ fn manifests_become_tool_forms() { assert!(slope.params.iter().all(|p| p.name != "output"), "outputs are not form fields"); let units = slope.params.iter().find(|p| p.name == "units").unwrap(); assert!(matches!(units.kind, ParamKind::Choice(c) if c.contains(&"percent"))); + // Defaults are JSON text (as for the built-in tools): the form and the runner parse it. assert_eq!(units.default, "\"degrees\""); + assert_eq!(serde_json::from_str::(units.default).unwrap(), json!("degrees")); // The built-in Buffer still wins by name. assert_eq!(rustgis_analysis::tool("Buffer").map(|t| t.id), Some("buffer")); } diff --git a/docs/user-guide.md b/docs/user-guide.md index ffc25b5aa1..82e228d23b 100644 --- a/docs/user-guide.md +++ b/docs/user-guide.md @@ -162,8 +162,11 @@ toolboxes, and Find Tools searches them. `gp.tools` lists every tool's parameters, `gp.geolibre` shows the runner in use and `gp.setGeolibre={"path":"…"}` picks one. -The web app doesn't include them yet: the tools read and write files, which a browser page -can't. +The web app doesn't include them: RustGIS turns this integration on only in the desktop app +and the command line. + +RustGIS waits while a tool runs, so a long run on a large raster or point cloud keeps the +window busy until it finishes. ## Keyboard shortcuts From 35267eecacb17bf56fc400bc72bb163fa122b563 Mon Sep 17 00:00:00 2001 From: giswqs Date: Sun, 11 Oct 2026 00:14:56 -0400 Subject: [PATCH 6/9] Address review feedback MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - The version/manifests queries drain stderr on a thread too, so a runner that writes a lot of warnings can't block on a full pipe until the time limit. - find() probes candidates without holding the cache lock, so a slow candidate doesn't block other callers (the status check). - Tool strings are interned: reloading the tools (Locate…) reuses the strings it made instead of leaking another copy of every name. - The Geoprocessing card reads the GeoLibre status directly instead of running a command each frame, which bumped the session revision and made views redraw. --- crates/geolibre/src/lib.rs | 13 ++++++++++- crates/geolibre/src/runner.rs | 42 ++++++++++++++++++++++------------- crates/geolibre/src/tests.rs | 2 ++ crates/ui-egui/src/panes.rs | 4 +++- 4 files changed, 43 insertions(+), 18 deletions(-) diff --git a/crates/geolibre/src/lib.rs b/crates/geolibre/src/lib.rs index 6a712b176c..782d48a0f6 100644 --- a/crates/geolibre/src/lib.rs +++ b/crates/geolibre/src/lib.rs @@ -104,8 +104,19 @@ struct Meta { static META: Mutex>> = Mutex::new(None); +/// A `'static` copy of `s`, shared: reloading the tools (Locate…) reuses the strings it +/// already made instead of leaking another copy of every name and description. fn leak(s: impl Into) -> &'static str { - Box::leak(s.into().into_boxed_str()) + static STRINGS: Mutex>> = Mutex::new(None); + let s = s.into(); + let Ok(mut set) = STRINGS.lock() else { return Box::leak(s.into_boxed_str()) }; + let set = set.get_or_insert_with(Default::default); + if let Some(&have) = set.get(s.as_str()) { + return have; + } + let new: &'static str = Box::leak(s.into_boxed_str()); + set.insert(new); + new } /// `z_factor` → `Z factor`. diff --git a/crates/geolibre/src/runner.rs b/crates/geolibre/src/runner.rs index 74f5b16913..078d5308a0 100644 --- a/crates/geolibre/src/runner.rs +++ b/crates/geolibre/src/runner.rs @@ -45,13 +45,17 @@ fn command(exe: &Path) -> Command { /// runs have no limit, since a large raster can legitimately take a long time. fn output_within(mut c: Command, limit: Duration) -> Option { let mut child = c.stdin(Stdio::null()).stdout(Stdio::piped()).stderr(Stdio::piped()).spawn().ok()?; - // Drain stdout on a thread, so a large output (the manifests) can't fill the pipe and stall. - let mut stdout = child.stdout.take()?; - let reader = std::thread::spawn(move || { - let mut buf = Vec::new(); - let _ = std::io::Read::read_to_end(&mut stdout, &mut buf); - buf - }); + // Drain both pipes on threads while the process runs: a full pipe (large manifests, or + // many warnings) would otherwise block it until the time limit. + fn drain(mut pipe: impl std::io::Read + Send + 'static) -> std::thread::JoinHandle> { + std::thread::spawn(move || { + let mut buf = Vec::new(); + let _ = pipe.read_to_end(&mut buf); + buf + }) + } + let out_reader = drain(child.stdout.take()?); + let err_reader = drain(child.stderr.take()?); let start = Instant::now(); let status = loop { match child.try_wait() { @@ -64,11 +68,8 @@ fn output_within(mut c: Command, limit: Duration) -> Option { } } }; - let stdout = reader.join().ok()?; - let mut stderr = Vec::new(); - if let Some(mut e) = child.stderr.take() { - let _ = std::io::Read::read_to_end(&mut e, &mut stderr); - } + let stdout = out_reader.join().ok()?; + let stderr = err_reader.join().unwrap_or_default(); Some(Output { status, stdout, stderr }) } @@ -107,12 +108,21 @@ fn candidates() -> Vec { } /// The runner to use and its version, or `None` when there isn't one. +/// +/// The answer is kept until the choice changes (Locate…). Probing runs without holding the +/// cache's lock, so a slow candidate never blocks another caller. pub fn find() -> Option<(PathBuf, String)> { - let Ok(mut found) = FOUND.lock() else { return None }; - if found.is_none() { - *found = Some(candidates().into_iter().find_map(|p| version_of(&p).map(|v| (p, v)))); + if let Ok(found) = FOUND.lock() + && let Some(f) = found.as_ref() + { + return f.clone(); + } + let probed = candidates().into_iter().find_map(|p| version_of(&p).map(|v| (p, v))); + if let Ok(mut found) = FOUND.lock() { + // Another caller may have stored an answer meanwhile: the first one stays. + return found.get_or_insert(probed).clone(); } - found.clone().flatten() + probed } /// Uses `exe` as the runner (`None`: look in the usual places again). Fails, keeping the diff --git a/crates/geolibre/src/tests.rs b/crates/geolibre/src/tests.rs index 3e47c6419e..7251e7ed75 100644 --- a/crates/geolibre/src/tests.rs +++ b/crates/geolibre/src/tests.rs @@ -65,6 +65,8 @@ fn runner_values_and_choices() { assert!(set_runner(Some(PathBuf::from("/no/such/geolibre"))).is_err()); assert_eq!(runner::find(), before); assert_eq!(label_of("z_factor"), "Z factor"); + // Reloading the tools reuses the strings it made rather than leaking new copies. + assert!(std::ptr::eq(leak("Slope"), leak(String::from("Slope")))); // Two layer names with the same safe name still get two files. let scratch = Scratch::new().unwrap(); let (a, b) = (scratch.input("Roads 2020", "geojson"), scratch.input("Roads_2020", "geojson")); diff --git a/crates/ui-egui/src/panes.rs b/crates/ui-egui/src/panes.rs index 923324a99d..2ead3f6641 100644 --- a/crates/ui-egui/src/panes.rs +++ b/crates/ui-egui/src/panes.rs @@ -559,7 +559,9 @@ impl GpForm { /// Where to get the GeoLibre tools when the runner isn't installed (desktop and CLI builds only). fn geolibre_card(app: &mut RustGisApp, ui: &mut Ui, t: &Tokens) { - let status = app.session.run("gp.geolibre", &Value::Null).unwrap_or(Value::Null); + // Read directly, not through Session::run: a command each frame would bump the session's + // revision and make the views redraw. The status itself is cached in the runner module. + let status = rustgis_engine::cmd::gp::geolibre_status(); if status["supported"] != true { return; } From 662a1410153658922f3364d7aa1940e678b230a6 Mon Sep 17 00:00:00 2001 From: giswqs Date: Sun, 11 Oct 2026 00:22:24 -0400 Subject: [PATCH 7/9] Address review feedback - Comment at the manifest default conversion that ParamSpec::default is JSON text, parsed back by analysis::run and the form, so reviewers don't read the quoted storage as a bug. - output_within kills and reaps the process if a pipe can't be taken, instead of returning with it still running. --- crates/geolibre/src/lib.rs | 3 +++ crates/geolibre/src/runner.rs | 9 +++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/crates/geolibre/src/lib.rs b/crates/geolibre/src/lib.rs index 782d48a0f6..72cb497221 100644 --- a/crates/geolibre/src/lib.rs +++ b/crates/geolibre/src/lib.rs @@ -196,6 +196,9 @@ fn spec_of(m: &Value) -> Option<(ToolSpec, Meta)> { }, }; // Example file names in the defaults ("dem.tif") are not defaults for a layer. + // `ParamSpec::default` is JSON *text* (a string default is stored quoted, `"\"mean\""`, + // as for the built-in tools): `analysis::run` and the form parse it back, so the tool and + // the form both get `mean`. Hence `to_string`, not the bare string. let default = match role { Role::Input => String::new(), _ => defaults.and_then(|d| d.get(pname)).filter(|v| !v.is_null()).map(Value::to_string).unwrap_or_default(), diff --git a/crates/geolibre/src/runner.rs b/crates/geolibre/src/runner.rs index 078d5308a0..b9731eae76 100644 --- a/crates/geolibre/src/runner.rs +++ b/crates/geolibre/src/runner.rs @@ -54,8 +54,13 @@ fn output_within(mut c: Command, limit: Duration) -> Option { buf }) } - let out_reader = drain(child.stdout.take()?); - let err_reader = drain(child.stderr.take()?); + let (Some(out), Some(err)) = (child.stdout.take(), child.stderr.take()) else { + // Not expected with piped output, but never leave the process running. + let _ = child.kill(); + let _ = child.wait(); + return None; + }; + let (out_reader, err_reader) = (drain(out), drain(err)); let start = Instant::now(); let status = loop { match child.try_wait() { From a2d5f05d1608806ea722489e57bbec1d02a4ba6b Mon Sep 17 00:00:00 2001 From: giswqs Date: Sun, 11 Oct 2026 00:31:35 -0400 Subject: [PATCH 8/9] Install the GeoLibre runner with one click; fix desktop links MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - install.rs: Install GeoLibre tools downloads the latest geolibre-rust release's archive for this platform (GitHub API, HTTPS via ureq + rustls), checks it against the published .sha256, unpacks it (tar.gz or zip, entries kept inside the folder) into RustGIS's data folder, makes it executable and checks it starts. The runner search looks there too, so it is found again after a restart. - engine: gp.installGeolibre (blocking, for the CLI) and install_geolibre() for the app, which runs it on a background thread with a progress bar, then picks the runner and remembers it. - ui: the GeoLibre card's main action is Install GeoLibre tools; the manual download link and Locate… remain. - The desktop app's eframe lacked the `links` feature, so clicking any hyperlink (this download link, epsg.io, Website, GitHub) did nothing. - The hostile-params test skips gp.installGeolibre (network). Checked with a real install into a scratch data folder: 1.6.0 for x86_64 Linux downloaded, verified and found by a new process with all 1,062 tools. The desktop binary grows by 3.3 MB (TLS and archives). --- Cargo.lock | 594 ++++++++++++++++++++++++++++++++- apps/rustgis/Cargo.toml | 2 +- crates/engine/src/cmd/gp.rs | 22 ++ crates/engine/src/tests.rs | 9 +- crates/geolibre/Cargo.toml | 7 + crates/geolibre/src/install.rs | 166 +++++++++ crates/geolibre/src/lib.rs | 1 + crates/geolibre/src/runner.rs | 4 + crates/ui-egui/src/i18n/az.tsv | 6 +- crates/ui-egui/src/i18n/de.tsv | 6 +- crates/ui-egui/src/i18n/es.tsv | 6 +- crates/ui-egui/src/i18n/fr.tsv | 6 +- crates/ui-egui/src/i18n/id.tsv | 6 +- crates/ui-egui/src/i18n/it.tsv | 6 +- crates/ui-egui/src/i18n/ja.tsv | 6 +- crates/ui-egui/src/i18n/ko.tsv | 6 +- crates/ui-egui/src/i18n/nl.tsv | 6 +- crates/ui-egui/src/i18n/pt.tsv | 6 +- crates/ui-egui/src/i18n/ru.tsv | 6 +- crates/ui-egui/src/i18n/tr.tsv | 6 +- crates/ui-egui/src/i18n/vi.tsv | 6 +- crates/ui-egui/src/i18n/zh.tsv | 6 +- crates/ui-egui/src/panes.rs | 108 ++++-- docs/user-guide.md | 18 +- 24 files changed, 964 insertions(+), 51 deletions(-) create mode 100644 crates/geolibre/src/install.rs diff --git a/Cargo.lock b/Cargo.lock index 938b25a92d..e692e5e84f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -205,6 +205,15 @@ dependencies = [ "num-traits", ] +[[package]] +name = "arbitrary" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3bc62ac97cc33321f50863d514c3bc38a453947a8f9e781137e47c7401020aed" +dependencies = [ + "derive_arbitrary", +] + [[package]] name = "arboard" version = "3.6.1" @@ -438,6 +447,12 @@ version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" +[[package]] +name = "base64" +version = "0.23.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac07cdecf99051d9a5238b80f35af32cdeba5b336e55d957b318b50137e18da5" + [[package]] name = "bit-set" version = "0.10.0" @@ -465,6 +480,15 @@ version = "2.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3ded4057c258ba199e2d26386d3af3780957ecaee6c4ef4041c6b4b8b97c0b06" +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + [[package]] name = "block2" version = "0.5.1" @@ -737,6 +761,15 @@ dependencies = [ "libc", ] +[[package]] +name = "cpufeatures" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +dependencies = [ + "libc", +] + [[package]] name = "crc32fast" version = "1.5.2" @@ -783,6 +816,16 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" +[[package]] +name = "crypto-common" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" +dependencies = [ + "generic-array", + "typenum", +] + [[package]] name = "csv" version = "1.4.0" @@ -827,6 +870,17 @@ version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c" +[[package]] +name = "derive_arbitrary" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b034bd7d5f032402a2479444dcc6f74e36a03f31854d41680fb240ef682a1ac" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.7", +] + [[package]] name = "dify" version = "0.8.0" @@ -840,6 +894,16 @@ dependencies = [ "rayon", ] +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "crypto-common", +] + [[package]] name = "dispatch" version = "0.2.0" @@ -858,6 +922,17 @@ dependencies = [ "objc2 0.6.5", ] +[[package]] +name = "displaydoc" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6232dd377dcc64799954cbd3a9bb882e9cdc1308ccd87b1c098f1fb2eaf82a8" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.7", +] + [[package]] name = "dlib" version = "0.5.3" @@ -1000,6 +1075,7 @@ dependencies = [ "raw-window-handle", "smithay-clipboard", "web-time", + "webbrowser", "winit", ] @@ -1158,7 +1234,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -1223,6 +1299,16 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b97b65636e5b9ef369943878ac74335ba1c55c1cb6adbf1e2c293c624248d693" +[[package]] +name = "filetime" +version = "0.2.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c287a33c7f0a620c38e641e7f60827713987b3c0f26e8ddc9462cc69cf75759" +dependencies = [ + "cfg-if", + "libc", +] + [[package]] name = "find-msvc-tools" version = "0.1.14" @@ -1288,6 +1374,15 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" +[[package]] +name = "form_urlencoded" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" +dependencies = [ + "percent-encoding", +] + [[package]] name = "futures-core" version = "0.3.34" @@ -1343,6 +1438,16 @@ dependencies = [ "slab", ] +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + [[package]] name = "geo" version = "0.33.1" @@ -1407,6 +1512,17 @@ dependencies = [ "unicode-width", ] +[[package]] +name = "getrandom" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + [[package]] name = "getrandom" version = "0.3.4" @@ -1633,6 +1749,22 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +[[package]] +name = "http" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "918d3568bebf352712bc2ef3d46a8bcf1a75b373be6539de198e9105cbbf9ce0" +dependencies = [ + "bytes", + "itoa", +] + +[[package]] +name = "httparse" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" + [[package]] name = "i_float" version = "1.16.0" @@ -1679,6 +1811,110 @@ version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4804bdc1dc124eb7e1aa9e144ecc04096bcf787a10a15fa44af682b51f0f6cce" +[[package]] +name = "icu_collections" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa68d21081c4a05d5a901a1c62add574c77048b6a1c67be3b50ce0b60d4ca513" +dependencies = [ + "displaydoc", + "potential_utf", + "utf8_iter", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d56e28588da92eee5c3201a6eff33fabdd49b62269c8938d4ff050ce4d900deb" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12f9cf5f235641ed274641dd81c3f28d870e276763d0797aeeab72317b1c646f" +dependencies = [ + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1563da1ed3e0b3bf3d74c9b85917ac9c56464d2f57242270c09c9e752f8021a0" + +[[package]] +name = "icu_properties" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e7ca276ad3145661a65914e6daf131ca5120cd3dcee8f8f3214b8875184a148" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e590f038c1464a96894fd6d10127e90a8be4509f56ff7ecef851b15cee0b7caa" + +[[package]] +name = "icu_provider" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d27bbb9d3abbefac45d55f647c9de1d44aafcd1186eb91879afef17c396c3e73" +dependencies = [ + "displaydoc", + "icu_locale_core", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + +[[package]] +name = "idna" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + [[package]] name = "image" version = "0.25.10" @@ -1913,6 +2149,12 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" +[[package]] +name = "litemap" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47d9d19d1d6efa0109d2f65ff4c85cddd50bd572e5a00127ab10987290bcefae" + [[package]] name = "litrs" version = "1.0.0" @@ -2668,6 +2910,15 @@ dependencies = [ "portable-atomic", ] +[[package]] +name = "potential_utf" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d83eb9bc6d8e5cf568e7a1101d60ee05e81ed50ea106026f3d18deeb046d7661" +dependencies = [ + "zerovec", +] + [[package]] name = "powerfmt" version = "0.2.1" @@ -2898,6 +3149,20 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "ring" +version = "0.17.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" +dependencies = [ + "cc", + "cfg-if", + "getrandom 0.2.17", + "libc", + "untrusted", + "windows-sys 0.52.0", +] + [[package]] name = "robust" version = "1.2.0" @@ -2986,7 +3251,7 @@ dependencies = [ name = "rustgis-engine" version = "0.1.0" dependencies = [ - "base64", + "base64 0.22.1", "log", "rustgis-analysis", "rustgis-data", @@ -3003,11 +3268,16 @@ dependencies = [ name = "rustgis-geolibre" version = "0.1.0" dependencies = [ + "flate2", "log", "rustgis-analysis", "rustgis-data", "rustgis-geom", "serde_json", + "sha2", + "tar", + "ureq", + "zip", ] [[package]] @@ -3021,7 +3291,7 @@ dependencies = [ name = "rustgis-map" version = "0.1.0" dependencies = [ - "base64", + "base64 0.22.1", "crs-definitions", "proj4rs", "rustgis-data", @@ -3047,7 +3317,7 @@ dependencies = [ name = "rustgis-ui-egui" version = "0.1.0" dependencies = [ - "base64", + "base64 0.22.1", "egui", "egui_extras", "egui_kittest", @@ -3098,7 +3368,42 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.12.1", - "windows-sys 0.59.0", + "windows-sys 0.61.2", +] + +[[package]] +name = "rustls" +version = "0.23.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d41d731c7d2f962d1ccc364cec258de3c0e93b38c2fb3ba97ac74513048d634" +dependencies = [ + "log", + "once_cell", + "ring", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls-pki-types" +version = "1.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f4925028c7eb5d1fcdaf196971378ed9d2c1c4efc7dc5d011256f76c99c0a96" +dependencies = [ + "zeroize", +] + +[[package]] +name = "rustls-webpki" +version = "0.103.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3c3cf1d8b1e7d4927e2d154c3fcb02979afb9939629c62cd9048d4f07b60ac2" +dependencies = [ + "ring", + "rustls-pki-types", + "untrusted", ] [[package]] @@ -3209,6 +3514,17 @@ dependencies = [ "serde_core", ] +[[package]] +name = "sha2" +version = "0.10.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + [[package]] name = "shapefile" version = "0.9.0" @@ -3411,6 +3727,12 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6637bab7722d379c8b41ba849228d680cc12d0a45ba1fa2b48f2a30577a06731" +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + [[package]] name = "syn" version = "2.0.119" @@ -3433,6 +3755,17 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "synstructure" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "901704edd0dfe137f1987838ee4f259e4e063c31371bdb423f7ae38ec6f77f02" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.7", +] + [[package]] name = "sys-locale" version = "0.3.2" @@ -3445,6 +3778,17 @@ dependencies = [ "web-sys", ] +[[package]] +name = "tar" +version = "0.4.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f6221d9a6003c78398e3b239969f352578258df48c8eb051caadae0015bc840" +dependencies = [ + "filetime", + "libc", + "xattr", +] + [[package]] name = "tempfile" version = "3.27.0" @@ -3455,7 +3799,7 @@ dependencies = [ "getrandom 0.4.3", "once_cell", "rustix 1.1.5", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -3566,6 +3910,16 @@ dependencies = [ "strict-num", ] +[[package]] +name = "tinystr" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1e27c91459209c2986af3dcf603a5a74a4368754ce37414f59acc971167f643" +dependencies = [ + "displaydoc", + "zerovec", +] + [[package]] name = "tokio" version = "1.53.2" @@ -3665,6 +4019,12 @@ dependencies = [ "rustc-hash 2.1.3", ] +[[package]] +name = "typenum" +version = "1.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20" + [[package]] name = "uds_windows" version = "1.2.1" @@ -3673,7 +4033,7 @@ checksum = "f2f6fb2847f6742cd76af783a2a2c49e9375d0a111c7bef6f71cd9e738c72d6e" dependencies = [ "memoffset", "tempfile", - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -3700,6 +4060,65 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "ureq" +version = "3.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a7ac20be9b7726e0bbdbf974c059676d9acb1cd414961f570a4e8231cacd7fc" +dependencies = [ + "base64 0.23.1", + "flate2", + "log", + "percent-encoding", + "rustls", + "rustls-pki-types", + "ureq-proto", + "utf8-zero", + "webpki-roots", +] + +[[package]] +name = "ureq-proto" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f86fd172ccca569e458f61b6bdd6220965a9ef36e672a6852953b51a0e1583be" +dependencies = [ + "base64 0.23.1", + "http", + "httparse", + "log", +] + +[[package]] +name = "url" +version = "2.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", + "serde", +] + +[[package]] +name = "utf8-zero" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8c0a043c9540bae7c578c88f91dda8bd82e59ae27c21baca69c8b191aaf5a6e" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + [[package]] name = "uuid" version = "1.28.0" @@ -3754,6 +4173,12 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + [[package]] name = "wasip2" version = "1.0.4+wasi-0.2.12" @@ -3974,6 +4399,31 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "webbrowser" +version = "1.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62c35be770821a214dbc362fc26908c853e776c0004294d0b10b8a6bad582f94" +dependencies = [ + "jni", + "log", + "ndk-context", + "objc2 0.6.5", + "objc2-app-kit 0.3.2", + "objc2-foundation 0.3.2", + "url", + "web-sys", +] + +[[package]] +name = "webpki-roots" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dcd9d09a39985f5344844e66b0c530a33843579125f23e21e9f0f220850f22a" +dependencies = [ + "rustls-pki-types", +] + [[package]] name = "weezl" version = "0.1.12" @@ -4169,7 +4619,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -4513,6 +4963,12 @@ version = "0.57.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" +[[package]] +name = "writeable" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ad82d2a33cdc9674dc7465672f271e096168fcdbe0f799d9e6db8c5892679dc" + [[package]] name = "x11-dl" version = "2.21.0" @@ -4545,6 +5001,16 @@ version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea6fc2961e4ef194dcbfe56bb845534d0dc8098940c7e5c012a258bfec6701bd" +[[package]] +name = "xattr" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32e45ad4206f6d2479085147f02bc2ef834ac85886624a23575ae137c8aa8156" +dependencies = [ + "libc", + "rustix 1.1.5", +] + [[package]] name = "xcursor" version = "0.3.11" @@ -4580,6 +5046,29 @@ checksum = "e450f9b2ed1dff33c94c12589a87338689467b9c4f5d8a5710bd09a847d2c8a7" name = "xtask" version = "0.1.0" +[[package]] +name = "yoke" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "709fe23a0424b6a435d82152b1bd3fdfb0833487d5fa90d05d42762a9891fef5" +dependencies = [ + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec8ebde2db3681e8c9980cc27822030e68752690ddfa9473e739aeb4dbde6d71" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.7", + "synstructure", +] + [[package]] name = "zbus" version = "5.19.0" @@ -4706,6 +5195,83 @@ dependencies = [ "syn 2.0.119", ] +[[package]] +name = "zerofrom" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ec05a11813ea801ff6d75110ad09cd0824ddba17dfe17128ea0d5f68e6c5272" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f75b4683f6c7f45248d4d64056a24298c6281e0993356d7d1b4a1a962ef10d4a" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.7", + "synstructure", +] + +[[package]] +name = "zeroize" +version = "1.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13084392c5e4bc371903e2935a5eaeed24905a7511356b883835e18a78f6879" + +[[package]] +name = "zerotrie" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ea269c3bd32f0a32c321907a2ae912ba6f4649bb0fc764a15627e99a7095a3f" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb0464e17806c1d976d5cba29399c7f08e516e279e2ba493f63123b5fca67dd8" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34df6fc39dbd26ddc9c10e6a2984476e13acce22e64e4487636ef494369225da" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.7", +] + +[[package]] +name = "zip" +version = "2.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fabe6324e908f85a1c52063ce7aa26b68dcb7eb6dbc83a2d148403c9bc3eba50" +dependencies = [ + "arbitrary", + "crc32fast", + "crossbeam-utils", + "displaydoc", + "flate2", + "indexmap", + "memchr", + "thiserror 2.0.21", + "zopfli", +] + [[package]] name = "zlib-rs" version = "0.6.8" @@ -4718,6 +5284,18 @@ version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b" +[[package]] +name = "zopfli" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f05cd8797d63865425ff89b5c4a48804f35ba0ce8d125800027ad6017d2b5249" +dependencies = [ + "bumpalo", + "crc32fast", + "log", + "simd-adler32", +] + [[package]] name = "zune-core" version = "0.5.3" diff --git a/apps/rustgis/Cargo.toml b/apps/rustgis/Cargo.toml index 9ef078e3bd..f1d6c87357 100644 --- a/apps/rustgis/Cargo.toml +++ b/apps/rustgis/Cargo.toml @@ -13,7 +13,7 @@ workspace = true [dependencies] rustgis-engine = { workspace = true, features = ["geolibre"] } rustgis-ui-egui = { workspace = true } -eframe = { workspace = true, features = ["default_fonts", "wgpu", "accesskit", "wayland", "x11"] } +eframe = { workspace = true, features = ["default_fonts", "links", "wgpu", "accesskit", "wayland", "x11"] } egui = { workspace = true } serde_json = { workspace = true } log = { workspace = true } diff --git a/crates/engine/src/cmd/gp.rs b/crates/engine/src/cmd/gp.rs index 1aa7b523c8..31668c300c 100644 --- a/crates/engine/src/cmd/gp.rs +++ b/crates/engine/src/cmd/gp.rs @@ -22,6 +22,13 @@ pub fn commands() -> Vec { }) .view(), C::new("gp.geolibre", "GeoLibre Tools", "Analysis › Geoprocessing", |_, _| Ok(geolibre_status())).view(), + C::new("gp.installGeolibre", "Install GeoLibre Tools", "Analysis › Geoprocessing", |_, _| { + let path = install_geolibre(&|_, _| {})?; + #[cfg(feature = "geolibre")] + rustgis_geolibre::set_runner(Some(std::path::PathBuf::from(&path)))?; + Ok(json!({"path": path, "status": geolibre_status()})) + }) + .view(), C::new("gp.setGeolibre", "Locate GeoLibre Runner", "Analysis › Geoprocessing", set_geolibre) .view() .params(r#"{"path"?: "the geolibre executable (empty: look in the usual places)"}"#), @@ -50,6 +57,21 @@ pub fn geolibre_status() -> Value { json!({"supported": false, "available": false}) } +/// Downloads and installs the latest GeoLibre runner for this platform; returns the program's +/// path. `progress` gets the bytes received and the expected total. Blocks: the app calls it +/// from a background thread, then picks the runner with `gp.setGeolibre`. +pub fn install_geolibre(progress: &dyn Fn(u64, Option)) -> Result { + #[cfg(feature = "geolibre")] + { + rustgis_geolibre::install::install(progress).map(|p| p.display().to_string()) + } + #[cfg(not(feature = "geolibre"))] + { + let _ = progress; + Err("this build doesn't include the GeoLibre tools".into()) + } +} + /// Chooses the GeoLibre runner (an optional download), or looks for it again. fn set_geolibre(_s: &mut Session, p: &Value) -> CmdResult { #[cfg(feature = "geolibre")] diff --git a/crates/engine/src/tests.rs b/crates/engine/src/tests.rs index ca55ecebe6..9a5e24d57a 100644 --- a/crates/engine/src/tests.rs +++ b/crates/engine/src/tests.rs @@ -347,7 +347,14 @@ fn hostile_params_never_panic() { for id in ids { if matches!( id, - "project.save" | "project.saveAs" | "share.exportMap" | "share.exportLayer" | "share.exportTable" | "share.exportRaster" + "project.save" + | "project.saveAs" + | "share.exportMap" + | "share.exportLayer" + | "share.exportTable" + | "share.exportRaster" + // Downloads the runner from the network. + | "gp.installGeolibre" ) { continue; } diff --git a/crates/geolibre/Cargo.toml b/crates/geolibre/Cargo.toml index 78aae04ace..986dedb798 100644 --- a/crates/geolibre/Cargo.toml +++ b/crates/geolibre/Cargo.toml @@ -14,3 +14,10 @@ rustgis-data = { workspace = true } rustgis-analysis = { workspace = true } serde_json = { workspace = true } log = { workspace = true } +# One-click install of the runner: download the release archive over HTTPS (pure-Rust TLS), +# check its SHA-256 and unpack it. +ureq = { version = "3", default-features = false, features = ["rustls", "gzip"] } +sha2 = "0.10" +flate2 = "1" +tar = "0.4" +zip = { version = "2", default-features = false, features = ["deflate"] } diff --git a/crates/geolibre/src/install.rs b/crates/geolibre/src/install.rs new file mode 100644 index 0000000000..cd2a4325fc --- /dev/null +++ b/crates/geolibre/src/install.rs @@ -0,0 +1,166 @@ +//! One-click install of the `geolibre` runner: the latest geolibre-rust release's archive for +//! this platform, downloaded over HTTPS, checked against its published SHA-256 and unpacked into +//! RustGIS's data folder (where [`crate::runner`] looks for it). + +use std::io::Read; +use std::path::{Path, PathBuf}; + +use serde_json::Value; +use sha2::{Digest, Sha256}; + +/// The GitHub API address of the latest release. +const LATEST: &str = "https://api.github.com/repos/opengeos/geolibre-rust/releases/latest"; + +/// Archives larger than this are refused (the runner is about 19 MB). +const MAX_BYTES: u64 = 300 * 1024 * 1024; + +/// The release target this build runs on, as the archives name it. +pub fn target() -> Option<&'static str> { + Some(match (std::env::consts::OS, std::env::consts::ARCH) { + ("linux", "x86_64") => "x86_64-unknown-linux-gnu", + ("linux", "aarch64") => "aarch64-unknown-linux-gnu", + ("macos", "aarch64") => "aarch64-apple-darwin", + ("macos", "x86_64") => "x86_64-apple-darwin", + ("windows", "x86_64") => "x86_64-pc-windows-msvc", + _ => return None, + }) +} + +/// Where an installed runner lives: a `geolibre` folder in the platform's app-data location. +pub fn install_dir() -> Option { + let base = if cfg!(target_os = "windows") { + std::env::var_os("LOCALAPPDATA").or_else(|| std::env::var_os("APPDATA")).map(|d| PathBuf::from(d).join("RustGIS")) + } else if cfg!(target_os = "macos") { + std::env::var_os("HOME").map(|h| PathBuf::from(h).join("Library/Application Support/RustGIS")) + } else { + std::env::var_os("XDG_DATA_HOME") + .map(PathBuf::from) + .or_else(|| std::env::var_os("HOME").map(|h| PathBuf::from(h).join(".local/share"))) + .map(|d| d.join("rustgis")) + }; + base.map(|b| b.join("geolibre")) +} + +fn agent() -> ureq::Agent { + ureq::Agent::config_builder().timeout_global(Some(std::time::Duration::from_secs(600))).build().into() +} + +fn get(agent: &ureq::Agent, url: &str) -> Result, String> { + agent.get(url).header("User-Agent", concat!("RustGIS/", env!("CARGO_PKG_VERSION"))).call().map_err(|e| format!("{url}: {e}")) +} + +/// The latest release's tag and the archive and checksum URLs for `target`. +fn find_asset(agent: &ureq::Agent, target: &str) -> Result<(String, String, String, String), String> { + let text = get(agent, LATEST)?.body_mut().read_to_string().map_err(|e| e.to_string())?; + let release: Value = serde_json::from_str(&text).map_err(|e| format!("unexpected release information: {e}"))?; + let tag = release.get("tag_name").and_then(Value::as_str).unwrap_or("latest").to_string(); + let assets = release.get("assets").and_then(Value::as_array).cloned().unwrap_or_default(); + let url_of = |name: &str| { + assets + .iter() + .find(|a| a.get("name").and_then(Value::as_str) == Some(name)) + .and_then(|a| a.get("browser_download_url").and_then(Value::as_str)) + .map(str::to_string) + }; + let ext = if target.contains("windows") { "zip" } else { "tar.gz" }; + let name = format!("geolibre-{tag}-{target}.{ext}"); + let archive = url_of(&name).ok_or_else(|| format!("release {tag} has no runner for {target}"))?; + let sums = url_of(&format!("{name}.sha256")).ok_or_else(|| format!("release {tag} has no checksum for {name}"))?; + Ok((tag, name, archive, sums)) +} + +/// Downloads the runner, checks it and installs it; returns the installed program. `progress` +/// gets the bytes received and the expected total. +pub fn install(progress: &dyn Fn(u64, Option)) -> Result { + let target = target().ok_or("there is no GeoLibre runner for this platform")?; + let dir = install_dir().ok_or("can't find a folder to install the GeoLibre runner in")?; + let agent = agent(); + let (tag, name, archive_url, sums_url) = find_asset(&agent, target)?; + + let sums = get(&agent, &sums_url)?.body_mut().read_to_string().map_err(|e| e.to_string())?; + let expected = sums.split_whitespace().next().unwrap_or("").to_ascii_lowercase(); + if expected.len() != 64 || !expected.bytes().all(|b| b.is_ascii_hexdigit()) { + return Err(format!("{name}: unreadable checksum")); + } + + let mut resp = get(&agent, &archive_url)?; + let total = resp.body().content_length(); + if total.is_some_and(|t| t > MAX_BYTES) { + return Err(format!("{name} is unexpectedly large")); + } + let mut reader = resp.body_mut().as_reader(); + let mut bytes = Vec::with_capacity(total.unwrap_or(0).min(MAX_BYTES) as usize); + let mut buf = vec![0u8; 256 * 1024]; + loop { + let n = reader.read(&mut buf).map_err(|e| format!("{name}: {e}"))?; + if n == 0 { + break; + } + bytes.extend_from_slice(buf.get(..n).unwrap_or_default()); + if bytes.len() as u64 > MAX_BYTES { + return Err(format!("{name} is unexpectedly large")); + } + progress(bytes.len() as u64, total); + } + let actual: String = Sha256::digest(&bytes).iter().map(|b| format!("{b:02x}")).collect(); + if actual != expected { + return Err(format!("{name}: the download doesn't match its published checksum")); + } + + // Unpack into a fresh folder beside the install, then move the program into place. + std::fs::create_dir_all(&dir).map_err(|e| format!("{}: {e}", dir.display()))?; + let staging = dir.join(format!(".download-{}", std::process::id())); + let _ = std::fs::remove_dir_all(&staging); + std::fs::create_dir_all(&staging).map_err(|e| format!("{}: {e}", staging.display()))?; + let unpacked = unpack(&bytes, target, &staging); + let exe_name = if target.contains("windows") { "geolibre.exe" } else { "geolibre" }; + let found = unpacked.and_then(|_| find_file(&staging, exe_name, 3).ok_or_else(|| format!("{name} has no {exe_name}"))); + let result = found.and_then(|exe| { + let dest = dir.join(exe_name); + // Replace an older install; on Windows a running copy can't be overwritten, but a + // runner only runs while a tool does. + let _ = std::fs::remove_file(&dest); + std::fs::rename(&exe, &dest).map_err(|e| format!("{}: {e}", dest.display()))?; + make_executable(&dest)?; + Ok(dest) + }); + let _ = std::fs::remove_dir_all(&staging); + let dest = result?; + crate::runner::version_of(&dest).ok_or_else(|| format!("the installed {tag} runner doesn't start"))?; + Ok(dest) +} + +fn unpack(bytes: &[u8], target: &str, into: &Path) -> Result<(), String> { + if target.contains("windows") { + let mut zip = zip::ZipArchive::new(std::io::Cursor::new(bytes)).map_err(|e| e.to_string())?; + // `extract` keeps entries inside the folder (it rejects paths that escape it). + zip.extract(into).map_err(|e| e.to_string()) + } else { + let mut tar = tar::Archive::new(flate2::read::GzDecoder::new(bytes)); + // `unpack` keeps entries inside the folder too. + tar.unpack(into).map_err(|e| e.to_string()) + } +} + +/// A file named `name` within `dir`, at most `depth` folders down. +fn find_file(dir: &Path, name: &str, depth: usize) -> Option { + let entries: Vec = std::fs::read_dir(dir).ok()?.filter_map(|e| e.ok().map(|e| e.path())).collect(); + if let Some(f) = entries.iter().find(|p| p.is_file() && p.file_name().is_some_and(|n| n == name)) { + return Some(f.clone()); + } + if depth == 0 { + return None; + } + entries.iter().filter(|p| p.is_dir()).find_map(|d| find_file(d, name, depth - 1)) +} + +#[cfg(unix)] +fn make_executable(p: &Path) -> Result<(), String> { + use std::os::unix::fs::PermissionsExt; + std::fs::set_permissions(p, std::fs::Permissions::from_mode(0o755)).map_err(|e| format!("{}: {e}", p.display())) +} + +#[cfg(not(unix))] +fn make_executable(_: &Path) -> Result<(), String> { + Ok(()) +} diff --git a/crates/geolibre/src/lib.rs b/crates/geolibre/src/lib.rs index 72cb497221..094844ca32 100644 --- a/crates/geolibre/src/lib.rs +++ b/crates/geolibre/src/lib.rs @@ -19,6 +19,7 @@ //! like any program the user installs, so a tool could write elsewhere if asked to. #![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)] +pub mod install; pub mod runner; use std::collections::HashMap; diff --git a/crates/geolibre/src/runner.rs b/crates/geolibre/src/runner.rs index b9731eae76..5dd65e10b6 100644 --- a/crates/geolibre/src/runner.rs +++ b/crates/geolibre/src/runner.rs @@ -101,6 +101,10 @@ fn candidates() -> Vec { if let Some(p) = std::env::var_os(ENV) { v.push(PathBuf::from(p)); } + // Where one-click install puts it. + if let Some(dir) = crate::install::install_dir() { + v.push(dir.join(exe_name())); + } // Beside the app (a bundle that ships it), or in a `geolibre` folder there. if let Some(dir) = std::env::current_exe().ok().and_then(|e| e.parent().map(Path::to_path_buf)) { v.push(dir.join(exe_name())); diff --git a/crates/ui-egui/src/i18n/az.tsv b/crates/ui-egui/src/i18n/az.tsv index 09586f8f02..4677c8a4bf 100644 --- a/crates/ui-egui/src/i18n/az.tsv +++ b/crates/ui-egui/src/i18n/az.tsv @@ -187,6 +187,7 @@ Double-click İki dəfə klik Double-click to add Əlavə etmək üçün iki dəfə klikləyin Download the GeoLibre runner GeoLibre işlədicisini endir Downloaded {name} {name} endirildi +Downloading… {mb} MB Endirilir… {mb} MB DRA DRA Drag / middle-drag Sürüklə / orta düymə ilə sürüklə Drag a box or click to zoom in Yaxınlaşdırmaq üçün çərçivə çəkin və ya klikləyin @@ -309,6 +310,8 @@ Input Summary Features Giriş yekun obyektləri Input Table Giriş cədvəli Inquiry Sorğu Insert Əlavə et +Install GeoLibre Tools GeoLibre alətlərini quraşdır +Install GeoLibre tools GeoLibre alətlərini quraşdır Interface font: {font} İnterfeys şrifti: {font} Invalid: {error} Yanlışdır: {error} Invert Tərsinə çevir @@ -424,13 +427,14 @@ Open {code} on epsg.io {code} kodunu epsg.io-da aç Open, save and create projects Layihələri açın, saxlayın və yaradın Open… Aç… OR OR +Or Və ya Out Beyond Uzaqlaşma həddi Outline Kontur Outline color Kontur rəngi Outline width Kontur qalınlığı Output Çıxış Output Name Çıxış adı -Over 1,000 raster, vector, LiDAR, hydrology and terrain tools, from an optional download: the GeoLibre runner. Unpack it and locate the geolibre program. İstəyə bağlı endirmə ilə 1000-dən çox raster, vektor, LiDAR, hidrologiya və relyef aləti: GeoLibre işlədicisi. Arxivi açın və geolibre proqramını göstərin. +Over 1,000 raster, vector, LiDAR, hydrology and terrain tools, from an optional download of about 20 MB. Təxminən 20 MB-lıq istəyə bağlı endirmə ilə 1000-dən çox raster, vektor, LiDAR, hidrologiya və relyef aləti. Overlay Üst-üstə qoyma Pan (Explore) · any tool Sürüşdür (Kəşf) · istənilən alət Pan to a longitude/latitude. Uzunluq/en dairəsinə sürüşdürün. diff --git a/crates/ui-egui/src/i18n/de.tsv b/crates/ui-egui/src/i18n/de.tsv index 88c126b8b1..05035b0148 100644 --- a/crates/ui-egui/src/i18n/de.tsv +++ b/crates/ui-egui/src/i18n/de.tsv @@ -187,6 +187,7 @@ Double-click Doppelklick Double-click to add Zum Hinzufügen doppelklicken Download the GeoLibre runner GeoLibre-Runner herunterladen Downloaded {name} {name} heruntergeladen +Downloading… {mb} MB Wird heruntergeladen… {mb} MB DRA DRA Drag / middle-drag Ziehen / mittlere Maustaste ziehen Drag a box or click to zoom in Rechteck aufziehen oder klicken zum Vergrößern @@ -309,6 +310,8 @@ Input Summary Features Eingabe-Zusammenfassungsobjekte Input Table Eingabetabelle Inquiry Abfrage Insert Einfügen +Install GeoLibre Tools GeoLibre-Werkzeuge installieren +Install GeoLibre tools GeoLibre-Werkzeuge installieren Interface font: {font} Schriftart der Oberfläche: {font} Invalid: {error} Ungültig: {error} Invert Umkehren @@ -424,13 +427,14 @@ Open {code} on epsg.io {code} auf epsg.io öffnen Open, save and create projects Projekte öffnen, speichern und erstellen Open… Öffnen… OR OR +Or Oder Out Beyond Ausblenden über Outline Umriss Outline color Umrissfarbe Outline width Umrissbreite Output Ausgabe Output Name Ausgabename -Over 1,000 raster, vector, LiDAR, hydrology and terrain tools, from an optional download: the GeoLibre runner. Unpack it and locate the geolibre program. Über 1.000 Raster-, Vektor-, LiDAR-, Hydrologie- und Geländewerkzeuge als optionaler Download: der GeoLibre-Runner. Entpacken Sie ihn und wählen Sie das Programm geolibre aus. +Over 1,000 raster, vector, LiDAR, hydrology and terrain tools, from an optional download of about 20 MB. Über 1.000 Raster-, Vektor-, LiDAR-, Hydrologie- und Geländewerkzeuge als optionaler Download von etwa 20 MB. Overlay Überlagerung Pan (Explore) · any tool Verschieben (Erkunden) · jedes Werkzeug Pan to a longitude/latitude. Zu einer Länge/Breite verschieben. diff --git a/crates/ui-egui/src/i18n/es.tsv b/crates/ui-egui/src/i18n/es.tsv index d01860dc84..aee7e548cb 100644 --- a/crates/ui-egui/src/i18n/es.tsv +++ b/crates/ui-egui/src/i18n/es.tsv @@ -187,6 +187,7 @@ Double-click Doble clic Double-click to add Doble clic para añadir Download the GeoLibre runner Descargar el ejecutor de GeoLibre Downloaded {name} {name} descargado +Downloading… {mb} MB Descargando… {mb} MB DRA DRA Drag / middle-drag Arrastrar / arrastrar con botón central Drag a box or click to zoom in Arrastre un rectángulo o haga clic para acercar @@ -309,6 +310,8 @@ Input Summary Features Entidades de resumen de entrada Input Table Tabla de entrada Inquiry Consulta Insert Insertar +Install GeoLibre Tools Instalar herramientas de GeoLibre +Install GeoLibre tools Instalar herramientas de GeoLibre Interface font: {font} Fuente de la interfaz: {font} Invalid: {error} No válida: {error} Invert Invertir @@ -424,13 +427,14 @@ Open {code} on epsg.io Abrir {code} en epsg.io Open, save and create projects Abrir, guardar y crear proyectos Open… Abrir… OR OR +Or O Out Beyond Límite al alejar Outline Contorno Outline color Color del contorno Outline width Ancho del contorno Output Salida Output Name Nombre de salida -Over 1,000 raster, vector, LiDAR, hydrology and terrain tools, from an optional download: the GeoLibre runner. Unpack it and locate the geolibre program. Más de 1.000 herramientas ráster, vectoriales, LiDAR, hidrológicas y de terreno, en una descarga opcional: el ejecutor de GeoLibre. Descomprímalo y localice el programa geolibre. +Over 1,000 raster, vector, LiDAR, hydrology and terrain tools, from an optional download of about 20 MB. Más de 1.000 herramientas ráster, vectoriales, LiDAR, hidrológicas y de terreno, en una descarga opcional de unos 20 MB. Overlay Superposición Pan (Explore) · any tool Desplazar (Explorar) · cualquier herramienta Pan to a longitude/latitude. Desplazarse a una longitud/latitud. diff --git a/crates/ui-egui/src/i18n/fr.tsv b/crates/ui-egui/src/i18n/fr.tsv index fc19dd6f9a..a1e8cf1093 100644 --- a/crates/ui-egui/src/i18n/fr.tsv +++ b/crates/ui-egui/src/i18n/fr.tsv @@ -187,6 +187,7 @@ Double-click Double-clic Double-click to add Double-cliquez pour ajouter Download the GeoLibre runner Télécharger l'exécuteur GeoLibre Downloaded {name} {name} téléchargé +Downloading… {mb} MB Téléchargement… {mb} Mo DRA DRA Drag / middle-drag Glisser / glisser avec le bouton du milieu Drag a box or click to zoom in Tracez un rectangle ou cliquez pour zoomer @@ -309,6 +310,8 @@ Input Summary Features Entités de synthèse en entrée Input Table Table en entrée Inquiry Interrogation Insert Insertion +Install GeoLibre Tools Installer les outils GeoLibre +Install GeoLibre tools Installer les outils GeoLibre Interface font: {font} Police de l'interface : {font} Invalid: {error} Non valide : {error} Invert Inverser @@ -424,13 +427,14 @@ Open {code} on epsg.io Ouvrir {code} sur epsg.io Open, save and create projects Ouvrir, enregistrer et créer des projets Open… Ouvrir… OR OR +Or Ou Out Beyond Masquer en deçà de Outline Contour Outline color Couleur du contour Outline width Épaisseur du contour Output Sortie Output Name Nom en sortie -Over 1,000 raster, vector, LiDAR, hydrology and terrain tools, from an optional download: the GeoLibre runner. Unpack it and locate the geolibre program. Plus de 1 000 outils raster, vecteur, LiDAR, hydrologie et terrain, en téléchargement facultatif : l'exécuteur GeoLibre. Décompressez-le et localisez le programme geolibre. +Over 1,000 raster, vector, LiDAR, hydrology and terrain tools, from an optional download of about 20 MB. Plus de 1 000 outils raster, vecteur, LiDAR, hydrologie et terrain, en téléchargement facultatif d'environ 20 Mo. Overlay Superposition Pan (Explore) · any tool Déplacer (Explorer) · tout outil Pan to a longitude/latitude. Se déplacer vers une longitude/latitude. diff --git a/crates/ui-egui/src/i18n/id.tsv b/crates/ui-egui/src/i18n/id.tsv index b6ffb88ef1..bdd0605024 100644 --- a/crates/ui-egui/src/i18n/id.tsv +++ b/crates/ui-egui/src/i18n/id.tsv @@ -187,6 +187,7 @@ Double-click Klik ganda Double-click to add Klik ganda untuk menambah Download the GeoLibre runner Unduh runner GeoLibre Downloaded {name} {name} telah diunduh +Downloading… {mb} MB Mengunduh… {mb} MB DRA DRA Drag / middle-drag Seret / seret tombol tengah Drag a box or click to zoom in Seret kotak atau klik untuk memperbesar @@ -309,6 +310,8 @@ Input Summary Features Fitur Ringkasan Masukan Input Table Tabel Masukan Inquiry Penyelidikan Insert Sisipkan +Install GeoLibre Tools Pasang alat GeoLibre +Install GeoLibre tools Pasang alat GeoLibre Interface font: {font} Fon antarmuka: {font} Invalid: {error} Tidak valid: {error} Invert Balik @@ -424,13 +427,14 @@ Open {code} on epsg.io Buka {code} di epsg.io Open, save and create projects Buka, simpan, dan buat proyek Open… Buka… OR OR +Or Atau Out Beyond Perkecil Melewati Outline Garis tepi Outline color Warna garis tepi Outline width Lebar garis tepi Output Keluaran Output Name Nama Keluaran -Over 1,000 raster, vector, LiDAR, hydrology and terrain tools, from an optional download: the GeoLibre runner. Unpack it and locate the geolibre program. Lebih dari 1.000 alat raster, vektor, LiDAR, hidrologi, dan medan, dari unduhan opsional: runner GeoLibre. Ekstrak lalu tunjukkan program geolibre. +Over 1,000 raster, vector, LiDAR, hydrology and terrain tools, from an optional download of about 20 MB. Lebih dari 1.000 alat raster, vektor, LiDAR, hidrologi, dan medan, dari unduhan opsional sekitar 20 MB. Overlay Overlay Pan (Explore) · any tool Geser (Jelajah) · alat apa pun Pan to a longitude/latitude. Geser ke bujur/lintang. diff --git a/crates/ui-egui/src/i18n/it.tsv b/crates/ui-egui/src/i18n/it.tsv index e4387f3abd..eda8da6524 100644 --- a/crates/ui-egui/src/i18n/it.tsv +++ b/crates/ui-egui/src/i18n/it.tsv @@ -187,6 +187,7 @@ Double-click Doppio clic Double-click to add Doppio clic per aggiungere Download the GeoLibre runner Scarica l'esecutore GeoLibre Downloaded {name} Scaricato {name} +Downloading… {mb} MB Download in corso… {mb} MB DRA DRA Drag / middle-drag Trascina / trascina col tasto centrale Drag a box or click to zoom in Trascina un riquadro o fai clic per ingrandire @@ -309,6 +310,8 @@ Input Summary Features Elementi di riepilogo di input Input Table Tabella di input Inquiry Interrogazione Insert Inserisci +Install GeoLibre Tools Installa gli strumenti GeoLibre +Install GeoLibre tools Installa gli strumenti GeoLibre Interface font: {font} Font dell'interfaccia: {font} Invalid: {error} Non valida: {error} Invert Inverti @@ -424,13 +427,14 @@ Open {code} on epsg.io Apri {code} su epsg.io Open, save and create projects Apri, salva e crea progetti Open… Apri… OR OR +Or Oppure Out Beyond Oltre (riduzione) Outline Contorno Outline color Colore contorno Outline width Spessore contorno Output Output Output Name Nome output -Over 1,000 raster, vector, LiDAR, hydrology and terrain tools, from an optional download: the GeoLibre runner. Unpack it and locate the geolibre program. Oltre 1.000 strumenti raster, vettoriali, LiDAR, idrologici e del terreno, in un download facoltativo: l'esecutore GeoLibre. Decomprimilo e individua il programma geolibre. +Over 1,000 raster, vector, LiDAR, hydrology and terrain tools, from an optional download of about 20 MB. Oltre 1.000 strumenti raster, vettoriali, LiDAR, idrologici e del terreno, in un download facoltativo di circa 20 MB. Overlay Sovrapposizione Pan (Explore) · any tool Pan (Esplora) · qualsiasi strumento Pan to a longitude/latitude. Sposta la vista su una longitudine/latitudine. diff --git a/crates/ui-egui/src/i18n/ja.tsv b/crates/ui-egui/src/i18n/ja.tsv index 77e8368fd9..eb94dde4e8 100644 --- a/crates/ui-egui/src/i18n/ja.tsv +++ b/crates/ui-egui/src/i18n/ja.tsv @@ -187,6 +187,7 @@ Double-click ダブルクリック Double-click to add ダブルクリックで追加 Download the GeoLibre runner GeoLibre ランナーをダウンロード Downloaded {name} {name} をダウンロードしました +Downloading… {mb} MB ダウンロード中… {mb} MB DRA DRA Drag / middle-drag ドラッグ / 中ボタン ドラッグ Drag a box or click to zoom in ボックスをドラッグまたはクリックして拡大 @@ -309,6 +310,8 @@ Input Summary Features 入力集計フィーチャ Input Table 入力テーブル Inquiry 照会 Insert 挿入 +Install GeoLibre Tools GeoLibre ツールをインストール +Install GeoLibre tools GeoLibre ツールをインストール Interface font: {font} インターフェイスのフォント:{font} Invalid: {error} 無効:{error} Invert 反転 @@ -424,13 +427,14 @@ Open {code} on epsg.io epsg.io で {code} を開く Open, save and create projects プロジェクトを開く、保存する、作成する Open… 開く… OR OR +Or または Out Beyond 縮小の限界 Outline アウトライン Outline color アウトラインの色 Outline width アウトラインの幅 Output 出力 Output Name 出力名 -Over 1,000 raster, vector, LiDAR, hydrology and terrain tools, from an optional download: the GeoLibre runner. Unpack it and locate the geolibre program. ラスター、ベクター、LiDAR、水文、地形の 1,000 以上のツールを、オプションのダウンロード (GeoLibre ランナー) で利用できます。展開して geolibre プログラムの場所を指定してください。 +Over 1,000 raster, vector, LiDAR, hydrology and terrain tools, from an optional download of about 20 MB. ラスター、ベクター、LiDAR、水文、地形の 1,000 以上のツール (約 20 MB のオプションのダウンロード)。 Overlay オーバーレイ Pan (Explore) · any tool 画面移動(マップ操作)· 任意のツール Pan to a longitude/latitude. 経度/緯度に画面移動します。 diff --git a/crates/ui-egui/src/i18n/ko.tsv b/crates/ui-egui/src/i18n/ko.tsv index 032878decd..7360f4d722 100644 --- a/crates/ui-egui/src/i18n/ko.tsv +++ b/crates/ui-egui/src/i18n/ko.tsv @@ -187,6 +187,7 @@ Double-click 더블클릭 Double-click to add 더블클릭하여 추가 Download the GeoLibre runner GeoLibre 실행기 다운로드 Downloaded {name} {name} 다운로드됨 +Downloading… {mb} MB 다운로드 중… {mb} MB DRA DRA Drag / middle-drag 드래그 / 가운데 버튼 드래그 Drag a box or click to zoom in 상자를 드래그하거나 클릭하여 확대 @@ -309,6 +310,8 @@ Input Summary Features 입력 요약 피처 Input Table 입력 테이블 Inquiry 조회 Insert 삽입 +Install GeoLibre Tools GeoLibre 도구 설치 +Install GeoLibre tools GeoLibre 도구 설치 Interface font: {font} 인터페이스 글꼴: {font} Invalid: {error} 유효하지 않음: {error} Invert 반전 @@ -424,13 +427,14 @@ Open {code} on epsg.io epsg.io에서 {code} 열기 Open, save and create projects 프로젝트 열기, 저장 및 만들기 Open… 열기… OR OR +Or 또는 Out Beyond 다음보다 축소 시 Outline 외곽선 Outline color 외곽선 색상 Outline width 외곽선 두께 Output 출력 Output Name 출력 이름 -Over 1,000 raster, vector, LiDAR, hydrology and terrain tools, from an optional download: the GeoLibre runner. Unpack it and locate the geolibre program. 래스터, 벡터, LiDAR, 수문, 지형 도구 1,000개 이상을 선택적 다운로드인 GeoLibre 실행기로 제공합니다. 압축을 풀고 geolibre 프로그램을 지정하세요. +Over 1,000 raster, vector, LiDAR, hydrology and terrain tools, from an optional download of about 20 MB. 래스터, 벡터, LiDAR, 수문, 지형 도구 1,000개 이상 (약 20MB의 선택적 다운로드). Overlay 중첩 Pan (Explore) · any tool 이동(탐색) · 모든 도구 Pan to a longitude/latitude. 경도/위도로 이동합니다. diff --git a/crates/ui-egui/src/i18n/nl.tsv b/crates/ui-egui/src/i18n/nl.tsv index 5ffbcb2f11..9c54aeda65 100644 --- a/crates/ui-egui/src/i18n/nl.tsv +++ b/crates/ui-egui/src/i18n/nl.tsv @@ -187,6 +187,7 @@ Double-click Dubbelklik Double-click to add Dubbelklik om toe te voegen Download the GeoLibre runner GeoLibre-runner downloaden Downloaded {name} {name} gedownload +Downloading… {mb} MB Downloaden… {mb} MB DRA DRA Drag / middle-drag Slepen / slepen met middelste knop Drag a box or click to zoom in Sleep een kader of klik om in te zoomen @@ -309,6 +310,8 @@ Input Summary Features Invoerobjecten voor samenvatting Input Table Invoertabel Inquiry Opvragen Insert Invoegen +Install GeoLibre Tools GeoLibre-gereedschappen installeren +Install GeoLibre tools GeoLibre-gereedschappen installeren Interface font: {font} Interfacelettertype: {font} Invalid: {error} Ongeldig: {error} Invert Omkeren @@ -424,13 +427,14 @@ Open {code} on epsg.io {code} openen op epsg.io Open, save and create projects Projecten openen, opslaan en maken Open… Openen… OR OR +Or Of Out Beyond Uitgezoomd voorbij Outline Omtrek Outline color Omtrekkleur Outline width Omtrekdikte Output Uitvoer Output Name Uitvoernaam -Over 1,000 raster, vector, LiDAR, hydrology and terrain tools, from an optional download: the GeoLibre runner. Unpack it and locate the geolibre program. Meer dan 1.000 raster-, vector-, LiDAR-, hydrologie- en terreingereedschappen als optionele download: de GeoLibre-runner. Pak hem uit en wijs het programma geolibre aan. +Over 1,000 raster, vector, LiDAR, hydrology and terrain tools, from an optional download of about 20 MB. Meer dan 1.000 raster-, vector-, LiDAR-, hydrologie- en terreingereedschappen als optionele download van ongeveer 20 MB. Overlay Overlay Pan (Explore) · any tool Pannen (Verkennen) · elk gereedschap Pan to a longitude/latitude. Pannen naar een lengte-/breedtegraad. diff --git a/crates/ui-egui/src/i18n/pt.tsv b/crates/ui-egui/src/i18n/pt.tsv index 68f59a8abd..d4332887fe 100644 --- a/crates/ui-egui/src/i18n/pt.tsv +++ b/crates/ui-egui/src/i18n/pt.tsv @@ -187,6 +187,7 @@ Double-click Clique duplo Double-click to add Clique duplo para adicionar Download the GeoLibre runner Baixar o executor do GeoLibre Downloaded {name} {name} baixado +Downloading… {mb} MB Baixando… {mb} MB DRA DRA Drag / middle-drag Arrastar / arrastar com botão do meio Drag a box or click to zoom in Arraste um retângulo ou clique para aproximar @@ -309,6 +310,8 @@ Input Summary Features Feições de resumo de entrada Input Table Tabela de entrada Inquiry Consulta Insert Inserir +Install GeoLibre Tools Instalar ferramentas GeoLibre +Install GeoLibre tools Instalar ferramentas GeoLibre Interface font: {font} Fonte da interface: {font} Invalid: {error} Inválida: {error} Invert Inverter @@ -424,13 +427,14 @@ Open {code} on epsg.io Abrir {code} no epsg.io Open, save and create projects Abrir, salvar e criar projetos Open… Abrir… OR OR +Or Ou Out Beyond Limite ao afastar Outline Contorno Outline color Cor do contorno Outline width Largura do contorno Output Saída Output Name Nome de saída -Over 1,000 raster, vector, LiDAR, hydrology and terrain tools, from an optional download: the GeoLibre runner. Unpack it and locate the geolibre program. Mais de 1.000 ferramentas raster, vetoriais, LiDAR, hidrológicas e de terreno, em um download opcional: o executor do GeoLibre. Descompacte-o e localize o programa geolibre. +Over 1,000 raster, vector, LiDAR, hydrology and terrain tools, from an optional download of about 20 MB. Mais de 1.000 ferramentas raster, vetoriais, LiDAR, hidrológicas e de terreno, em um download opcional de cerca de 20 MB. Overlay Sobreposição Pan (Explore) · any tool Deslocar (Explorar) · qualquer ferramenta Pan to a longitude/latitude. Deslocar para uma longitude/latitude. diff --git a/crates/ui-egui/src/i18n/ru.tsv b/crates/ui-egui/src/i18n/ru.tsv index db960cc18a..6006a94d00 100644 --- a/crates/ui-egui/src/i18n/ru.tsv +++ b/crates/ui-egui/src/i18n/ru.tsv @@ -187,6 +187,7 @@ Double-click Двойной щелчок Double-click to add Двойной щелчок — добавить Download the GeoLibre runner Скачать модуль запуска GeoLibre Downloaded {name} Загружено: {name} +Downloading… {mb} MB Загрузка… {mb} МБ DRA DRA Drag / middle-drag Перетаскивание / средней кнопкой Drag a box or click to zoom in Растяните рамку или щёлкните для приближения @@ -309,6 +310,8 @@ Input Summary Features Входные объекты сводки Input Table Входная таблица Inquiry Запрос Insert Вставка +Install GeoLibre Tools Установить инструменты GeoLibre +Install GeoLibre tools Установить инструменты GeoLibre Interface font: {font} Шрифт интерфейса: {font} Invalid: {error} Недопустимо: {error} Invert Инвертировать @@ -424,13 +427,14 @@ Open {code} on epsg.io Открыть {code} на epsg.io Open, save and create projects Открытие, сохранение и создание проектов Open… Открыть… OR OR +Or Или Out Beyond Выкл. за пределами Outline Контур Outline color Цвет контура Outline width Толщина контура Output Вывод Output Name Имя результата -Over 1,000 raster, vector, LiDAR, hydrology and terrain tools, from an optional download: the GeoLibre runner. Unpack it and locate the geolibre program. Более 1000 инструментов для растров, векторов, LiDAR, гидрологии и рельефа в необязательной загрузке: модуль запуска GeoLibre. Распакуйте его и укажите программу geolibre. +Over 1,000 raster, vector, LiDAR, hydrology and terrain tools, from an optional download of about 20 MB. Более 1000 инструментов для растров, векторов, LiDAR, гидрологии и рельефа в необязательной загрузке размером около 20 МБ. Overlay Наложение Pan (Explore) · any tool Панорамирование (обзор) · любой инструмент Pan to a longitude/latitude. Переместиться к долготе/широте. diff --git a/crates/ui-egui/src/i18n/tr.tsv b/crates/ui-egui/src/i18n/tr.tsv index 9351e0e46f..58fcec6b73 100644 --- a/crates/ui-egui/src/i18n/tr.tsv +++ b/crates/ui-egui/src/i18n/tr.tsv @@ -187,6 +187,7 @@ Double-click Çift tıklama Double-click to add Eklemek için çift tıklayın Download the GeoLibre runner GeoLibre çalıştırıcısını indir Downloaded {name} {name} indirildi +Downloading… {mb} MB İndiriliyor… {mb} MB DRA DRA Drag / middle-drag Sürükleme / orta tuşla sürükleme Drag a box or click to zoom in Yakınlaştırmak için kutu sürükleyin veya tıklayın @@ -309,6 +310,8 @@ Input Summary Features Girdi Özet Detayları Input Table Girdi Tablosu Inquiry Sorgulama Insert Ekle +Install GeoLibre Tools GeoLibre araçlarını yükle +Install GeoLibre tools GeoLibre araçlarını yükle Interface font: {font} Arayüz yazı tipi: {font} Invalid: {error} Geçersiz: {error} Invert Ters Çevir @@ -424,13 +427,14 @@ Open {code} on epsg.io {code} kodunu epsg.io'da aç Open, save and create projects Projeleri aç, kaydet ve oluştur Open… Aç… OR OR +Or Ya da Out Beyond Ötesinde Kapalı Outline Dış Çizgi Outline color Dış çizgi rengi Outline width Dış çizgi kalınlığı Output Çıktı Output Name Çıktı Adı -Over 1,000 raster, vector, LiDAR, hydrology and terrain tools, from an optional download: the GeoLibre runner. Unpack it and locate the geolibre program. İsteğe bağlı bir indirmeyle 1.000'den fazla raster, vektör, LiDAR, hidroloji ve arazi aracı: GeoLibre çalıştırıcısı. Arşivi açın ve geolibre programını gösterin. +Over 1,000 raster, vector, LiDAR, hydrology and terrain tools, from an optional download of about 20 MB. Yaklaşık 20 MB'lık isteğe bağlı bir indirmeyle 1.000'den fazla raster, vektör, LiDAR, hidroloji ve arazi aracı. Overlay Bindirme Pan (Explore) · any tool Kaydır (Keşfet) · herhangi bir araç Pan to a longitude/latitude. Bir boylam/enleme kaydır. diff --git a/crates/ui-egui/src/i18n/vi.tsv b/crates/ui-egui/src/i18n/vi.tsv index b413566ba2..59c7f5e286 100644 --- a/crates/ui-egui/src/i18n/vi.tsv +++ b/crates/ui-egui/src/i18n/vi.tsv @@ -187,6 +187,7 @@ Double-click Nhấp đúp Double-click to add Nhấp đúp để thêm Download the GeoLibre runner Tải trình chạy GeoLibre Downloaded {name} Đã tải xuống {name} +Downloading… {mb} MB Đang tải… {mb} MB DRA DRA Drag / middle-drag Kéo / kéo chuột giữa Drag a box or click to zoom in Kéo hộp hoặc nhấp để phóng to @@ -309,6 +310,8 @@ Input Summary Features Đối tượng tổng hợp đầu vào Input Table Bảng đầu vào Inquiry Truy vấn Insert Chèn +Install GeoLibre Tools Cài đặt công cụ GeoLibre +Install GeoLibre tools Cài đặt công cụ GeoLibre Interface font: {font} Phông giao diện: {font} Invalid: {error} Không hợp lệ: {error} Invert Đảo ngược @@ -424,13 +427,14 @@ Open {code} on epsg.io Mở {code} trên epsg.io Open, save and create projects Mở, lưu và tạo dự án Open… Mở… OR OR +Or Hoặc Out Beyond Khi thu nhỏ hơn Outline Viền Outline color Màu viền Outline width Độ rộng viền Output Đầu ra Output Name Tên đầu ra -Over 1,000 raster, vector, LiDAR, hydrology and terrain tools, from an optional download: the GeoLibre runner. Unpack it and locate the geolibre program. Hơn 1.000 công cụ raster, vector, LiDAR, thủy văn và địa hình, qua một bản tải tùy chọn: trình chạy GeoLibre. Giải nén và chỉ đến chương trình geolibre. +Over 1,000 raster, vector, LiDAR, hydrology and terrain tools, from an optional download of about 20 MB. Hơn 1.000 công cụ raster, vector, LiDAR, thủy văn và địa hình, qua một bản tải tùy chọn khoảng 20 MB. Overlay Chồng lớp Pan (Explore) · any tool Di chuyển (Khám phá) · mọi công cụ Pan to a longitude/latitude. Di chuyển tới kinh độ/vĩ độ. diff --git a/crates/ui-egui/src/i18n/zh.tsv b/crates/ui-egui/src/i18n/zh.tsv index 929d55e0e0..6bfe744087 100644 --- a/crates/ui-egui/src/i18n/zh.tsv +++ b/crates/ui-egui/src/i18n/zh.tsv @@ -187,6 +187,7 @@ Double-click 双击 Double-click to add 双击添加 Download the GeoLibre runner 下载 GeoLibre 运行器 Downloaded {name} 已下载 {name} +Downloading… {mb} MB 正在下载… {mb} MB DRA DRA Drag / middle-drag 拖动 / 中键拖动 Drag a box or click to zoom in 拖动矩形框或单击以放大 @@ -309,6 +310,8 @@ Input Summary Features 输入汇总要素 Input Table 输入表 Inquiry 查询 Insert 插入 +Install GeoLibre Tools 安装 GeoLibre 工具 +Install GeoLibre tools 安装 GeoLibre 工具 Interface font: {font} 界面字体:{font} Invalid: {error} 无效:{error} Invert 反转 @@ -424,13 +427,14 @@ Open {code} on epsg.io 在 epsg.io 上打开 {code} Open, save and create projects 打开、保存和创建工程 Open… 打开… OR OR +Or 或 Out Beyond 缩小超过 Outline 轮廓 Outline color 轮廓颜色 Outline width 轮廓宽度 Output 输出 Output Name 输出名称 -Over 1,000 raster, vector, LiDAR, hydrology and terrain tools, from an optional download: the GeoLibre runner. Unpack it and locate the geolibre program. 1000 多个栅格、矢量、LiDAR、水文和地形工具,来自可选下载:GeoLibre 运行器。解压后定位 geolibre 程序。 +Over 1,000 raster, vector, LiDAR, hydrology and terrain tools, from an optional download of about 20 MB. 1000 多个栅格、矢量、LiDAR、水文和地形工具,约 20 MB 的可选下载。 Overlay 叠加 Pan (Explore) · any tool 平移(浏览)· 任意工具 Pan to a longitude/latitude. 平移到某个经度/纬度。 diff --git a/crates/ui-egui/src/panes.rs b/crates/ui-egui/src/panes.rs index 2ead3f6641..6f9fb5b369 100644 --- a/crates/ui-egui/src/panes.rs +++ b/crates/ui-egui/src/panes.rs @@ -521,6 +521,17 @@ pub struct GpForm { pub values: HashMap<&'static str, String>, pub search: String, pub last: Option<(bool, Vec)>, + /// A GeoLibre runner install in progress (it runs on a background thread). + pub install: Option>>, +} + +/// Progress of a one-click GeoLibre runner install. +#[derive(Default)] +pub struct Install { + pub done: u64, + pub total: Option, + /// The installed program, or why it failed; set when the install ends. + pub result: Option>, } impl GpForm { @@ -565,37 +576,93 @@ fn geolibre_card(app: &mut RustGisApp, ui: &mut Ui, t: &Tokens) { if status["supported"] != true { return; } + // An install that just finished: use the runner, and remember it. + let finished = app.gp.install.as_ref().and_then(|st| st.lock().ok().and_then(|mut s| s.result.take())); + if let Some(result) = finished { + app.gp.install = None; + match result.and_then(|path| app.run("gp.setGeolibre", json!({"path": path})).map(|_| path)) { + Ok(path) => { + if let Some(save) = &app.services.save_pref { + save("geolibre_runner", &path); + } + app.gp.last = None; + } + Err(e) => app.gp.last = Some((false, vec![e])), + } + return; + } let download = status["download"].as_str().unwrap_or("https://github.com/opengeos/geolibre-rust/releases/latest").to_string(); ui.add_space(6.0); - egui::Frame::NONE - .stroke(Stroke::new(1.0, t.border)) - .corner_radius(CornerRadius::same(6)) - .inner_margin(egui::Margin::same(10)) - .show(ui, |ui| { + egui::Frame::NONE.stroke(Stroke::new(1.0, t.border)).corner_radius(CornerRadius::same(6)).inner_margin(egui::Margin::same(10)).show( + ui, + |ui| { ui.set_width(ui.available_width()); ui.label(egui::RichText::new(tl!("GeoLibre tools")).font(semibold(13.0))); ui.label( egui::RichText::new(tl!( - "Over 1,000 raster, vector, LiDAR, hydrology and terrain tools, from an optional download: the GeoLibre runner. Unpack it and locate the geolibre program." + "Over 1,000 raster, vector, LiDAR, hydrology and terrain tools, from an optional download of about 20 MB." )) .size(11.5) .color(t.text_dim), ); - ui.add_space(4.0); - ui.add(egui::Hyperlink::from_label_and_url(tl!("Download the GeoLibre runner"), download).open_in_new_tab(true)); - #[cfg(not(target_arch = "wasm32"))] - if ui.button(tl!("Locate…")).clicked() - && let Some(path) = rfd::FileDialog::new().set_title(tl!("Locate the GeoLibre runner")).pick_file() - { - let path = path.display().to_string(); - match app.run("gp.setGeolibre", json!({"path": path})) { - Ok(_) => { - if let Some(save) = &app.services.save_pref { - save("geolibre_runner", &path); - } + ui.add_space(6.0); + let progress = app.gp.install.as_ref().and_then(|st| st.lock().ok().map(|s| (s.done, s.total))); + match progress { + Some((done, total)) => { + let mb = |b: u64| format!("{:.1}", b as f64 / 1_048_576.0); + let text = crate::i18n::fmt("Downloading… {mb} MB", &[("mb", &mb(done))]); + let bar = egui::ProgressBar::new(total.map(|t| done as f32 / t.max(1) as f32).unwrap_or(0.0)).text(text); + ui.add(if total.is_some() { bar } else { bar.animate(true) }); + // Keep drawing while the download runs on its thread. + ui.ctx().request_repaint_after(std::time::Duration::from_millis(100)); + } + None => { + #[cfg(not(target_arch = "wasm32"))] + if ui + .add( + egui::Button::new(egui::RichText::new(tl!("Install GeoLibre tools")).color(egui::Color32::WHITE)) + .fill(t.green) + .corner_radius(CornerRadius::same(6)), + ) + .clicked() + { + let st = std::sync::Arc::new(std::sync::Mutex::new(Install::default())); + app.gp.install = Some(st.clone()); app.gp.last = None; + let ctx = ui.ctx().clone(); + std::thread::spawn(move || { + let result = rustgis_engine::cmd::gp::install_geolibre(&|done, total| { + if let Ok(mut s) = st.lock() { + s.done = done; + s.total = total; + } + }); + if let Ok(mut s) = st.lock() { + s.result = Some(result); + } + ctx.request_repaint(); + }); } - Err(e) => app.gp.last = Some((false, vec![e])), + ui.add_space(2.0); + ui.horizontal_wrapped(|ui| { + ui.label(egui::RichText::new(tl!("Or")).size(11.0).color(t.text_dim)); + ui.add(egui::Hyperlink::from_label_and_url(tl!("Download the GeoLibre runner"), download).open_in_new_tab(true)); + #[cfg(not(target_arch = "wasm32"))] + if ui.small_button(tl!("Locate…")).clicked() + && let Some(path) = rfd::FileDialog::new().set_title(tl!("Locate the GeoLibre runner")).pick_file() + { + let path = path.display().to_string(); + match app.run("gp.setGeolibre", json!({"path": path})) { + Ok(_) => { + if let Some(save) = &app.services.save_pref { + save("geolibre_runner", &path); + } + app.gp.last = None; + } + Err(e) => app.gp.last = Some((false, vec![e])), + } + } + }); } } if let Some((false, msgs)) = &app.gp.last { @@ -603,7 +670,8 @@ fn geolibre_card(app: &mut RustGisApp, ui: &mut Ui, t: &Tokens) { ui.label(egui::RichText::new(m).size(11.0).color(t.red)); } } - }); + }, + ); } fn geoprocessing(app: &mut RustGisApp, ui: &mut Ui, t: &Tokens) { diff --git a/docs/user-guide.md b/docs/user-guide.md index 82e228d23b..cfda5bd103 100644 --- a/docs/user-guide.md +++ b/docs/user-guide.md @@ -136,13 +136,17 @@ interpolation and vector work. They run on the map's layers and add their output layers. The suite is an optional download, so RustGIS itself stays small: the **GeoLibre runner**, a -single `geolibre` program (about 19 MB to download). - -1. Download the archive for your platform (`geolibre--.tar.gz`, or `.zip` - on Windows) from the [geolibre-rust releases](https://github.com/opengeos/geolibre-rust/releases/latest) - and unpack it anywhere. -2. In the Geoprocessing pane, click **Locate…** under *GeoLibre tools* and pick the - `geolibre` program. RustGIS remembers it. +single `geolibre` program (about 20 MB to download). In the Geoprocessing pane, click +**Install GeoLibre tools** under *GeoLibre tools*: RustGIS downloads the latest runner for your +platform from the [geolibre-rust releases](https://github.com/opengeos/geolibre-rust/releases/latest), +checks it against its published SHA-256 checksum and installs it in its data folder +(`~/.local/share/rustgis/geolibre` on Linux, `~/Library/Application Support/RustGIS/geolibre` +on macOS, `%LOCALAPPDATA%\RustGIS\geolibre` on Windows). From the command line, +`gp.installGeolibre` does the same. + +To install it yourself instead, download the archive for your platform +(`geolibre--.tar.gz`, or `.zip` on Windows), unpack it anywhere, and click +**Locate…** to pick the `geolibre` program; RustGIS remembers it. RustGIS also finds the runner without asking when it is next to the RustGIS program (or in a `geolibre` folder beside it), on your `PATH`, or named by the `RUSTGIS_GEOLIBRE` environment From ca8351373d1c1a4b1c59129578d5b7306c774184 Mon Sep 17 00:00:00 2001 From: giswqs Date: Sun, 11 Oct 2026 00:36:40 -0400 Subject: [PATCH 9/9] Address review feedback - is_external matches external tools by id, so a spec handed out before a reload (an open tool form) still runs; the first load is serialised so two callers don't both run the provider. - The runner search skips empty or relative PATH entries (the current folder), and tool runs get a null stdin. - Install keeps the previous runner until the new one is in place: it is set aside as .old, restored if the move fails, removed after. - Docs: the release checksum guards against a corrupted download; the release itself is trusted as for a manual download. --- crates/analysis/src/lib.rs | 12 +++++++++++- crates/geolibre/src/install.rs | 22 +++++++++++++++++----- crates/geolibre/src/runner.rs | 5 +++-- docs/user-guide.md | 3 ++- 4 files changed, 33 insertions(+), 9 deletions(-) diff --git a/crates/analysis/src/lib.rs b/crates/analysis/src/lib.rs index e930512ee2..abe05f423b 100644 --- a/crates/analysis/src/lib.rs +++ b/crates/analysis/src/lib.rs @@ -145,6 +145,14 @@ pub fn external_tools() -> &'static [ToolSpec] { { return tools; } + // One load at a time: a second caller waits for the first instead of loading again. + static LOADING: std::sync::Mutex<()> = std::sync::Mutex::new(()); + let _loading = LOADING.lock(); + if let Ok(cur) = EXTERNAL.read() + && let Some(tools) = *cur + { + return tools; + } let tools: &'static [ToolSpec] = Box::leak( std::panic::catch_unwind(provider) .unwrap_or_else(|_| { @@ -174,7 +182,9 @@ pub fn tools() -> impl Iterator { /// Whether a tool comes from the external suite. pub fn is_external(spec: &ToolSpec) -> bool { - external_tools().iter().any(|t| std::ptr::eq(t, spec)) + // By id, not by address: a spec handed out before a reload (an open tool form) is still + // the same tool. + !TOOLS.iter().any(|t| std::ptr::eq(t, spec)) && external_tools().iter().any(|t| t.id == spec.id) } pub fn tool(id: &str) -> Option<&'static ToolSpec> { diff --git a/crates/geolibre/src/install.rs b/crates/geolibre/src/install.rs index cd2a4325fc..2e01a6553a 100644 --- a/crates/geolibre/src/install.rs +++ b/crates/geolibre/src/install.rs @@ -1,6 +1,10 @@ //! One-click install of the `geolibre` runner: the latest geolibre-rust release's archive for //! this platform, downloaded over HTTPS, checked against its published SHA-256 and unpacked into //! RustGIS's data folder (where [`crate::runner`] looks for it). +//! +//! The checksum comes from the same release, so it guards against a corrupted or truncated +//! download, not against a compromised release: trust rests on HTTPS and on the opengeos +//! GitHub releases, as when downloading the runner by hand. use std::io::Read; use std::path::{Path, PathBuf}; @@ -117,11 +121,19 @@ pub fn install(progress: &dyn Fn(u64, Option)) -> Result { let found = unpacked.and_then(|_| find_file(&staging, exe_name, 3).ok_or_else(|| format!("{name} has no {exe_name}"))); let result = found.and_then(|exe| { let dest = dir.join(exe_name); - // Replace an older install; on Windows a running copy can't be overwritten, but a - // runner only runs while a tool does. - let _ = std::fs::remove_file(&dest); - std::fs::rename(&exe, &dest).map_err(|e| format!("{}: {e}", dest.display()))?; - make_executable(&dest)?; + // Replace an older install without ever losing it: set it aside, move the new one in, + // and put the old one back if that fails. + let old = dir.join(format!("{exe_name}.old")); + let _ = std::fs::remove_file(&old); + let had_old = dest.exists() && std::fs::rename(&dest, &old).is_ok(); + if let Err(e) = std::fs::rename(&exe, &dest).map_err(|e| format!("{}: {e}", dest.display())).and_then(|_| make_executable(&dest)) { + if had_old { + let _ = std::fs::rename(&old, &dest); + } + return Err(e); + } + // A copy that's running (Windows) can't be deleted now; the next install clears it. + let _ = std::fs::remove_file(&old); Ok(dest) }); let _ = std::fs::remove_dir_all(&staging); diff --git a/crates/geolibre/src/runner.rs b/crates/geolibre/src/runner.rs index 5dd65e10b6..1389adf64f 100644 --- a/crates/geolibre/src/runner.rs +++ b/crates/geolibre/src/runner.rs @@ -111,7 +111,8 @@ fn candidates() -> Vec { v.push(dir.join("geolibre").join(exe_name())); } if let Some(path) = std::env::var_os("PATH") { - v.extend(std::env::split_paths(&path).map(|d| d.join(exe_name()))); + // Absolute entries only: an empty or relative one would mean the current folder. + v.extend(std::env::split_paths(&path).filter(|d| d.is_absolute()).map(|d| d.join(exe_name()))); } v } @@ -184,7 +185,7 @@ pub struct Ran { pub fn run(id: &str, args: &[(String, Value)], dir: &Path) -> Result { let (exe, _) = find().ok_or("the GeoLibre runner isn't installed")?; let mut c = command(&exe); - c.current_dir(dir).arg(id); + c.current_dir(dir).stdin(Stdio::null()).arg(id); for (k, v) in args { c.arg(format!("--{k}={}", arg_text(v))); } diff --git a/docs/user-guide.md b/docs/user-guide.md index cfda5bd103..70fe88bdaf 100644 --- a/docs/user-guide.md +++ b/docs/user-guide.md @@ -139,7 +139,8 @@ The suite is an optional download, so RustGIS itself stays small: the **GeoLibre single `geolibre` program (about 20 MB to download). In the Geoprocessing pane, click **Install GeoLibre tools** under *GeoLibre tools*: RustGIS downloads the latest runner for your platform from the [geolibre-rust releases](https://github.com/opengeos/geolibre-rust/releases/latest), -checks it against its published SHA-256 checksum and installs it in its data folder +checks it against its published SHA-256 checksum (which catches a corrupted download; the +release itself is trusted as when you download it by hand) and installs it in its data folder (`~/.local/share/rustgis/geolibre` on Linux, `~/Library/Application Support/RustGIS/geolibre` on macOS, `%LOCALAPPDATA%\RustGIS\geolibre` on Windows). From the command line, `gp.installGeolibre` does the same.