From f0d1553846f4f98eb20de37ed13ac2735e43f7aa Mon Sep 17 00:00:00 2001 From: Corey Farwell Date: Fri, 1 Nov 2024 22:43:41 -0400 Subject: [PATCH 1/2] start --- Cargo.lock | 508 ++++++++++++------------------- geo-file-loader/Cargo.toml | 10 +- geo-file-loader/src/geojson.rs | 26 -- geo-file-loader/src/gpx.rs | 28 -- geo-file-loader/src/lib.rs | 196 ++++++++++-- geo-file-loader/src/shapefile.rs | 25 -- geo-file-loader/src/wkt.rs | 34 --- rgis-file-loader/src/jobs.rs | 3 +- 8 files changed, 378 insertions(+), 452 deletions(-) delete mode 100644 geo-file-loader/src/geojson.rs delete mode 100644 geo-file-loader/src/gpx.rs delete mode 100644 geo-file-loader/src/shapefile.rs delete mode 100644 geo-file-loader/src/wkt.rs diff --git a/Cargo.lock b/Cargo.lock index 0fcc1d3..608eb16 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,9 +4,9 @@ version = 4 [[package]] name = "ab_glyph" -version = "0.2.28" +version = "0.2.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79faae4620f45232f599d9bc7b290f88247a0834162c4495ab2f02d60004adfb" +checksum = "ec3672c180e71eeaaac3a541fbbc5f5ad4def8b747c595ad30d674e43049f7b0" dependencies = [ "ab_glyph_rasterizer", "owned_ttf_parser", @@ -76,9 +76,9 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.24.1" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5fb1d8e4442bd405fdfd1dacb42792696b0cf9cb15882e5d097b742a676d375" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" dependencies = [ "gimli", ] @@ -172,9 +172,9 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.8" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" +checksum = "8365de52b16c035ff4fcafe0092ba9390540e3e352870ac09933bebcaa2c8c56" [[package]] name = "approx" @@ -248,12 +248,6 @@ dependencies = [ "zbus", ] -[[package]] -name = "assert_approx_eq" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c07dab4369547dbe5114677b33fbbf724971019f3818172d59a97a61c774ffd" - [[package]] name = "async-broadcast" version = "0.5.1" @@ -391,7 +385,7 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.86", ] [[package]] @@ -426,7 +420,7 @@ checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.86", ] [[package]] @@ -559,7 +553,7 @@ dependencies = [ "bevy_macro_utils", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.86", ] [[package]] @@ -624,7 +618,7 @@ checksum = "3fbfc33a4c6b80760bb8bf850a2cc65a1e031da62fd3ca8b552189104dc98514" dependencies = [ "bevy_macro_utils", "quote", - "syn 2.0.79", + "syn 2.0.86", ] [[package]] @@ -671,7 +665,7 @@ dependencies = [ "bevy_macro_utils", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.86", ] [[package]] @@ -738,7 +732,7 @@ dependencies = [ "bevy_macro_utils", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.86", ] [[package]] @@ -842,7 +836,7 @@ checksum = "bfc65e570012e64a21f3546df68591aaede8349e6174fb500071677f54f06630" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.86", "toml_edit", ] @@ -930,7 +924,7 @@ dependencies = [ "bevy_macro_utils", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.86", "uuid", ] @@ -989,7 +983,7 @@ dependencies = [ "bevy_macro_utils", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.86", ] [[package]] @@ -1155,7 +1149,7 @@ checksum = "38f1ab8f2f6f58439d260081d89a42b02690e5fdd64f814edc9417d33fcf2857" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.86", ] [[package]] @@ -1290,22 +1284,22 @@ checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "bytemuck" -version = "1.18.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94bbb0ad554ad961ddc5da507a12a29b14e4ae5bda06b19f575a3e6079d2e2ae" +checksum = "8334215b81e418a0a7bdb8ef0849474f40bb10c8b71f1c4ed315cff49f32494d" dependencies = [ "bytemuck_derive", ] [[package]] name = "bytemuck_derive" -version = "1.7.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cc8b54b395f2fcfbb3d90c47b01c7f444d94d05bdeb775811dec868ac3bbc26" +checksum = "bcfcc3cd946cb52f0bbfdbbcfa2f4e24f75ebb6c0e1002f7c25904fada18b9ec" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.86", ] [[package]] @@ -1322,9 +1316,9 @@ checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" [[package]] name = "bytes" -version = "1.7.2" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" +checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da" [[package]] name = "calloop" @@ -1354,9 +1348,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.24" +version = "1.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "812acba72f0a070b003d3697490d2b55b837230ae7c6c6497f05cc2ddbb8d938" +checksum = "c2e7962b54006dcfcc61cb72735f4d89bb97061dd6a7ed882ec6b8ee53714c6f" dependencies = [ "jobserver", "libc", @@ -1389,18 +1383,18 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "clap" -version = "4.5.18" +version = "4.5.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0956a43b323ac1afaffc053ed5c4b7c1f1800bacd1683c353aabbb752515dd3" +checksum = "b97f376d85a664d5837dbae44bf546e6477a679ff6610010f17276f686d867e8" dependencies = [ "clap_builder", ] [[package]] name = "clap_builder" -version = "4.5.18" +version = "4.5.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d72166dd41634086d5803a47eb71ae740e61d84709c36f3c34110173db3961b" +checksum = "19bc80abd44e4bed93ca373a0704ccbd1b710dc5749406201bb018272808dc54" dependencies = [ "anstyle", "clap_lex", @@ -1679,31 +1673,12 @@ version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" -[[package]] -name = "dbase" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86bc97a72d9aca92b9a8095b3bfe8f691c54bb15eefaacec53882604062428bf" -dependencies = [ - "byteorder", - "time", -] - [[package]] name = "dconf_rs" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7046468a81e6a002061c01e6a7c83139daf91b11c30e66795b13217c2d885c8b" -[[package]] -name = "deranged" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" -dependencies = [ - "powerfmt", -] - [[package]] name = "detect-desktop-environment" version = "0.2.0" @@ -1869,14 +1844,14 @@ checksum = "fd31dbbd9743684d339f907a87fe212cb7b51d75b9e8e74181fe363199ee9b47" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.86", ] [[package]] name = "encoding_rs" -version = "0.8.34" +version = "0.8.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" dependencies = [ "cfg-if", ] @@ -1905,7 +1880,7 @@ checksum = "de0d48a183585823424a4ce1aa132d174a6a81bd540895822eb4c8373a8e49e8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.86", ] [[package]] @@ -1949,16 +1924,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "error-chain" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d2f06b9cac1506ece98fe3231e3cc9c4410ec3d5b1f24ae1c8946f0742cdefc" -dependencies = [ - "backtrace", - "version_check", -] - [[package]] name = "error-code" version = "3.3.1" @@ -2009,9 +1974,9 @@ checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" [[package]] name = "fdeflate" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8090f921a24b04994d9929e204f50b498a33ea6ba559ffaa05e04f7ee7fb5ab" +checksum = "07c6f4c64c1d33a3111c4466f7365ebdcc37c5bd1ea0d62aae2e3d722aacbedb" dependencies = [ "simd-adler32", ] @@ -2083,7 +2048,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.86", ] [[package]] @@ -2109,30 +2074,30 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", ] [[package]] name = "futures-core" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-io" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-lite" -version = "2.3.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5" +checksum = "3f1fa2f9765705486b33fd2acf1577f8ec449c2ba1f318ae5447697b7c08d210" dependencies = [ "fastrand", "futures-core", @@ -2143,32 +2108,32 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.86", ] [[package]] name = "futures-sink" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-util" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-core", "futures-io", @@ -2233,13 +2198,12 @@ name = "geo-file-loader" version = "0.1.0" dependencies = [ "bytes", - "geo", - "geo-features", - "geo-projected", - "geozero", + "geo-traits", + "geojson", + "num-traits", "thiserror", "time-logger", - "typed-num", + "wkt", ] [[package]] @@ -2305,30 +2269,15 @@ dependencies = [ [[package]] name = "geojson" version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5d728c1df1fbf328d74151efe6cb0586f79ee813346ea981add69bd22c9241b" +source = "git+https://github.com/georust/geojson.git?branch=geo-traits-impl#40bec4b3efe859e7978113465b52921cae6a40fe" dependencies = [ - "log", - "serde", - "serde_json", - "thiserror", -] - -[[package]] -name = "geozero" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5f28f34864745eb2f123c990c6ffd92c1584bd39439b3f27ff2a0f4ea5b309b" -dependencies = [ - "byteorder", - "dbase", + "bytemuck", + "geo-traits", "geo-types", - "geojson", - "gpx", "log", + "serde", "serde_json", "thiserror", - "wkt", ] [[package]] @@ -2356,9 +2305,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.31.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32085ea23f3234fc7846555e85283ba4de91e21016dc0455a16286d87a292d64" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "gl_generator" @@ -2466,20 +2415,6 @@ dependencies = [ "bitflags 2.6.0", ] -[[package]] -name = "gpx" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b436c838dada2b577d1b80ac62b5569584990fb10fc6554a95cfd67c6e5db9e" -dependencies = [ - "assert_approx_eq", - "error-chain", - "geo-types", - "thiserror", - "time", - "xml-rs", -] - [[package]] name = "grid" version = "0.14.0" @@ -2544,6 +2479,12 @@ dependencies = [ "serde", ] +[[package]] +name = "hashbrown" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" + [[package]] name = "hassle-rs" version = "0.11.0" @@ -2654,9 +2595,9 @@ checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" [[package]] name = "hyper" -version = "1.4.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" +checksum = "bbbff0a806a4728c99295b254c8838933b5b082d75e3cb70c8dab21fdfbcfa9a" dependencies = [ "bytes", "futures-channel", @@ -2707,9 +2648,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b" +checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" dependencies = [ "bytes", "futures-channel", @@ -2736,9 +2677,9 @@ dependencies = [ [[package]] name = "image" -version = "0.25.2" +version = "0.25.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99314c8a2152b8ddb211f924cdae532d8c5e4c8bb54728e12fff1b0cd5963a10" +checksum = "bc144d44a31d753b02ce64093d532f55ff8dc4ebf2ffb8a63c0dda691385acae" dependencies = [ "bytemuck", "byteorder-lite", @@ -2749,28 +2690,28 @@ dependencies = [ [[package]] name = "immutable-chunkmap" -version = "2.0.5" +version = "2.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4419f022e55cc63d5bbd6b44b71e1d226b9c9480a47824c706e9d54e5c40c5eb" +checksum = "12f97096f508d54f8f8ab8957862eee2ccd628847b6217af1a335e1c44dee578" dependencies = [ "arrayvec", ] [[package]] name = "indexmap" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b900aa2f7301e21c36462b170ee99994de34dff39a4a6a528e80e7376d07e5" +checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ "equivalent", - "hashbrown 0.14.5", + "hashbrown 0.15.0", ] [[package]] name = "ipnet" -version = "2.10.0" +version = "2.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "187674a687eed5fe42285b40c6291f9a01517d415fad1c3cbc6a9f778af7fcd4" +checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" [[package]] name = "itertools" @@ -2826,9 +2767,9 @@ checksum = "f5d4a7da358eff58addd2877a45865158f0d78c911d43a5784ceb7bbf52833b0" [[package]] name = "js-sys" -version = "0.3.70" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" +checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" dependencies = [ "wasm-bindgen", ] @@ -2858,9 +2799,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.159" +version = "0.2.161" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" +checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" [[package]] name = "libloading" @@ -2884,20 +2825,9 @@ dependencies = [ [[package]] name = "libm" -version = "0.2.8" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" - -[[package]] -name = "libredox" -version = "0.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3af92c55d7d839293953fcd0fda5ecfe93297cfde6ffbdec13b41d99c0ba6607" -dependencies = [ - "bitflags 2.6.0", - "libc", - "redox_syscall 0.4.1", -] +checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" [[package]] name = "libredox" @@ -2907,6 +2837,7 @@ checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ "bitflags 2.6.0", "libc", + "redox_syscall 0.5.7", ] [[package]] @@ -3155,12 +3086,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "num-conv" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" - [[package]] name = "num-traits" version = "0.2.19" @@ -3189,7 +3114,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.86", ] [[package]] @@ -3426,27 +3351,24 @@ dependencies = [ [[package]] name = "object" -version = "0.36.4" +version = "0.36.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "084f1a5821ac4c651660a94a7153d27ac9d8a53736203f58b31945ded098070a" +checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.20.1" +version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82881c4be219ab5faaf2ad5e5e5ecdff8c66bd7402ca3160975c93b24961afd1" -dependencies = [ - "portable-atomic", -] +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "openssl" -version = "0.10.66" +version = "0.10.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" +checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5" dependencies = [ "bitflags 2.6.0", "cfg-if", @@ -3465,7 +3387,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.86", ] [[package]] @@ -3476,9 +3398,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.103" +version = "0.9.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" +checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741" dependencies = [ "cc", "libc", @@ -3488,11 +3410,11 @@ dependencies = [ [[package]] name = "orbclient" -version = "0.3.47" +version = "0.3.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52f0d54bde9774d3a51dcf281a5def240c71996bc6ca05d2c847ec8b2b216166" +checksum = "ba0b26cec2e24f08ed8bb31519a9333140a6599b867dac464bb150bdb796fd43" dependencies = [ - "libredox 0.0.2", + "libredox", ] [[package]] @@ -3523,9 +3445,9 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "owned_ttf_parser" -version = "0.24.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "490d3a563d3122bf7c911a59b0add9389e5ec0f5f0c3ac6b91ff235a0e6a7f90" +checksum = "22ec719bbf3b2a81c109a4e20b1f129b5566b7dce654bc3872f6a05abf82b2c4" dependencies = [ "ttf-parser", ] @@ -3583,29 +3505,29 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.1.5" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" +checksum = "be57f64e946e500c8ee36ef6331845d40a93055567ec57e8fae13efd33759b95" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.5" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" +checksum = "3c0f5fad0874fc7abcd4d750e76917eaebbecaa2c20bde22e1dbeeba8beb758c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.86", ] [[package]] name = "pin-project-lite" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" [[package]] name = "pin-utils" @@ -3664,18 +3586,6 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22686f4785f02a4fcc856d3b3bb19bf6c8160d103f7a99cc258bddd0251dc7f2" -[[package]] -name = "portable-atomic" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc9c68a3f6da06753e9335d63e27f6b9754dd1920d941135b7ea8224f141adb2" - -[[package]] -name = "powerfmt" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" - [[package]] name = "pp-rs" version = "0.2.1" @@ -3711,18 +3621,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" dependencies = [ "unicode-ident", ] [[package]] name = "profiling" -version = "1.0.15" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43d84d1d7a6ac92673717f9f6d1518374ef257669c24ebc5ac25d5033828be58" +checksum = "afbdc74edc00b6f6a218ca6a5364d6226a259d4b8ea1af4a0ea063f27e179f4d" [[package]] name = "quick-xml" @@ -3821,15 +3731,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ "getrandom", - "libredox 0.1.3", + "libredox", "thiserror", ] [[package]] name = "regex" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", @@ -3877,9 +3787,9 @@ checksum = "19b30a45b0cd0bcca8037f3d0dc3421eaf95327a17cad11964fb8179b4fc4832" [[package]] name = "reqwest" -version = "0.12.8" +version = "0.12.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f713147fbe92361e52392c73b8c9e48c04c6625bce969ef54dc901e58e042a7b" +checksum = "a77c62af46e79de0a562e1a9849205ffcb7fc1238876e9bd743357570e04046f" dependencies = [ "base64 0.22.1", "bytes", @@ -4234,9 +4144,9 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustix" -version = "0.38.37" +version = "0.38.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" +checksum = "aa260229e6538e52293eeb577aabd09945a09d6d9cc0fc550ed7529056c2e32a" dependencies = [ "bitflags 2.6.0", "errno", @@ -4247,9 +4157,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.13" +version = "0.23.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2dabaac7466917e566adb06783a81ca48944c6898a1b08b9374106dd671f4c8" +checksum = "eee87ff5d9b36712a58574e12e9f0ea80f915a5b0ac518d322b24a465617925e" dependencies = [ "once_cell", "rustls-pki-types", @@ -4269,9 +4179,9 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e696e35370c65c9c541198af4543ccd580cf17fc25d8e05c5a242b202488c55" +checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" [[package]] name = "rustls-webpki" @@ -4301,9 +4211,9 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.24" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9aaafd5a2b6e3d657ff009d82fbd630b6bd54dd4eb06f21693925cdf80f9b8b" +checksum = "01227be5826fa0690321a2ba6c5cd57a19cf3f6a09e76973b58e61de6ab9d1c1" dependencies = [ "windows-sys 0.59.0", ] @@ -4364,29 +4274,29 @@ checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" [[package]] name = "serde" -version = "1.0.210" +version = "1.0.214" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" +checksum = "f55c3193aca71c12ad7890f1785d2b73e1b9f63a0bbc353c08ef26fe03fc56b5" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.210" +version = "1.0.214" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" +checksum = "de523f781f095e28fa605cdce0f8307e451cc0fd14e2eb4cd2e98a355b147766" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.86", ] [[package]] name = "serde_json" -version = "1.0.128" +version = "1.0.132" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" +checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03" dependencies = [ "itoa", "memchr", @@ -4402,7 +4312,7 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.86", ] [[package]] @@ -4596,9 +4506,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.79" +version = "2.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590" +checksum = "e89275301d38033efb81a6e60e3497e734dfcc62571f2854bf4b16690398824c" dependencies = [ "proc-macro2", "quote", @@ -4672,32 +4582,32 @@ dependencies = [ [[package]] name = "terminal_size" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21bebf2b7c9e0a515f6e0f8c51dc0f8e4696391e6f1ff30379559f8365fb0df7" +checksum = "4f599bd7ca042cfdf8f4512b277c02ba102247820f9d9d4a9f521f496751a6ef" dependencies = [ "rustix", - "windows-sys 0.48.0", + "windows-sys 0.59.0", ] [[package]] name = "thiserror" -version = "1.0.64" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" +checksum = "5d171f59dbaa811dbbb1aee1e73db92ec2b122911a48e1390dfe327a821ddede" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.64" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" +checksum = "b08be0f17bd307950653ce45db00cd31200d82b624b36e181337d9c7d92765b5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.86", ] [[package]] @@ -4721,27 +4631,6 @@ dependencies = [ "weezl", ] -[[package]] -name = "time" -version = "0.3.36" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" -dependencies = [ - "deranged", - "itoa", - "num-conv", - "powerfmt", - "serde", - "time-core", - "time-macros", -] - -[[package]] -name = "time-core" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" - [[package]] name = "time-logger" version = "0.1.0" @@ -4750,16 +4639,6 @@ dependencies = [ "web-time", ] -[[package]] -name = "time-macros" -version = "0.2.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" -dependencies = [ - "num-conv", - "time-core", -] - [[package]] name = "tiny-skia" version = "0.11.4" @@ -4802,9 +4681,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.40.0" +version = "1.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" +checksum = "145f3413504347a2be84393cc8a7d2fb4d863b375909ea59f2158261aa258bbb" dependencies = [ "backtrace", "bytes", @@ -4826,7 +4705,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.86", ] [[package]] @@ -4905,7 +4784,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.86", ] [[package]] @@ -4976,9 +4855,9 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "ttf-parser" -version = "0.24.1" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5be21190ff5d38e8b4a2d3b6a3ae57f612cc39c96e83cedeaf7abc338a8bac4a" +checksum = "5902c5d130972a0000f60860bfbf46f7ca3db5391eddfedd1b8728bd9dc96c0e" [[package]] name = "typed-num" @@ -5014,9 +4893,9 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.15" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" +checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" [[package]] name = "unicode-ident" @@ -5077,9 +4956,9 @@ checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" [[package]] name = "uuid" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" +checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" dependencies = [ "getrandom", "serde", @@ -5130,9 +5009,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" +checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" dependencies = [ "cfg-if", "once_cell", @@ -5141,24 +5020,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" +checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.86", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.43" +version = "0.4.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" +checksum = "cc7ec4f8827a71586374db3e87abdb5a2bb3a15afed140221307c3ec06b1f63b" dependencies = [ "cfg-if", "js-sys", @@ -5168,9 +5047,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" +checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -5178,28 +5057,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" +checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.86", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" +checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" [[package]] name = "wasm-streams" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e072d4e72f700fb3443d8fe94a39315df013eef1104903cdb0a2abd322bbecd" +checksum = "15053d8d85c7eccdbefef60f06769760a563c7f0a9d6902a13d35c7800b0ad65" dependencies = [ "futures-util", "js-sys", @@ -5224,9 +5103,9 @@ dependencies = [ [[package]] name = "wayland-client" -version = "0.31.6" +version = "0.31.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3f45d1222915ef1fd2057220c1d9d9624b7654443ea35c3877f7a52bd0a5a2d" +checksum = "b66249d3fc69f76fd74c82cc319300faa554e9d865dab1f7cd66cc20db10b280" dependencies = [ "bitflags 2.6.0", "rustix", @@ -5247,9 +5126,9 @@ dependencies = [ [[package]] name = "wayland-cursor" -version = "0.31.6" +version = "0.31.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a94697e66e76c85923b0d28a0c251e8f0666f58fc47d316c0f4da6da75d37cb" +checksum = "32b08bc3aafdb0035e7fe0fdf17ba0c09c268732707dca4ae098f60cb28c9e4c" dependencies = [ "rustix", "wayland-client", @@ -5258,9 +5137,9 @@ dependencies = [ [[package]] name = "wayland-protocols" -version = "0.32.4" +version = "0.32.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b5755d77ae9040bb872a25026555ce4cb0ae75fd923e90d25fba07d81057de0" +checksum = "7cd0ade57c4e6e9a8952741325c30bf82f4246885dca8bf561898b86d0c1f58e" dependencies = [ "bitflags 2.6.0", "wayland-backend", @@ -5270,9 +5149,9 @@ dependencies = [ [[package]] name = "wayland-protocols-plasma" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a0a41a6875e585172495f7a96dfa42ca7e0213868f4f15c313f7c33221a7eff" +checksum = "9b31cab548ee68c7eb155517f2212049dc151f7cd7910c2b66abfd31c3ee12bd" dependencies = [ "bitflags 2.6.0", "wayland-backend", @@ -5283,9 +5162,9 @@ dependencies = [ [[package]] name = "wayland-protocols-wlr" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dad87b5fd1b1d3ca2f792df8f686a2a11e3fe1077b71096f7a175ab699f89109" +checksum = "782e12f6cd923c3c316130d56205ebab53f55d6666b7faddfad36cecaeeb4022" dependencies = [ "bitflags 2.6.0", "wayland-backend", @@ -5319,9 +5198,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.70" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" +checksum = "f6488b90108c040df0fe62fa815cbdee25124641df01814dd7282749234c6112" dependencies = [ "js-sys", "wasm-bindgen", @@ -5556,7 +5435,7 @@ checksum = "942ac266be9249c84ca862f0a164a39533dc2f6f33dc98ec89c8da99b82ea0bd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.86", ] [[package]] @@ -5567,7 +5446,7 @@ checksum = "da33557140a288fae4e1d5f8873aaf9eb6613a9cf82c3e070223ff177f598b60" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.86", ] [[package]] @@ -5895,13 +5774,14 @@ dependencies = [ [[package]] name = "wkt" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "296937617013271141d1145d9c05861f5ed3b1bc4297e81c692aa3cff9270a9c" +version = "0.11.1" +source = "git+https://github.com/georust/wkt.git?branch=kyle%2Fgeo-traits#a0d29b1ad7e15fcff663f998315193df5d845b19" dependencies = [ + "geo-traits", "geo-types", "log", "num-traits", + "serde", "thiserror", ] @@ -6031,7 +5911,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.86", "zvariant_utils", ] @@ -6064,7 +5944,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.86", ] [[package]] @@ -6096,7 +5976,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.86", "zvariant_utils", ] @@ -6108,5 +5988,5 @@ checksum = "c51bcff7cc3dbb5055396bcf774748c3dab426b4b8659046963523cee4808340" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.86", ] diff --git a/geo-file-loader/Cargo.toml b/geo-file-loader/Cargo.toml index 422a3be..5b9d551 100644 --- a/geo-file-loader/Cargo.toml +++ b/geo-file-loader/Cargo.toml @@ -7,9 +7,9 @@ publish = false [dependencies] bytes = "1" time-logger = { path = "../time-logger" } -geo = "0.28" -geo-features = { path = "../geo-features" } -geozero = { version = "0.14", features = ["with-wkt", "with-gpx", "with-shp"] } thiserror = "1" -geo-projected = { path = "../geo-projected" } -typed-num = { path = "../typed-num" } +# geojson = { version = "0.24", features = ["geo-traits"] } +geojson = { git = "https://github.com/georust/geojson.git", branch = "geo-traits-impl", features = ["geo-traits"] } +wkt = { git = "https://github.com/georust/wkt.git", branch = "kyle/geo-traits", features = ["serde"] } +geo-traits = "0.1" +num-traits = "0.2" diff --git a/geo-file-loader/src/geojson.rs b/geo-file-loader/src/geojson.rs deleted file mode 100644 index cdfb02e..0000000 --- a/geo-file-loader/src/geojson.rs +++ /dev/null @@ -1,26 +0,0 @@ -use geo_projected::geometry_wrap; -use geozero::GeozeroDatasource; -use std::io; - -pub struct GeoJsonSource { - pub bytes: bytes::Bytes, -} - -impl crate::FileLoader for GeoJsonSource { - fn from_bytes(bytes: bytes::Bytes) -> Self { - GeoJsonSource { bytes } - } - - fn load( - self, - ) -> Result, crate::Error> - { - let bytes_cursor = io::Cursor::new(&self.bytes); - let mut geojson_reader = geozero::geojson::GeoJsonReader(bytes_cursor); - let mut geo_writer = geozero::geo_types::GeoWriter::new(); - geojson_reader.process(&mut geo_writer)?; - let geometry = geo_writer.take_geometry().ok_or(crate::Error::NoGeometry)?; - let geometry = geometry_wrap::(geometry); - Ok(geo_features::FeatureCollection::from_geometry(geometry)) - } -} diff --git a/geo-file-loader/src/gpx.rs b/geo-file-loader/src/gpx.rs deleted file mode 100644 index 1914007..0000000 --- a/geo-file-loader/src/gpx.rs +++ /dev/null @@ -1,28 +0,0 @@ -use geo_projected::geometry_wrap; -use geozero::GeozeroDatasource; -use std::io; - -// TOOD: create generic file loader for geozero - -pub struct GpxSource { - pub bytes: bytes::Bytes, -} - -impl crate::FileLoader for GpxSource { - fn from_bytes(bytes: bytes::Bytes) -> Self { - GpxSource { bytes } - } - - fn load( - self, - ) -> Result, crate::Error> - { - let bytes_cursor = io::Cursor::new(&self.bytes); - let mut gpx_reader = geozero::gpx::GpxReader(bytes_cursor); - let mut geo_writer = geozero::geo_types::GeoWriter::new(); - gpx_reader.process(&mut geo_writer)?; - let geometry = geo_writer.take_geometry().ok_or(crate::Error::NoGeometry)?; - let geometry = geometry_wrap::(geometry); - Ok(geo_features::FeatureCollection::from_geometry(geometry)) - } -} diff --git a/geo-file-loader/src/lib.rs b/geo-file-loader/src/lib.rs index a13611d..39085f9 100644 --- a/geo-file-loader/src/lib.rs +++ b/geo-file-loader/src/lib.rs @@ -6,15 +6,17 @@ clippy::expect_used )] -mod geojson; -mod gpx; -mod shapefile; -mod wkt; +mod geojson_loader; +mod gpx_loader; +mod shapefile_loader; +mod wkt_loader; -pub use crate::geojson::GeoJsonSource; -pub use crate::gpx::GpxSource; -pub use crate::shapefile::ShapefileSource; -pub use crate::wkt::WktSource; +pub use crate::geojson_loader::GeoJsonSource; +pub use crate::gpx_loader::GpxSource; +pub use crate::shapefile_loader::ShapefileSource; +pub use crate::wkt_loader::WktSource; +use enum_delegate::delegate; +use geo_traits::GeometryTrait; #[derive(Clone, Copy, PartialEq, Eq, Debug)] pub enum FileFormat { @@ -27,10 +29,8 @@ pub enum FileFormat { #[derive(thiserror::Error, Debug)] pub enum Error { #[error("{0}")] - Geozero(#[from] geozero::error::GeozeroError), - #[error("{0}")] - Shapefile(#[from] geozero::shp::Error), - #[error("No geometry found in GeoJSON file")] + GeoJson(#[from] geojson::Error), + #[error("No geometry found in file")] NoGeometry, } @@ -54,10 +54,7 @@ impl FileFormat { } } -pub fn load_file( - file_format: FileFormat, - bytes: bytes::Bytes, -) -> Result, Error> { +pub fn load_file(file_format: FileFormat, bytes: bytes::Bytes) -> Result { match file_format { FileFormat::GeoJson => Ok(GeoJsonSource::from_bytes(bytes).load()?), FileFormat::Gpx => Ok(GpxSource::from_bytes(bytes).load()?), @@ -66,9 +63,170 @@ pub fn load_file( } } +// Define "either" type that can be either a GeoJson or Wkt associated types +#[derive(Debug, PartialEq, Copy, Clone, geo_traits::PointTrait)] +pub enum Either { + GeoJson(X), + Wkt(Y), +} + +impl PartialOrd for Either +where + X: PartialOrd, + Y: PartialOrd, +{ + fn partial_cmp(&self, other: &Self) -> Option { + todo!() + } +} + +impl num_traits::ToPrimitive for Either +where + X: num_traits::ToPrimitive, + Y: num_traits::ToPrimitive, +{ + fn to_i64(&self) -> Option { + todo!() + } + + fn to_u64(&self) -> Option { + todo!() + } +} + +impl num_traits::NumCast for Either +where + X: num_traits::NumCast, + Y: num_traits::NumCast, +{ + fn from(n: Self) -> Option { + todo!() + } +} + +impl num_traits::Num for Either +where + X: num_traits::Num, + Y: num_traits::Num, +{ + type FromStrRadixErr; + + fn from_str_radix(str: &str, radix: u32) -> Result { + todo!() + } +} + +impl geo_traits::CoordTrait for Either +where + X: geo_traits::CoordTrait, + Y: geo_traits::CoordTrait, +{ + type T = Either; + + fn dim(&self) -> geo_traits::Dimensions { + match self { + Self::GeoJson(geojson) => geojson.dim(), + Self::Wkt(wkt) => wkt.dim(), + } + } + + fn x(&self) -> Self::T { + match self { + Self::GeoJson(geojson) => Either::GeoJson(geojson.x()), + Self::Wkt(wkt) => Either::Wkt(wkt.x()), + } + } + + fn y(&self) -> Self::T { + match self { + Self::GeoJson(geojson) => Either::GeoJson(geojson.y()), + Self::Wkt(wkt) => Either::Wkt(wkt.y()), + } + } + + fn nth_unchecked(&self, n: usize) -> Self::T { + todo!() + } +} + +impl geo_traits::PointTrait for Either +where + X: geo_traits::PointTrait, + Y: geo_traits::PointTrait, +{ + type T = X::T; + type CoordType<'a> + = Either, Y::CoordType<'a>> + where + X: 'a, + Y: 'a; + + fn dim(&self) -> geo_traits::Dimensions { + match self { + Self::GeoJson(geojson) => geojson.dim(), + Self::Wkt(wkt) => wkt.dim(), + } + } + fn coord(&self) -> Option> { + match self { + Self::GeoJson(geojson) => geojson.coord().map(Either::GeoJson), + Self::Wkt(wkt) => wkt.coord().map(Either::Wkt), + } + } +} + +#[delegate(for(LastName))] +pub enum LoadedFile { + GeoJson(geojson::GeoJson), + Wkt(wkt::Wkt), +} + +impl geo_traits::GeometryTrait for LoadedFile { + type T = f64; + type PointType<'a> = Either< + ::PointType<'a>, + as geo_traits::GeometryTrait>::PointType<'a>, + >; + type LineStringType<'a> = ::LineStringType<'a>; + type PolygonType<'a> = ::PolygonType<'a>; + type MultiPointType<'a> = ::MultiPointType<'a>; + type MultiLineStringType<'a> = + ::MultiLineStringType<'a>; + type MultiPolygonType<'a> = + ::MultiPolygonType<'a>; + type GeometryCollectionType<'a> = + ::GeometryCollectionType<'a>; + type RectType<'a> = geo_traits::UnimplementedRect; + type TriangleType<'a> = geo_traits::UnimplementedTriangle; + type LineType<'a> = geo_traits::UnimplementedLine; + + fn dim(&self) -> geo_traits::Dimensions { + // FIXME + geo_traits::Dimensions::Xy + } + fn as_type( + &self, + ) -> geo_traits::GeometryType< + '_, + Self::PointType<'_>, + Self::LineStringType<'_>, + Self::PolygonType<'_>, + Self::MultiPointType<'_>, + Self::MultiLineStringType<'_>, + Self::MultiPolygonType<'_>, + Self::GeometryCollectionType<'_>, + Self::RectType<'_>, + Self::TriangleType<'_>, + Self::LineType<'_>, + > { + match self { + Self::GeoJson(geojson) => geojson.as_type(), + Self::Wkt(wkt) => wkt.as_type(), + } + } +} + trait FileLoader { fn from_bytes(bytes: bytes::Bytes) -> Self; - fn load( - self, - ) -> Result, Error>; + fn load(self) -> Result; } diff --git a/geo-file-loader/src/shapefile.rs b/geo-file-loader/src/shapefile.rs deleted file mode 100644 index 5e027ff..0000000 --- a/geo-file-loader/src/shapefile.rs +++ /dev/null @@ -1,25 +0,0 @@ -use geo_projected::geometry_wrap; -use std::io; - -pub struct ShapefileSource { - pub bytes: bytes::Bytes, -} - -impl crate::FileLoader for ShapefileSource { - fn from_bytes(bytes: bytes::Bytes) -> Self { - ShapefileSource { bytes } - } - - fn load( - self, - ) -> Result, crate::Error> - { - let mut bytes_cursor = io::Cursor::new(&self.bytes); - let shapefile_reader = geozero::shp::ShpReader::new(&mut bytes_cursor)?; - let mut geo_writer = geozero::geo_types::GeoWriter::new(); - for _ in shapefile_reader.iter_geometries(&mut geo_writer) {} - let geometry = geo_writer.take_geometry().ok_or(crate::Error::NoGeometry)?; - let geometry = geometry_wrap::(geometry); - Ok(geo_features::FeatureCollection::from_geometry(geometry)) - } -} diff --git a/geo-file-loader/src/wkt.rs b/geo-file-loader/src/wkt.rs deleted file mode 100644 index 0472dfe..0000000 --- a/geo-file-loader/src/wkt.rs +++ /dev/null @@ -1,34 +0,0 @@ -use geo_projected::geometry_wrap; -use std::io; - -use geozero::GeozeroDatasource; - -#[derive(thiserror::Error, Debug)] -pub enum Error { - #[error("{0}")] - Geozero(#[from] geozero::error::GeozeroError), -} - -pub struct WktSource { - pub bytes: bytes::Bytes, -} - -impl crate::FileLoader for WktSource { - fn from_bytes(bytes: bytes::Bytes) -> Self { - WktSource { bytes } - } - - fn load( - self, - ) -> Result, crate::Error> - { - let mut bytes_cursor = io::Cursor::new(&self.bytes); - let mut wkt_reader = geozero::wkt::WktReader(&mut bytes_cursor); - let mut geo_writer = geozero::geo_types::GeoWriter::new(); - wkt_reader.process(&mut geo_writer)?; - let geometry = geometry_wrap::( - geo_writer.take_geometry().ok_or(crate::Error::NoGeometry)?, - ); - Ok(geo_features::FeatureCollection::from_geometry(geometry)) - } -} diff --git a/rgis-file-loader/src/jobs.rs b/rgis-file-loader/src/jobs.rs index d7c2379..e6b24cc 100644 --- a/rgis-file-loader/src/jobs.rs +++ b/rgis-file-loader/src/jobs.rs @@ -21,8 +21,9 @@ impl bevy_jobs::Job for LoadFileJob { fn perform(self, _: bevy_jobs::Context) -> bevy_jobs::AsyncReturn { Box::pin(async move { + let loaded_file = geo_file_loader::load_file(self.file_format, self.bytes)?; Ok(LoadFileJobOutcome { - feature_collection: geo_file_loader::load_file(self.file_format, self.bytes)?, + feature_collection: loaded_file.into(), name: self.name, source_crs_epsg_code: self.source_crs_epsg_code, }) From f1204d28c5711dd26f615244c213d00724660a6a Mon Sep 17 00:00:00 2001 From: Corey Farwell Date: Fri, 1 Nov 2024 22:43:49 -0400 Subject: [PATCH 2/2] start --- geo-file-loader/src/geojson_loader.rs | 20 ++++++++++++++++++++ geo-file-loader/src/gpx_loader.rs | 22 ++++++++++++++++++++++ geo-file-loader/src/shapefile_loader.rs | 22 ++++++++++++++++++++++ geo-file-loader/src/wkt_loader.rs | 24 ++++++++++++++++++++++++ 4 files changed, 88 insertions(+) create mode 100644 geo-file-loader/src/geojson_loader.rs create mode 100644 geo-file-loader/src/gpx_loader.rs create mode 100644 geo-file-loader/src/shapefile_loader.rs create mode 100644 geo-file-loader/src/wkt_loader.rs diff --git a/geo-file-loader/src/geojson_loader.rs b/geo-file-loader/src/geojson_loader.rs new file mode 100644 index 0000000..72c09f1 --- /dev/null +++ b/geo-file-loader/src/geojson_loader.rs @@ -0,0 +1,20 @@ +use crate::LoadedFile; +use geojson::GeoJson; +use std::io; + +pub struct GeoJsonSource { + pub bytes: bytes::Bytes, +} + +impl crate::FileLoader for GeoJsonSource { + fn from_bytes(bytes: bytes::Bytes) -> Self { + GeoJsonSource { bytes } + } + + fn load(self) -> Result { + let bytes_cursor = io::Cursor::new(&self.bytes); + let geojson = + GeoJson::from_reader(bytes_cursor).map_err(|e| geojson::Error::MalformedJson(e))?; + Ok(LoadedFile::GeoJson(geojson)) + } +} diff --git a/geo-file-loader/src/gpx_loader.rs b/geo-file-loader/src/gpx_loader.rs new file mode 100644 index 0000000..d1a6f67 --- /dev/null +++ b/geo-file-loader/src/gpx_loader.rs @@ -0,0 +1,22 @@ +pub struct GpxSource { + pub bytes: bytes::Bytes, +} + +impl crate::FileLoader for GpxSource { + fn from_bytes(bytes: bytes::Bytes) -> Self { + GpxSource { bytes } + } + + fn load(self) -> Result { + unimplemented!() + /* + let bytes_cursor = io::Cursor::new(&self.bytes); + let mut gpx_reader = geozero::gpx::GpxReader(bytes_cursor); + let mut geo_writer = geozero::geo_types::GeoWriter::new(); + gpx_reader.process(&mut geo_writer)?; + let geometry = geo_writer.take_geometry().ok_or(crate::Error::NoGeometry)?; + let geometry = geometry_wrap::(geometry); + Ok(crate::LoadedFile::Geometry(geometry)) + */ + } +} diff --git a/geo-file-loader/src/shapefile_loader.rs b/geo-file-loader/src/shapefile_loader.rs new file mode 100644 index 0000000..18c8a1b --- /dev/null +++ b/geo-file-loader/src/shapefile_loader.rs @@ -0,0 +1,22 @@ +pub struct ShapefileSource { + pub bytes: bytes::Bytes, +} + +impl crate::FileLoader for ShapefileSource { + fn from_bytes(bytes: bytes::Bytes) -> Self { + ShapefileSource { bytes } + } + + fn load(self) -> Result { + unimplemented!() + /* + let mut bytes_cursor = io::Cursor::new(&self.bytes); + let shapefile_reader = geozero::shp::ShpReader::new(&mut bytes_cursor)?; + let mut geo_writer = geozero::geo_types::GeoWriter::new(); + for _ in shapefile_reader.iter_geometries(&mut geo_writer) {} + let geometry = geo_writer.take_geometry().ok_or(crate::Error::NoGeometry)?; + let geometry = geometry_wrap::(geometry); + Ok(crate::LoadedFile::Geometry(geometry)) + */ + } +} diff --git a/geo-file-loader/src/wkt_loader.rs b/geo-file-loader/src/wkt_loader.rs new file mode 100644 index 0000000..e3e6286 --- /dev/null +++ b/geo-file-loader/src/wkt_loader.rs @@ -0,0 +1,24 @@ +pub struct WktSource { + pub bytes: bytes::Bytes, +} + +impl crate::FileLoader for WktSource { + fn from_bytes(bytes: bytes::Bytes) -> Self { + WktSource { bytes } + } + + fn load(self) -> Result { + let wkt = wkt::deserialize_wkt::(&self.bytes)?; + Ok(crate::LoadedFile::Wkt(wkt)) + /* + let mut bytes_cursor = io::Cursor::new(&self.bytes); + let mut wkt_reader = geozero::wkt::WktReader(&mut bytes_cursor); + let mut geo_writer = geozero::geo_types::GeoWriter::new(); + wkt_reader.process(&mut geo_writer)?; + let geometry = geometry_wrap::( + geo_writer.take_geometry().ok_or(crate::Error::NoGeometry)?, + ); + Ok(crate::LoadedFile::Geometry(geometry)) + */ + } +}