diff --git a/.gitignore b/.gitignore index b370f41..56c2688 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ *.jl.mem log.txt .DS_Store +Manifest.toml diff --git a/Project.toml b/Project.toml index 3384eac..77151f0 100644 --- a/Project.toml +++ b/Project.toml @@ -3,7 +3,7 @@ uuid = "add2ef01-049f-52c4-9ee2-e494f65e021a" keywords = ["GDAL", "IO"] license = "MIT" desc = "Wrapper for GDAL - Geospatial Data Abstraction Library" -version = "1.6.1" +version = "1.7.0" [deps] CEnum = "fa961155-64e5-5f13-b03f-caf6b980ea82" @@ -13,9 +13,9 @@ PROJ_jll = "58948b4f-47e0-5654-a9ad-f609743f8632" [compat] CEnum = "0.2, 0.3, 0.4" -GDAL_jll = "301.600" +GDAL_jll = "301.700" NetworkOptions = "1.2" -PROJ_jll = "900, 901" +PROJ_jll = "901" julia = "1.6" [extras] diff --git a/gen/Manifest.toml b/gen/Manifest.toml index 5d5b94f..c5fe2b5 100644 --- a/gen/Manifest.toml +++ b/gen/Manifest.toml @@ -1,6 +1,6 @@ # This file is machine-generated - editing it directly is not advised -julia_version = "1.9.0-beta2" +julia_version = "1.10.0-beta2" manifest_format = "2.0" project_hash = "6469c52ab64d3d01941621e7123e0a34856c2340" @@ -39,32 +39,39 @@ version = "3.3.6" [[deps.Clang]] deps = ["CEnum", "Clang_jll", "Downloads", "Pkg", "TOML"] -git-tree-sha1 = "d9504fecc3c9f6c9402917413fd9f33a936ea7a6" +git-tree-sha1 = "d78c2973d7a752be377fe173bc9ff2dc2d9c3ed6" uuid = "40e3b903-d033-50b4-a0cc-940c62c95e31" -version = "0.17.1" +version = "0.17.6" [[deps.Clang_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "TOML", "Zlib_jll", "libLLVM_jll"] -git-tree-sha1 = "c7c8938a36b2ab8e5eb9b6c937ba5049e1e666fa" +deps = ["Artifacts", "JLLWrappers", "Libdl", "TOML", "Zlib_jll", "libLLVM_jll"] +git-tree-sha1 = "1b72866ec1a54e7e4593f7a137c892bb365570f4" uuid = "0ee61d77-7f21-5576-8119-9fcc46b10100" -version = "14.0.6+0" +version = "15.0.7+8" [[deps.CommonMark]] -deps = ["Crayons", "JSON", "URIs"] -git-tree-sha1 = "86cce6fd164c26bad346cc51ca736e692c9f553c" +deps = ["Crayons", "JSON", "PrecompileTools", "URIs"] +git-tree-sha1 = "532c4185d3c9037c0237546d817858b23cf9e071" uuid = "a80b9123-70ca-4bc0-993e-6e3bcb318db6" -version = "0.8.7" +version = "0.8.12" [[deps.Compat]] -deps = ["Dates", "LinearAlgebra", "UUIDs"] -git-tree-sha1 = "00a2cccc7f098ff3b66806862d275ca3db9e6e5a" +deps = ["UUIDs"] +git-tree-sha1 = "e460f044ca8b99be31d35fe54fc33a5c33dd8ed7" uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" -version = "4.5.0" +version = "4.9.0" + + [deps.Compat.extensions] + CompatLinearAlgebraExt = "LinearAlgebra" + + [deps.Compat.weakdeps] + Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" + LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" [[deps.CompilerSupportLibraries_jll]] deps = ["Artifacts", "Libdl"] uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" -version = "1.0.2+0" +version = "1.0.5+1" [[deps.Crayons]] git-tree-sha1 = "249fe38abf76d48563e2f4556bebd215aa317e15" @@ -73,9 +80,9 @@ version = "4.1.1" [[deps.DataStructures]] deps = ["Compat", "InteractiveUtils", "OrderedCollections"] -git-tree-sha1 = "d1fff3a548102f48987a52a2e0d114fa97d730f0" +git-tree-sha1 = "3dbd312d370723b6bb43ba9d02fc36abade4518d" uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" -version = "0.18.13" +version = "0.18.15" [[deps.Dates]] deps = ["Printf"] @@ -87,10 +94,10 @@ uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" version = "1.6.0" [[deps.Expat_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "bad72f730e9e91c08d9427d5e8db95478a3c323d" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "4558ab818dcceaab612d1bb8c19cee87eda2b83c" uuid = "2e619515-83b5-522b-bb60-26c02a35a201" -version = "2.4.8+0" +version = "2.5.0+0" [[deps.EzXML]] deps = ["Printf", "XML2_jll"] @@ -102,55 +109,61 @@ version = "1.1.0" uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" [[deps.GDAL_jll]] -deps = ["Arrow_jll", "Artifacts", "Expat_jll", "GEOS_jll", "HDF5_jll", "JLLWrappers", "LibCURL_jll", "LibPQ_jll", "Libdl", "Libtiff_jll", "NetCDF_jll", "OpenJpeg_jll", "PROJ_jll", "Pkg", "SQLite_jll", "Zlib_jll", "Zstd_jll", "libgeotiff_jll"] -git-tree-sha1 = "46641669463e45077ea6f08e5c8bd07189173acf" +deps = ["Arrow_jll", "Artifacts", "Expat_jll", "GEOS_jll", "HDF5_jll", "JLLWrappers", "LibCURL_jll", "LibPQ_jll", "Libdl", "Libtiff_jll", "NetCDF_jll", "OpenJpeg_jll", "PROJ_jll", "SQLite_jll", "Zlib_jll", "Zstd_jll", "libgeotiff_jll"] +git-tree-sha1 = "dcced38655efae6e0da596b40c732f652dc780de" uuid = "a7073274-a066-55f0-b90d-d619367d196c" -version = "301.600.100+0" +version = "301.700.200+0" [[deps.GEOS_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "f4c0cafb093b62d5a5d8447a9b2306555385c0d9" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "e143352a8a1b1c7236d05bc9e0982420099c46af" uuid = "d604d12d-fa86-5845-992e-78dc15976526" -version = "3.11.0+0" +version = "3.12.0+0" [[deps.Glob]] -git-tree-sha1 = "4df9f7e06108728ebf00a0a11edee4b29a482bb2" +git-tree-sha1 = "97285bbd5230dd766e9ef6749b80fc617126d496" uuid = "c27321d9-0574-5035-807b-f59d2c89b15c" -version = "1.3.0" +version = "1.3.1" [[deps.HDF5_jll]] -deps = ["Artifacts", "JLLWrappers", "LibCURL_jll", "Libdl", "OpenSSL_jll", "Pkg", "Zlib_jll"] -git-tree-sha1 = "4cc2bb72df6ff40b055295fdef6d92955f9dede8" +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LLVMOpenMP_jll", "LazyArtifacts", "LibCURL_jll", "Libdl", "MPICH_jll", "MPIPreferences", "MPItrampoline_jll", "MicrosoftMPI_jll", "OpenMPI_jll", "OpenSSL_jll", "TOML", "Zlib_jll", "libaec_jll"] +git-tree-sha1 = "38c8874692d48d5440d5752d6c74b0c6b0b60739" uuid = "0234f1f7-429e-5d53-9886-15a909be8d59" -version = "1.12.2+2" +version = "1.14.2+1" + +[[deps.ICU_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "20b6765a3016e1fca0c9c93c80d50061b94218b7" +uuid = "a51ab1cf-af8e-5615-a023-bc2c838bba6b" +version = "69.1.0+0" [[deps.InteractiveUtils]] deps = ["Markdown"] uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" [[deps.JLLWrappers]] -deps = ["Preferences"] -git-tree-sha1 = "abc9885a7ca2052a736a600f7fa66209f96506e1" +deps = ["Artifacts", "Preferences"] +git-tree-sha1 = "7e5d6779a1e09a36db2a7b6cff50942a0a7d0fca" uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" -version = "1.4.1" +version = "1.5.0" [[deps.JSON]] deps = ["Dates", "Mmap", "Parsers", "Unicode"] -git-tree-sha1 = "3c837543ddb02250ef42f4738347454f95079d4e" +git-tree-sha1 = "31e996f0a15c7b280ba9f76636b3ff9e2ae58c9a" uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" -version = "0.21.3" +version = "0.21.4" [[deps.JpegTurbo_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "b53380851c6e6664204efb2e62cd24fa5c47e4ba" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "6f2675ef130a300a112286de91973805fcc5ffbc" uuid = "aacddb02-875f-59d6-b918-886e6ef4fbf8" -version = "2.1.2+0" +version = "2.1.91+0" [[deps.JuliaFormatter]] -deps = ["CSTParser", "CommonMark", "DataStructures", "Glob", "Pkg", "Tokenize"] -git-tree-sha1 = "447f5702b5271d99f064e924061bc05e26f52c4c" +deps = ["CSTParser", "CommonMark", "DataStructures", "Glob", "Pkg", "PrecompileTools", "Tokenize"] +git-tree-sha1 = "2aa8cb5410821365a87f326631d7f6ce07db8882" uuid = "98e50ef6-434e-11e9-1051-2b60c6c9e899" -version = "1.0.18" +version = "1.0.36" [[deps.Kerberos_krb5_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] @@ -164,76 +177,100 @@ git-tree-sha1 = "bf36f528eec6634efc60d7ec062008f171071434" uuid = "88015f11-f218-50d7-93a8-a6af411a945d" version = "3.0.0+1" +[[deps.LLVMOpenMP_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "f689897ccbe049adb19a065c495e75f372ecd42b" +uuid = "1d63c593-3942-5779-bab2-d838dc0a180e" +version = "15.0.4+0" + [[deps.LZO_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "e5b909bcf985c5e2605737d2ce278ed791b89be6" uuid = "dd4b983a-f0e5-5f8d-a1b7-129d4a5fb1ac" version = "2.10.1+0" +[[deps.LazyArtifacts]] +deps = ["Artifacts", "Pkg"] +uuid = "4af54fe1-eca0-43a8-85a7-787d91b784e3" + [[deps.LibCURL]] deps = ["LibCURL_jll", "MozillaCACerts_jll"] uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" -version = "0.6.3" +version = "0.6.4" [[deps.LibCURL_jll]] deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" -version = "7.84.0+0" +version = "8.0.1+1" [[deps.LibGit2]] deps = ["Base64", "NetworkOptions", "Printf", "SHA"] uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" [[deps.LibPQ_jll]] -deps = ["Artifacts", "JLLWrappers", "Kerberos_krb5_jll", "Libdl", "OpenSSL_jll", "Pkg"] -git-tree-sha1 = "a299629703a93d8efcefccfc16b18ad9a073d131" +deps = ["Artifacts", "ICU_jll", "JLLWrappers", "Kerberos_krb5_jll", "Libdl", "OpenSSL_jll", "Zstd_jll"] +git-tree-sha1 = "09163f837936c8cc44f4691cb41d805eb1769642" uuid = "08be9ffa-1c94-5ee5-a977-46a84ec9b350" -version = "14.3.0+1" +version = "16.0.0+0" [[deps.LibSSH2_jll]] deps = ["Artifacts", "Libdl", "MbedTLS_jll"] uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" -version = "1.10.2+0" +version = "1.11.0+1" [[deps.Libdl]] uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" [[deps.Libiconv_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "c7cb1f5d892775ba13767a87c7ada0b980ea0a71" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "f9557a255370125b405568f9767d6d195822a175" uuid = "94ce4f54-9a6c-5748-9c1c-f9c7231a4531" -version = "1.16.1+2" +version = "1.17.0+0" [[deps.Libtiff_jll]] -deps = ["Artifacts", "JLLWrappers", "JpegTurbo_jll", "LERC_jll", "Libdl", "Pkg", "Zlib_jll", "Zstd_jll"] -git-tree-sha1 = "3eb79b0ca5764d4799c06699573fd8f533259713" +deps = ["Artifacts", "JLLWrappers", "JpegTurbo_jll", "LERC_jll", "Libdl", "XZ_jll", "Zlib_jll", "Zstd_jll"] +git-tree-sha1 = "2da088d113af58221c52828a80378e16be7d037a" uuid = "89763e89-9b03-5906-acba-b20f662cd828" -version = "4.4.0+0" - -[[deps.LinearAlgebra]] -deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] -uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" +version = "4.5.1+1" [[deps.LittleCMS_jll]] -deps = ["Artifacts", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Libtiff_jll", "Pkg"] -git-tree-sha1 = "110897e7db2d6836be22c18bffd9422218ee6284" +deps = ["Artifacts", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Libtiff_jll"] +git-tree-sha1 = "08ed30575ffc5651a50d3291beaf94c3e7996e55" uuid = "d3a379c0-f9a3-5b72-a4c0-6bf4d2e8af0f" -version = "2.12.0+0" +version = "2.15.0+0" [[deps.Logging]] uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" [[deps.Lz4_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "5d494bc6e85c4c9b626ee0cab05daa4085486ab1" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "6c26c5e8a4203d43b5497be3ec5d4e0c3cde240a" uuid = "5ced341a-0733-55b8-9ab6-a4889d929147" -version = "1.9.3+0" +version = "1.9.4+0" + +[[deps.MPICH_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "TOML"] +git-tree-sha1 = "8a5b4d2220377d1ece13f49438d71ad20cf1ba83" +uuid = "7cb0a576-ebde-5e09-9194-50597f1243b4" +version = "4.1.2+0" + +[[deps.MPIPreferences]] +deps = ["Libdl", "Preferences"] +git-tree-sha1 = "781916a2ebf2841467cda03b6f1af43e23839d85" +uuid = "3da0fdf6-3ccc-4f1b-acd9-58baa6c99267" +version = "0.1.9" + +[[deps.MPItrampoline_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "TOML"] +git-tree-sha1 = "6979eccb6a9edbbb62681e158443e79ecc0d056a" +uuid = "f1f71cc9-e9ae-5b93-9b94-4fe0e1ad3748" +version = "5.3.1+0" [[deps.MacroTools]] deps = ["Markdown", "Random"] -git-tree-sha1 = "42324d08725e200c23d4dfb549e0d5d89dede2d2" +git-tree-sha1 = "9ee1618cbf5240e6d4e0371d6f24065083f60c48" uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" -version = "0.5.10" +version = "0.5.11" [[deps.Markdown]] deps = ["Base64"] @@ -242,69 +279,82 @@ uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" [[deps.MbedTLS_jll]] deps = ["Artifacts", "Libdl"] uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" -version = "2.28.0+0" +version = "2.28.2+1" + +[[deps.MicrosoftMPI_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "a8027af3d1743b3bfae34e54872359fdebb31422" +uuid = "9237b28f-5490-5468-be7b-bb81f5f5e6cf" +version = "10.1.3+4" [[deps.Mmap]] uuid = "a63ad114-7e13-5084-954f-fe012c677804" [[deps.MozillaCACerts_jll]] uuid = "14a3606d-f60d-562e-9121-12d972cd8159" -version = "2022.10.11" +version = "2023.1.10" [[deps.NetCDF_jll]] -deps = ["Artifacts", "HDF5_jll", "JLLWrappers", "LibCURL_jll", "Libdl", "Pkg", "XML2_jll", "Zlib_jll"] -git-tree-sha1 = "072f8371f74c3b9e1b26679de7fbf059d45ea221" +deps = ["Artifacts", "Bzip2_jll", "HDF5_jll", "JLLWrappers", "LibCURL_jll", "Libdl", "XML2_jll", "Zlib_jll", "Zstd_jll"] +git-tree-sha1 = "10c612c81eaffdd6b7c28a45a554cdd9d2f40ff1" uuid = "7243133f-43d8-5620-bbf4-c2c921802cf3" -version = "400.902.5+1" +version = "400.902.208+0" [[deps.NetworkOptions]] uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" version = "1.2.0" -[[deps.OpenBLAS_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] -uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" -version = "0.3.21+0" - [[deps.OpenJpeg_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Libtiff_jll", "LittleCMS_jll", "Pkg", "libpng_jll"] -git-tree-sha1 = "76374b6e7f632c130e78100b166e5a48464256f8" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Libtiff_jll", "LittleCMS_jll", "libpng_jll"] +git-tree-sha1 = "8d4c87ffaf09dbdd82bcf8c939843e94dd424df2" uuid = "643b3616-a352-519d-856d-80112ee9badc" -version = "2.4.0+0" +version = "2.5.0+0" + +[[deps.OpenMPI_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "TOML"] +git-tree-sha1 = "f3080f4212a8ba2ceb10a34b938601b862094314" +uuid = "fe0851c0-eecd-5654-98d4-656369965a5c" +version = "4.1.5+0" [[deps.OpenSSL_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "f6e9dba33f9f2c44e08a020b0caf6903be540004" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "ceeda72c9fd6bbebc4f4f598560789145a8b6c4c" uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95" -version = "1.1.19+0" +version = "3.0.11+0" [[deps.OrderedCollections]] -git-tree-sha1 = "85f8e6578bf1f9ee0d11e7bb1b1456435479d47c" +git-tree-sha1 = "2e73fe17cac3c62ad1aebe70d44c963c3cfdc3e3" uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" -version = "1.4.1" +version = "1.6.2" [[deps.PROJ_jll]] -deps = ["Artifacts", "JLLWrappers", "LibCURL_jll", "Libdl", "Libtiff_jll", "Pkg", "SQLite_jll"] -git-tree-sha1 = "fcb3f39ae1184a056ecc415863d46d2109aa6947" +deps = ["Artifacts", "JLLWrappers", "LibCURL_jll", "Libdl", "Libtiff_jll", "SQLite_jll"] +git-tree-sha1 = "f3e45027ea0f44a2725fbedfdb7ed118d5deec8d" uuid = "58948b4f-47e0-5654-a9ad-f609743f8632" -version = "900.100.0+0" +version = "901.300.0+0" [[deps.Parsers]] -deps = ["Dates", "SnoopPrecompile"] -git-tree-sha1 = "6466e524967496866901a78fca3f2e9ea445a559" +deps = ["Dates", "PrecompileTools", "UUIDs"] +git-tree-sha1 = "716e24b21538abc91f6205fd1d8363f39b442851" uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" -version = "2.5.2" +version = "2.7.2" [[deps.Pkg]] deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" -version = "1.8.0" +version = "1.10.0" + +[[deps.PrecompileTools]] +deps = ["Preferences"] +git-tree-sha1 = "03b4c25b43cb84cee5c90aa9b5ea0a78fd848d2f" +uuid = "aea7be01-6a6a-4083-8856-8a6e6704d82a" +version = "1.2.0" [[deps.Preferences]] deps = ["TOML"] -git-tree-sha1 = "47e5f437cc0e7ef2ce8406ce1e7e24d44915f88d" +git-tree-sha1 = "00805cd429dcb4870060ff49ef443486c262e38e" uuid = "21216c6a-2e73-6563-6e65-726566657250" -version = "1.3.0" +version = "1.4.1" [[deps.Printf]] deps = ["Unicode"] @@ -315,7 +365,7 @@ deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" [[deps.Random]] -deps = ["SHA", "Serialization"] +deps = ["SHA"] uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" [[deps.SHA]] @@ -323,19 +373,14 @@ uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" version = "0.7.0" [[deps.SQLite_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Zlib_jll"] -git-tree-sha1 = "2c761a91fb503e94bd0130fcf4352166c3c555bc" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Zlib_jll"] +git-tree-sha1 = "81f7d934b52b2441f7b44520bd982fdb3607b0da" uuid = "76ed43ae-9a5d-5a62-8c75-30186b810ce8" -version = "3.40.0+1" +version = "3.43.0+0" [[deps.Serialization]] uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" -[[deps.SnoopPrecompile]] -git-tree-sha1 = "f604441450a3c0569830946e5b33b78c928e1a85" -uuid = "66db9d55-30c0-4569-8b51-7e840670fc0c" -version = "1.0.1" - [[deps.Sockets]] uuid = "6462fe0b-24de-5631-8697-dd941f90decc" @@ -361,9 +406,9 @@ uuid = "0796e94c-ce3b-5d07-9a54-7f471281c624" version = "0.5.25" [[deps.URIs]] -git-tree-sha1 = "ac00576f90d8a259f2c9d823e91d1de3fd44d348" +git-tree-sha1 = "b7a5e99f24892b6824a954199a45e9ffcc1c70f0" uuid = "5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4" -version = "1.4.1" +version = "1.5.0" [[deps.UUIDs]] deps = ["Random", "SHA"] @@ -373,21 +418,27 @@ uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" [[deps.XML2_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Libiconv_jll", "Pkg", "Zlib_jll"] -git-tree-sha1 = "93c41695bc1c08c46c5899f4fe06d6ead504bb73" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Libiconv_jll", "Zlib_jll"] +git-tree-sha1 = "04a51d15436a572301b5abbb9d099713327e9fc4" uuid = "02c8fc9c-b97f-50b9-bbe4-9be30ff0a78a" -version = "2.10.3+0" +version = "2.10.4+0" + +[[deps.XZ_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "cf2c7de82431ca6f39250d2fc4aacd0daa1675c0" +uuid = "ffd25f8a-64ca-5728-b0f7-c24cf3aae800" +version = "5.4.4+0" [[deps.Zlib_jll]] deps = ["Libdl"] uuid = "83775a58-1f1d-513f-b197-d71354ab007a" -version = "1.2.13+0" +version = "1.2.13+1" [[deps.Zstd_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "e45044cd873ded54b6a5bac0eb5c971392cf1927" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "49ce682769cd5de6c72dcf1b94ed7790cd08974c" uuid = "3161d3a3-bdf6-5164-811a-617609db77b4" -version = "1.5.2+0" +version = "1.5.5+0" [[deps.boost_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Zlib_jll"] @@ -398,18 +449,19 @@ version = "1.76.0+1" [[deps.libLLVM_jll]] deps = ["Artifacts", "Libdl"] uuid = "8f36deef-c2a5-5394-99ed-8e07531fb29a" -version = "14.0.6+0" +version = "15.0.7+8" -[[deps.libblastrampoline_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" -version = "5.2.0+0" +[[deps.libaec_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "eddd19a8dea6b139ea97bdc8a0e2667d4b661720" +uuid = "477f73a3-ac25-53e9-8cc3-50b2fa2566f0" +version = "1.0.6+1" [[deps.libgeotiff_jll]] -deps = ["Artifacts", "JLLWrappers", "LibCURL_jll", "Libdl", "Libtiff_jll", "PROJ_jll", "Pkg"] -git-tree-sha1 = "13dfba87a1fe301c4b40f991d0ec990bbee59bbe" +deps = ["Artifacts", "JLLWrappers", "LibCURL_jll", "Libdl", "Libtiff_jll", "PROJ_jll"] +git-tree-sha1 = "b1df2e0dd651ef0d2e9f4bdf9f2c4b121f79b345" uuid = "06c338fa-64ff-565b-ac2f-249532af990e" -version = "100.700.100+0" +version = "100.701.100+0" [[deps.libpng_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Zlib_jll"] @@ -420,12 +472,12 @@ version = "1.6.38+0" [[deps.nghttp2_jll]] deps = ["Artifacts", "Libdl"] uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" -version = "1.48.0+0" +version = "1.52.0+1" [[deps.p7zip_jll]] deps = ["Artifacts", "Libdl"] uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" -version = "17.4.0+0" +version = "17.4.0+2" [[deps.snappy_jll]] deps = ["Artifacts", "JLLWrappers", "LZO_jll", "Libdl", "Pkg", "Zlib_jll"] diff --git a/src/libgdal.jl b/src/libgdal.jl index 0a286ba..bd9cfb0 100644 --- a/src/libgdal.jl +++ b/src/libgdal.jl @@ -85,6 +85,48 @@ function cplsetthreadlocalconfigoption(pszKey, pszValue) ) end +"Callback for [`CPLSubscribeToSetConfigOption`](@ref)()" +const CPLSetConfigOptionSubscriber = Ptr{Cvoid} + +""" + CPLSubscribeToSetConfigOption(CPLSetConfigOptionSubscriber pfnCallback, + void * pUserData) -> int + +Install a callback that will be notified of calls to CPLSetConfigOption()/ CPLSetThreadLocalConfigOption() + +### Parameters +* **pfnCallback**: Callback. Must not be NULL +* **pUserData**: Callback user data. May be NULL. + +### Returns +subscriber ID that can be used with CPLUnsubscribeToSetConfigOption() +""" +function cplsubscribetosetconfigoption(pfnCallback, pUserData) + aftercare( + ccall( + (:CPLSubscribeToSetConfigOption, libgdal), + Cint, + (CPLSetConfigOptionSubscriber, Ptr{Cvoid}), + pfnCallback, + pUserData, + ), + ) +end + +""" + CPLUnsubscribeToSetConfigOption(int nId) -> void + +Remove a subscriber installed with CPLSubscribeToSetConfigOption() + +### Parameters +* **nId**: Subscriber id returned by CPLSubscribeToSetConfigOption() +""" +function cplunsubscribetosetconfigoption(nSubscriberId) + aftercare( + ccall((:CPLUnsubscribeToSetConfigOption, libgdal), Cvoid, (Cint,), nSubscriberId), + ) +end + """ cplfreeconfig() @@ -302,8 +344,10 @@ function cplreadline(arg1) aftercare(ccall((:CPLReadLine, libgdal), Cstring, (Ptr{Libc.FILE},), arg1), false) end -"Opaque type for a FILE that implements the VSIVirtualHandle API" -const VSILFILE = Libc.FILE +const VSIVirtualHandle = Cvoid + +"Opaque type for a FILE that implements the [`VSIVirtualHandle`](@ref) API" +const VSILFILE = VSIVirtualHandle """ CPLReadLineL(VSILFILE * fp) -> const char * @@ -906,7 +950,7 @@ Fetch path of executable. ### Parameters * **pszPathBuf**: the buffer into which the path is placed. -* **nMaxLength**: the buffer size, MAX_PATH+1 is suggested. +* **nMaxLength**: the buffer size (including the nul-terminating character). MAX_PATH+1 is suggested. ### Returns FALSE on failure or TRUE on success. @@ -1308,7 +1352,7 @@ function cplfindfile(pszClass, pszBasename) end """ - CPLDefaultFindFile(const char *, + CPLDefaultFindFile(const char * pszClass, const char * pszBasename) -> const char * CPLDefaultFindFile. @@ -1704,6 +1748,64 @@ function cplclosefileinzip(hZip) aftercare(ccall((:CPLCloseFileInZip, libgdal), CPLErr, (Ptr{Cvoid},), hZip)) end +const GDALProgressFunc = Ptr{Cvoid} + +""" + CPLAddFileInZip(void * hZip, + const char * pszArchiveFilename, + const char * pszInputFilename, + VSILFILE * fpInput, + CSLConstList papszOptions, + GDALProgressFunc pProgressFunc, + void * pProgressData) -> CPLErr + +Add a file inside a ZIP file opened/created with CPLCreateZip(). + +### Parameters +* **hZip**: ZIP file handle +* **pszArchiveFilename**: Filename (in UTF-8) stored in the archive. +* **pszInputFilename**: Filename of the file to add. If NULL, fpInput must not be NULL +* **fpInput**: File handle opened on the file to add. May be NULL if pszInputFilename is provided. +* **papszOptions**: Options. +* **pProgressFunc**: Progress callback, or NULL. +* **pProgressData**: User data of progress callback, or NULL. + +### Returns +CE_None in case of success. +""" +function cpladdfileinzip( + hZip, + pszArchiveFilename, + pszInputFilename, + fpInput, + papszOptions, + pProgressFunc, + pProgressData, +) + aftercare( + ccall( + (:CPLAddFileInZip, libgdal), + CPLErr, + ( + Ptr{Cvoid}, + Cstring, + Cstring, + Ptr{VSILFILE}, + CSLConstList, + GDALProgressFunc, + Any, + ), + hZip, + pszArchiveFilename, + pszInputFilename, + fpInput, + papszOptions, + pProgressFunc, + pProgressData, + ), + ) +end + """ CPLCloseZip(void *) -> CPLErr """ @@ -1935,6 +2037,10 @@ function cplturnfailureintowarning(bOn) aftercare(ccall((:CPLTurnFailureIntoWarning, libgdal), Cvoid, (Cint,), bOn)) end +function cplgeterrorhandler(ppUserData) + ccall((:CPLGetErrorHandler, libgdal), CPLErrorHandler, (Ptr{Ptr{Cvoid}},), ppUserData) +end + function cplseterrorhandler(arg1) ccall((:CPLSetErrorHandler, libgdal), CPLErrorHandler, (CPLErrorHandler,), arg1) end @@ -2436,6 +2542,9 @@ const GByte = Cuchar "Int16 type" const GInt16 = Cshort +"Signed int8 type" +const GInt8 = Int8 + """ ` ` @@ -2449,8 +2558,6 @@ const GInt64 = GIntBig "Integer type large enough to hold the difference between 2 addresses" const GPtrDiff_t = GIntBig -const GDALProgressFunc = Ptr{Cvoid} - """ GDALDummyProgress(double, const char *, @@ -4034,7 +4141,10 @@ STATUS: specific to /vsiadls/: returns all system defined properties for a path ACL: specific to /vsiadls/ and /vsigs/: returns the access control list for a path. For /vsigs/, a single XML=xml_content string is returned. Refer to https://cloud.google.com/storage/docs/xml-api/get-object-acls -METADATA: specific to /vsiaz/: to set blob metadata. Refer to https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-metadata. Note: this will be a subset of what pszDomain=HEADERS returns +METADATA: specific to /vsiaz/: to set blob metadata. Refer to https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-metadata. Note: this will be a subset of what pszDomain=HEADERS returns + + +ZIP: specific to /vsizip/: to obtain ZIP specific metadata, in particular if a file is SOZIP-enabled (SOZIP_VALID=YES) * **papszOptions**: Unused. Should be set to NULL. ### Returns @@ -4613,6 +4723,62 @@ function vsirename(oldpath, newpath) aftercare(ccall((:VSIRename, libgdal), Cint, (Cstring, Cstring), oldpath, newpath)) end +""" + VSICopyFile(const char * pszSource, + const char * pszTarget, + VSILFILE * fpSource, + vsi_l_offset nSourceSize, + const char *const * papszOptions, + GDALProgressFunc pProgressFunc, + void * pProgressData) -> int + +Copy a source file into a target file. + +### Parameters +* **pszSource**: Source filename. UTF-8 encoded. May be NULL if fpSource is not NULL. +* **pszTarget**: Target filename. UTF-8 encoded. Must not be NULL +* **fpSource**: File handle on the source file. May be NULL if pszSource is not NULL. +* **nSourceSize**: Size of the source file. Only used for progress callback. If set to -1, and progress callback is used, VSIStatL() will be used on pszSource to retrieve the source size. +* **papszOptions**: Null terminated list of options, or NULL. +* **pProgressFunc**: Progress callback, or NULL. +* **pProgressData**: User data of progress callback, or NULL. + +### Returns +0 on success. +""" +function vsicopyfile( + pszSource, + pszTarget, + fpSource, + nSourceSize, + papszOptions, + pProgressFunc, + pProgressData, +) + aftercare( + ccall( + (:VSICopyFile, libgdal), + Cint, + ( + Cstring, + Cstring, + Ptr{VSILFILE}, + vsi_l_offset, + Ptr{Cstring}, + GDALProgressFunc, + Any, + ), + pszSource, + pszTarget, + fpSource, + nSourceSize, + papszOptions, + pProgressFunc, + pProgressData, + ), + ) +end + """ VSISync(const char * pszSource, const char * pszTarget, @@ -4631,7 +4797,8 @@ Synchronize a source file/directory with a target file/directory. RECURSIVE=NO (the default is YES) -SYNC_STRATEGY=TIMESTAMP/ETAG/OVERWRITE. Determines which criterion is used to determine if a target file must be replaced when it already exists and has the same file size as the source. Only applies for a source or target being a network filesystem. +SYNC_STRATEGY=TIMESTAMP/ETAG/OVERWRITE. +Determines which criterion is used to determine if a target file must be replaced when it already exists and has the same file size as the source. Only applies for a source or target being a network filesystem. The default is TIMESTAMP (similarly to how 'aws s3 sync' works), that is to say that for an upload operation, a remote file is replaced if it has a different size or if it is older than the source. For a download operation, a local file is replaced if it has a different size or if it is newer than the remote file. The ETAG strategy assumes that the ETag metadata of the remote file is the MD5Sum of the file content, which is only true in the case of /vsis3/ for files not using KMS server side encryption and uploaded in a single PUT operation (so smaller than 50 MB given the default used by GDAL). Only to be used for /vsis3/, /vsigs/ or other filesystems using a MD5Sum as ETAG. The OVERWRITE strategy (GDAL >= 3.2) will always overwrite the target file with the source one. @@ -4918,6 +5085,24 @@ function vsiinstallswiftstreamingfilehandler() aftercare(ccall((:VSIInstallSwiftStreamingFileHandler, libgdal), Cvoid, ())) end +""" + VSIInstall7zFileHandler(void) -> void + +Install /vsi7z/ 7zip file system handler (requires libarchive) +""" +function vsiinstall7zfilehandler() + aftercare(ccall((:VSIInstall7zFileHandler, libgdal), Cvoid, ())) +end + +""" + VSIInstallRarFileHandler(void) -> void + +Install /vsirar/ RAR file system handler (requires libarchive) +""" +function vsiinstallrarfilehandler() + aftercare(ccall((:VSIInstallRarFileHandler, libgdal), Cvoid, ())) +end + """ VSIInstallGZipFileHandler() -> void @@ -5025,10 +5210,39 @@ function vsicleanupfilemanager() end """ - vsifilefrommembuffer(pszFilename, pabyData, nDataLength, bTakeOwnership) + vsiduplicatefilesystemhandler(pszSourceFSName, pszNewFSName) ` ` """ +function vsiduplicatefilesystemhandler(pszSourceFSName, pszNewFSName) + aftercare( + ccall( + (:VSIDuplicateFileSystemHandler, libgdal), + Bool, + (Cstring, Cstring), + pszSourceFSName, + pszNewFSName, + ), + ) +end + +""" + VSIFileFromMemBuffer(const char * pszFilename, + GByte * pabyData, + vsi_l_offset nDataLength, + int bTakeOwnership) -> VSILFILE * + +Create memory "file" from a buffer. + +### Parameters +* **pszFilename**: the filename to be created, or nullptr +* **pabyData**: the data buffer for the file. +* **nDataLength**: the length of buffer in bytes. +* **bTakeOwnership**: TRUE to transfer "ownership" of buffer or FALSE. + +### Returns +open file handle on created file (see VSIFOpenL()). +""" function vsifilefrommembuffer(pszFilename, pabyData, nDataLength, bTakeOwnership) aftercare( ccall( @@ -5220,6 +5434,21 @@ Close file handle. Optional """ const VSIFilesystemPluginCloseCallback = Ptr{Cvoid} +""" +This optional method is called when code plans to access soon one or several ranges in a file. Some file systems may be able to use this hint to for example asynchronously start such requests. + +Offsets may be given in a non-increasing order, and may potentially overlap. + +\\since GDAL 3.7 + +### Parameters +* `pFile`: File handle. +* `nRanges`: Size of the panOffsets and panSizes arrays. +* `panOffsets`: Array containing the start offset of each range. +* `panSizes`: Array containing the size (in bytes) of each range. +""" +const VSIFilesystemPluginAdviseReadCallback = Ptr{Cvoid} + """ VSIFilesystemPluginCallbacksStruct @@ -5250,6 +5479,7 @@ struct containing callbacks to used by the handler. (rw), (r), (w) or () at the | nBufferSize | buffer small reads (makes handler read only) | | nCacheSize | max mem to use per file when buffering | | sibling\\_files | list related files | +| advise\\_read | AdviseRead() | """ struct VSIFilesystemPluginCallbacksStruct pUserData::Ptr{Cvoid} @@ -5273,6 +5503,7 @@ struct VSIFilesystemPluginCallbacksStruct nBufferSize::Csize_t nCacheSize::Csize_t sibling_files::VSIFilesystemPluginSiblingFilesCallback + advise_read::VSIFilesystemPluginAdviseReadCallback end """ @@ -5454,6 +5685,7 @@ Pixel data types | :-------------- | :------------------------------------- | | GDT\\_Unknown | Unknown or unspecified type | | GDT\\_Byte | Eight bit unsigned integer | +| GDT\\_Int8 | 8-bit signed integer (GDAL >= 3.7) | | GDT\\_UInt16 | Sixteen bit unsigned integer | | GDT\\_Int16 | Sixteen bit signed integer | | GDT\\_UInt32 | Thirty two bit unsigned integer | @@ -5471,6 +5703,7 @@ Pixel data types @cenum GDALDataType::UInt32 begin GDT_Unknown = 0 GDT_Byte = 1 + GDT_Int8 = 14 GDT_UInt16 = 2 GDT_Int16 = 3 GDT_UInt32 = 4 @@ -5483,7 +5716,7 @@ Pixel data types GDT_CInt32 = 9 GDT_CFloat32 = 10 GDT_CFloat64 = 11 - GDT_TypeCount = 14 + GDT_TypeCount = 15 end """ @@ -6986,15 +7219,18 @@ function gdalgetfilelist(arg1) end """ - GDALClose(GDALDatasetH hDS) -> void + GDALClose(GDALDatasetH hDS) -> CPLErr Close GDAL dataset. ### Parameters * **hDS**: The dataset to close. May be cast from a "GDALDataset *". + +### Returns +CE_None in case of success (return value since GDAL 3.7). On a shared dataset whose reference count is not dropped below 1, CE_None will be returned. """ function gdalclose(arg1) - aftercare(ccall((:GDALClose, libgdal), Cvoid, (GDALDatasetH,), arg1)) + aftercare(ccall((:GDALClose, libgdal), CPLErr, (GDALDatasetH,), arg1)) end """ @@ -7396,6 +7632,130 @@ function gdaldatasetadviseread( ) end +""" + GDALDatasetGetCompressionFormats(GDALDatasetH hDS, + int nXOff, + int nYOff, + int nXSize, + int nYSize, + int nBandCount, + const int * panBandList) -> char ** + +Return the compression formats that can be natively obtained for the window of interest and requested bands. + +### Parameters +* **hDS**: Dataset handle. +* **nXOff**: The pixel offset to the top left corner of the region of the band to be accessed. This would be zero to start from the left side. +* **nYOff**: The line offset to the top left corner of the region of the band to be accessed. This would be zero to start from the top. +* **nXSize**: The width of the region of the band to be accessed in pixels. +* **nYSize**: The height of the region of the band to be accessed in lines. +* **nBandCount**: the number of bands being requested. +* **panBandList**: the list of nBandCount band numbers. Note band numbers are 1 based. This may be NULL to select the first nBandCount bands. + +### Returns +a list of compatible formats (which may be empty) that should be freed with CSLDestroy(), or nullptr. +""" +function gdaldatasetgetcompressionformats( + hDS, + nXOff, + nYOff, + nXSize, + nYSize, + nBandCount, + panBandList, +) + aftercare( + ccall( + (:GDALDatasetGetCompressionFormats, libgdal), + Ptr{Cstring}, + (GDALDatasetH, Cint, Cint, Cint, Cint, Cint, Ptr{Cint}), + hDS, + nXOff, + nYOff, + nXSize, + nYSize, + nBandCount, + panBandList, + ), + ) +end + +""" + GDALDatasetReadCompressedData(GDALDatasetH hDS, + const char * pszFormat, + int nXOff, + int nYOff, + int nXSize, + int nYSize, + int nBandCount, + const int * panBandList, + void ** ppBuffer, + size_t * pnBufferSize, + char ** ppszDetailedFormat) -> CPLErr + +Return the compressed content that can be natively obtained for the window of interest and requested bands. + +### Parameters +* **hDS**: Dataset handle. +* **pszFormat**: Requested compression format (e.g. "JPEG", "WEBP", "JXL"). This is the MIME type of one of the values returned by GetCompressionFormats(). The format string is designed to potentially include at a later point key=value optional parameters separated by a semi-colon character. At time of writing, none are implemented. ReadCompressedData() implementations should verify optional parameters and return CE_Failure if they cannot support one of them. +* **nXOff**: The pixel offset to the top left corner of the region of the band to be accessed. This would be zero to start from the left side. +* **nYOff**: The line offset to the top left corner of the region of the band to be accessed. This would be zero to start from the top. +* **nXSize**: The width of the region of the band to be accessed in pixels. +* **nYSize**: The height of the region of the band to be accessed in lines. +* **nBandCount**: the number of bands being requested. +* **panBandList**: the list of nBandCount band numbers. Note band numbers are 1 based. This may be NULL to select the first nBandCount bands. +* **ppBuffer**: Pointer to a buffer to store the compressed data or nullptr. If ppBuffer is not nullptr, then pnBufferSize should also not be nullptr. If ppBuffer is not nullptr, and *ppBuffer is not nullptr, then the provided buffer will be filled with the compressed data, provided that pnBufferSize and *pnBufferSize are not nullptr, and *pnBufferSize, indicating the size of *ppBuffer, is sufficiently large to hold the data. If ppBuffer is not nullptr, but *ppBuffer is nullptr, then the method will allocate *ppBuffer using VSIMalloc(), and thus the caller is responsible to free it with VSIFree(). If ppBuffer is nullptr, then the compressed data itself will not be returned, but *pnBufferSize will be updated with an upper bound of the size that would be necessary to hold it (if pnBufferSize != nullptr). +* **pnBufferSize**: Output buffer size, or nullptr. If ppBuffer != nullptr && *ppBuffer != nullptr, then pnBufferSize should be != nullptr and *pnBufferSize contain the size of *ppBuffer. If the method is successful, *pnBufferSize will be updated with the actual size used. +* **ppszDetailedFormat**: Pointer to an output string, or nullptr. If ppszDetailedFormat is not nullptr, then, on success, the method will allocate a new string in *ppszDetailedFormat (to be freed with VSIFree()) *ppszDetailedFormat might contain strings like "JPEG;frame_type=SOF0_baseline;bit_depth=8;num_components=3;" "subsampling=4:2:0;colorspace=YCbCr" or simply the MIME type. The string will contain at least as much information as what GetCompressionFormats() returns, and potentially more when ppBuffer != nullptr. + +### Returns +CE_None in case of success, CE_Failure otherwise. +""" +function gdaldatasetreadcompresseddata( + hDS, + pszFormat, + nXOff, + nYOff, + nXSize, + nYSize, + nBandCount, + panBandList, + ppBuffer, + pnBufferSize, + ppszDetailedFormat, +) + aftercare( + ccall( + (:GDALDatasetReadCompressedData, libgdal), + CPLErr, + ( + GDALDatasetH, + Cstring, + Cint, + Cint, + Cint, + Cint, + Cint, + Ptr{Cint}, + Ptr{Ptr{Cvoid}}, + Ptr{Csize_t}, + Ptr{Cstring}, + ), + hDS, + pszFormat, + nXOff, + nYOff, + nXSize, + nYSize, + nBandCount, + panBandList, + ppBuffer, + pnBufferSize, + ppszDetailedFormat, + ), + ) +end + """ GDALGetProjectionRef(GDALDatasetH hDS) -> const char * @@ -7732,12 +8092,15 @@ function gdalgetaccess(hDS) end """ - GDALFlushCache(GDALDatasetH hDS) -> void + GDALFlushCache(GDALDatasetH hDS) -> CPLErr Flush all write cached data to disk. + +### Returns +CE_None in case of success (note: return value added in GDAL 3.7) """ function gdalflushcache(hDS) - aftercare(ccall((:GDALFlushCache, libgdal), Cvoid, (GDALDatasetH,), hDS)) + aftercare(ccall((:GDALFlushCache, libgdal), CPLErr, (GDALDatasetH,), hDS)) end """ @@ -8059,7 +8422,6 @@ List of well known binary geometry types. These are used within the BLOBs but ar | wkbLineString | 1-dimensional geometric object with linear interpolation between Points, standard WKB | | wkbPolygon | planar 2-dimensional geometric object defined by 1 exterior boundary and 0 or more interior boundaries, standard WKB | | wkbMultiPoint | GeometryCollection of Points, standard WKB | -| wkbMultiLineString | GeometryCollection of LineStrings, standard WKB | | wkbMultiPolygon | GeometryCollection of Polygons, standard WKB | | wkbGeometryCollection | geometric object that is a collection of 1 or more geometric objects, standard WKB | | wkbCircularString | one or more circular arc segments connected end to end, ISO SQL/MM Part 3. GDAL >= 2.0 | @@ -8067,9 +8429,6 @@ List of well known binary geometry types. These are used within the BLOBs but ar | wkbCurvePolygon | planar surface, defined by 1 exterior boundary and zero or more interior boundaries, that are curves. ISO SQL/MM Part 3. GDAL >= 2.0 | | wkbMultiCurve | GeometryCollection of Curves, ISO SQL/MM Part 3. GDAL >= 2.0 | | wkbMultiSurface | GeometryCollection of Surfaces, ISO SQL/MM Part 3. GDAL >= 2.0 | -| wkbCurve | Curve (abstract type). ISO SQL/MM Part 3. GDAL >= 2.1 | -| wkbSurface | Surface (abstract type). ISO SQL/MM Part 3. GDAL >= 2.1 | -| wkbPolyhedralSurface | a contiguous collection of polygons, which share common boundary segments, ISO SQL/MM Part 3. GDAL >= 2.3 | | wkbTIN | a PolyhedralSurface consisting only of Triangle patches ISO SQL/MM Part 3. GDAL >= 2.3 | | wkbTriangle | a Triangle. ISO SQL/MM Part 3. GDAL >= 2.3 | | wkbNone | non-standard, for pure attribute records | @@ -8813,6 +9172,44 @@ function gdaldatasetupdaterelationship(hDS, hRelationship, ppszFailureReason) ) end +""" +Type of functions to pass to [`GDALDatasetSetQueryLoggerFunc`](@ref) + +\\since GDAL 3.7 +""" +const GDALQueryLoggerFunc = Ptr{Cvoid} + +""" + gdaldatasetsetqueryloggerfunc(hDS, pfnQueryLoggerFunc, poQueryLoggerArg) + +Sets the SQL query logger callback. + +When supported by the driver, the callback will be called with the executed SQL text, the error message, the execution time in milliseconds, the number of records fetched/affected and the client status data. + +A value of -1 in the execution time or in the number of records indicates that the values are unknown. + +\\since GDAL 3.7 + +### Parameters +* `hDS`: Dataset handle. +* `pfnQueryLoggerFunc`: Callback function +* `poQueryLoggerArg`: Opaque client status data +### Returns +true in case of success. +""" +function gdaldatasetsetqueryloggerfunc(hDS, pfnQueryLoggerFunc, poQueryLoggerArg) + aftercare( + ccall( + (:GDALDatasetSetQueryLoggerFunc, libgdal), + Bool, + (GDALDatasetH, GDALQueryLoggerFunc, Ptr{Cvoid}), + hDS, + pfnQueryLoggerFunc, + poQueryLoggerArg, + ), + ) +end + """ Type of functions to pass to [`GDALAddDerivedBandPixelFunc`](@ref). @@ -14112,6 +14509,34 @@ function gdalmdarraycreateattribute( ) end +""" + GDALMDArrayResize(GDALMDArrayH hArray, + const GUInt64 * panNewDimSizes, + CSLConstList papszOptions) -> bool + +Resize an array to new dimensions. + +### Parameters +* **hArray**: Array. +* **panNewDimSizes**: Array of GetDimensionCount() values containing the new size of each indexing dimension. +* **papszOptions**: Options. (Driver specific) + +### Returns +true in case of success. +""" +function gdalmdarrayresize(hArray, panNewDimSizes, papszOptions) + aftercare( + ccall( + (:GDALMDArrayResize, libgdal), + Bool, + (GDALMDArrayH, Ptr{GUInt64}, CSLConstList), + hArray, + panNewDimSizes, + papszOptions, + ), + ) +end + """ GDALMDArrayGetRawNoDataValue(GDALMDArrayH hArray) -> const void * @@ -14522,7 +14947,7 @@ end GDALMDArraySetSpatialRef(GDALMDArrayH hArray, OGRSpatialReferenceH hSRS) -> int -Assign a spatial reference system object to the the array. +Assign a spatial reference system object to the array. ### Returns TRUE in case of success. @@ -14850,6 +15275,30 @@ function gdalmdarraygetresampled( ) end +""" + GDALMDArrayGetGridded(GDALMDArrayH hArray, + const char * pszGridOptions, + GDALMDArrayH hXArray, + GDALMDArrayH hYArray, + CSLConstList papszOptions) -> GDALMDArrayH + +Return a gridded array from scattered point data, that is from an array whose last dimension is the indexing variable of X and Y arrays. +""" +function gdalmdarraygetgridded(hArray, pszGridOptions, hXArray, hYArray, papszOptions) + aftercare( + ccall( + (:GDALMDArrayGetGridded, libgdal), + GDALMDArrayH, + (GDALMDArrayH, Cstring, GDALMDArrayH, GDALMDArrayH, CSLConstList), + hArray, + pszGridOptions, + hXArray, + hYArray, + papszOptions, + ), + ) +end + """ GDALMDArrayGetCoordinateVariables(GDALMDArrayH hArray, size_t * pnCount) -> GDALMDArrayH * @@ -15763,7 +16212,10 @@ Create polygon coverage from raster data. * **iPixValField**: the attribute field index indicating the feature attribute into which the pixel value of the polygon should be written. Or -1 to indicate that the pixel value must not be written. * **papszOptions**: a name/value list of additional options -8CONNECTED=8: May be set to "8" to use 8 connectedness. Otherwise 4 connectedness will be applied to the algorithm +8CONNECTED=8: May be set to "8" to use 8 connectedness. Otherwise 4 connectedness will be applied to the algorithm + + +DATASET_FOR_GEOREF=dataset_name: Name of a dataset from which to read the geotransform. This useful if hSrcBand has no related dataset, which is typical for mask bands. * **pfnProgress**: callback for reporting algorithm progress matching the GDALProgressFunc() semantics. May be NULL. * **pProgressArg**: callback argument passed to pfnProgress. @@ -15821,7 +16273,10 @@ Create polygon coverage from raster data. * **iPixValField**: the attribute field index indicating the feature attribute into which the pixel value of the polygon should be written. Or -1 to indicate that the pixel value must not be written. * **papszOptions**: a name/value list of additional options -8CONNECTED=8: May be set to "8" to use 8 connectedness. Otherwise 4 connectedness will be applied to the algorithm +8CONNECTED=8: May be set to "8" to use 8 connectedness. Otherwise 4 connectedness will be applied to the algorithm + + +DATASET_FOR_GEOREF=dataset_name: Name of a dataset from which to read the geotransform. This useful if hSrcBand has no related dataset, which is typical for mask bands. * **pfnProgress**: callback for reporting algorithm progress matching the GDALProgressFunc() semantics. May be NULL. * **pProgressArg**: callback argument passed to pfnProgress. @@ -16840,7 +17295,7 @@ end Suggest output file size. ### Parameters -* **hSrcDS**: the input image (it is assumed the whole input images is being transformed). +* **hSrcDS**: the input image (it is assumed the whole input image is being transformed). * **pfnTransformer**: the transformer function. * **pTransformArg**: the callback data for the transformer function. * **padfGeoTransformOut**: the array of six doubles in which the suggested geotransform is returned. @@ -16893,7 +17348,7 @@ end Suggest output file size. ### Parameters -* **hSrcDS**: the input image (it is assumed the whole input images is being transformed). +* **hSrcDS**: the input image (it is assumed the whole input image is being transformed). * **pfnTransformer**: the transformer function. * **pTransformArg**: the callback data for the transformer function. * **padfGeoTransformOut**: the array of six doubles in which the suggested geotransform is returned. @@ -16912,7 +17367,7 @@ function gdalsuggestedwarpoutput2( padfGeoTransformOut, pnPixels, pnLines, - padfExtents, + padfExtent, nOptions, ) aftercare( @@ -16935,7 +17390,7 @@ function gdalsuggestedwarpoutput2( padfGeoTransformOut, pnPixels, pnLines, - padfExtents, + padfExtent, nOptions, ), ) @@ -19132,13 +19587,13 @@ end """ GDALWarpCutlineMasker(void * pMaskFuncArg, - int, - GDALDataType, + int nBandCount, + GDALDataType eType, int nXOff, int nYOff, int nXSize, int nYSize, - GByte **, + GByte ** ppImageData, int bMaskIsFloat, void * pValidityMask) -> CPLErr """ @@ -19184,6 +19639,64 @@ function gdalwarpcutlinemasker( ) end +""" + GDALWarpCutlineMaskerEx(void * pMaskFuncArg, + int, + GDALDataType, + int nXOff, + int nYOff, + int nXSize, + int nYSize, + GByte **, + int bMaskIsFloat, + void * pValidityMask, + int * pnValidityFlag) -> CPLErr +""" +function gdalwarpcutlinemaskerex( + pMaskFuncArg, + nBandCount, + eType, + nXOff, + nYOff, + nXSize, + nYSize, + arg8, + bMaskIsFloat, + pValidityMask, + pnValidityFlag, +) + aftercare( + ccall( + (:GDALWarpCutlineMaskerEx, libgdal), + CPLErr, + ( + Ptr{Cvoid}, + Cint, + GDALDataType, + Cint, + Cint, + Cint, + Cint, + Ptr{Ptr{GByte}}, + Cint, + Ptr{Cvoid}, + Ptr{Cint}, + ), + pMaskFuncArg, + nBandCount, + eType, + nXOff, + nYOff, + nXSize, + nYSize, + arg8, + bMaskIsFloat, + pValidityMask, + pnValidityFlag, + ), + ) +end + """ GDALWarpOptions @@ -21083,7 +21596,7 @@ Allocates a GDALBuildVRTOptions struct. ### Parameters * **papszArgv**: NULL terminated list of options (potentially including filename and open options too), or NULL. The accepted options are the ones of the gdalbuildvrt utility. -* **psOptionsForBinary**: (output) may be NULL (and should generally be NULL), otherwise (gdal_translate_bin.cpp use case) must be allocated with GDALBuildVRTOptionsForBinaryNew() prior to this function. Will be filled with potentially present filename, open options,... +* **psOptionsForBinary**: (output) may be NULL (and should generally be NULL), otherwise (gdalbuildvrt_bin.cpp use case) must be allocated with GDALBuildVRTOptionsForBinaryNew() prior to this function. Will be filled with potentially present filename, open options,... ### Returns pointer to the allocated GDALBuildVRTOptions struct. Must be freed with GDALBuildVRTOptionsFree(). @@ -21281,7 +21794,7 @@ Allocates a GDALMultiDimTranslateOptions struct. ### Parameters * **papszArgv**: NULL terminated list of options (potentially including filename and open options too), or NULL. The accepted options are the ones of the gdalmdimtranslate utility. -* **psOptionsForBinary**: should be nullptr, unless called from gdalmultidimtranslate_bin.cpp +* **psOptionsForBinary**: should be nullptr, unless called from gdalmdimtranslate_bin.cpp ### Returns pointer to the allocated GDALMultiDimTranslateOptions struct. Must be freed with GDALMultiDimTranslateOptionsFree(). @@ -21393,8 +21906,82 @@ function gdalmultidimtranslate( ) end +const GDALVectorInfoOptions = Cvoid + +const GDALVectorInfoOptionsForBinary = Cvoid + +""" + GDALVectorInfoOptionsNew(char ** papszArgv, + GDALVectorInfoOptionsForBinary * psOptionsForBinary) -> GDALVectorInfoOptions * + +Allocates a GDALVectorInfoOptions struct. + +### Parameters +* **papszArgv**: NULL terminated list of options (potentially including filename and open options too), or NULL. The accepted options are the ones of the ogrinfo utility. +* **psOptionsForBinary**: (output) may be NULL (and should generally be NULL), otherwise (ogrinfo_bin.cpp use case) must be allocated with GDALVectorInfoOptionsForBinaryNew() prior to this function. Will be filled with potentially present filename, open options, subdataset number... + +### Returns +pointer to the allocated GDALVectorInfoOptions struct. Must be freed with GDALVectorInfoOptionsFree(). +""" +function gdalvectorinfooptionsnew(papszArgv, psOptionsForBinary) + aftercare( + ccall( + (:GDALVectorInfoOptionsNew, libgdal), + Ptr{GDALVectorInfoOptions}, + (Ptr{Cstring}, Ptr{GDALVectorInfoOptionsForBinary}), + papszArgv, + psOptionsForBinary, + ), + ) +end + +""" + GDALVectorInfoOptionsFree(GDALVectorInfoOptions * psOptions) -> void + +Frees the GDALVectorInfoOptions struct. + +### Parameters +* **psOptions**: the options struct for GDALVectorInfo(). +""" +function gdalvectorinfooptionsfree(psOptions) + aftercare( + ccall( + (:GDALVectorInfoOptionsFree, libgdal), + Cvoid, + (Ptr{GDALVectorInfoOptions},), + psOptions, + ), + ) +end + +""" + GDALVectorInfo(GDALDatasetH hDataset, + const GDALVectorInfoOptions * psOptions) -> char * + +Lists various information about a GDAL supported vector dataset. + +### Parameters +* **hDataset**: the dataset handle. +* **psOptions**: the options structure returned by GDALVectorInfoOptionsNew() or NULL. + +### Returns +string corresponding to the information about the raster dataset (must be freed with CPLFree()), or NULL in case of error. +""" +function gdalvectorinfo(hDataset, psOptions) + aftercare( + ccall( + (:GDALVectorInfo, libgdal), + Cstring, + (GDALDatasetH, Ptr{GDALVectorInfoOptions}), + hDataset, + psOptions, + ), + false, + ) +end + """ - OGR_L_ResetReading(OGRLayerH) -> void + OGR_L_ResetReading(OGRLayerH hLayer) -> void Reset feature reading to start on the first feature. @@ -21418,7 +22005,7 @@ function ogr_f_destroy(arg1) end """ - OGR_L_GetNextFeature(OGRLayerH) -> OGRFeatureH + OGR_L_GetNextFeature(OGRLayerH hLayer) -> OGRFeatureH Fetch the next available feature from this layer. @@ -22514,7 +23101,7 @@ Returns spatial reference system for geometry. * **hGeom**: handle on the geometry to get spatial reference from. ### Returns -a reference to the spatial reference geometry. +a reference to the spatial reference geometry, which should not be modified. """ function ogr_g_getspatialreference(arg1) aftercare( @@ -23059,6 +23646,21 @@ function ogr_g_unioncascaded(arg1) aftercare(ccall((:OGR_G_UnionCascaded, libgdal), OGRGeometryH, (OGRGeometryH,), arg1)) end +""" + OGR_G_UnaryUnion(OGRGeometryH hThis) -> OGRGeometryH + +Returns the union of all components of a single geometry. + +### Parameters +* **hThis**: the geometry. + +### Returns +a new geometry representing the union or NULL if an error occurs. +""" +function ogr_g_unaryunion(arg1) + aftercare(ccall((:OGR_G_UnaryUnion, libgdal), OGRGeometryH, (OGRGeometryH,), arg1)) +end + """ OGR_G_PointOnSurface(OGRGeometryH hGeom) -> OGRGeometryH @@ -25052,6 +25654,40 @@ function ogr_fld_setdomainname(hDefn, arg2) ) end +""" + OGR_Fld_GetComment(OGRFieldDefnH hDefn) -> const char * + +Return the (optional) comment for this field. + +### Parameters +* **hDefn**: handle to the field definition + +### Returns +the comment, or an empty string if there is none. +""" +function ogr_fld_getcomment(hDefn) + aftercare( + ccall((:OGR_Fld_GetComment, libgdal), Cstring, (OGRFieldDefnH,), hDefn), + false, + ) +end + +""" + OGR_Fld_SetComment(OGRFieldDefnH hDefn, + const char * pszComment) -> void + +Set the comment for this field. + +### Parameters +* **hDefn**: handle to the field definition +* **pszComment**: Field comment. +""" +function ogr_fld_setcomment(hDefn, arg2) + aftercare( + ccall((:OGR_Fld_SetComment, libgdal), Cvoid, (OGRFieldDefnH, Cstring), hDefn, arg2), + ) +end + """ OGR_GetFieldTypeName(OGRFieldType eType) -> const char * @@ -25238,7 +25874,7 @@ Fetch spatial reference system of this field. * **hDefn**: handle to the geometry field definition ### Returns -field spatial reference system. +a reference to the field spatial reference system. It should not be modified. """ function ogr_gfld_getspatialref(arg1) aftercare( @@ -26337,6 +26973,35 @@ function ogr_f_getfieldasstring(arg1, arg2) ) end +""" + OGR_F_GetFieldAsISO8601DateTime(OGRFeatureH hFeat, + int iField, + CSLConstList papszOptions) -> const char * + +Fetch OFTDateTime field value as a ISO8601 representation. + +### Parameters +* **hFeat**: handle to the feature that owned the field. +* **iField**: the field to fetch, from 0 to GetFieldCount()-1. +* **papszOptions**: NULL terminated list of strings, or NULL. No options are defined currently. + +### Returns +the field value. This string is internal, and should not be modified, or freed. Its lifetime may be very brief. +""" +function ogr_f_getfieldasiso8601datetime(arg1, arg2, arg3) + aftercare( + ccall( + (:OGR_F_GetFieldAsISO8601DateTime, libgdal), + Cstring, + (OGRFeatureH, Cint, CSLConstList), + arg1, + arg2, + arg3, + ), + false, + ) +end + """ OGR_F_GetFieldAsIntegerList(OGRFeatureH hFeat, int iField, @@ -27941,7 +28606,7 @@ const OGRDataSourceH = Ptr{Cvoid} const OGRSFDriverH = Ptr{Cvoid} """ - OGR_L_GetName(OGRLayerH) -> const char * + OGR_L_GetName(OGRLayerH hLayer) -> const char * Return the layer name. @@ -27956,7 +28621,7 @@ function ogr_l_getname(arg1) end """ - OGR_L_GetGeomType(OGRLayerH) -> OGRwkbGeometryType + OGR_L_GetGeomType(OGRLayerH hLayer) -> OGRwkbGeometryType Return the layer geometry type. @@ -28030,7 +28695,7 @@ function ogr_l_getgeometrytypes( end """ - OGR_L_GetSpatialFilter(OGRLayerH) -> OGRGeometryH + OGR_L_GetSpatialFilter(OGRLayerH hLayer) -> OGRGeometryH This function returns the current spatial filter for this layer. @@ -28045,8 +28710,8 @@ function ogr_l_getspatialfilter(arg1) end """ - OGR_L_SetSpatialFilter(OGRLayerH, - OGRGeometryH) -> void + OGR_L_SetSpatialFilter(OGRLayerH hLayer, + OGRGeometryH hGeom) -> void Set a new spatial filter. @@ -28067,11 +28732,11 @@ function ogr_l_setspatialfilter(arg1, arg2) end """ - OGR_L_SetSpatialFilterRect(OGRLayerH, - double, - double, - double, - double) -> void + OGR_L_SetSpatialFilterRect(OGRLayerH hLayer, + double dfMinX, + double dfMinY, + double dfMaxX, + double dfMaxY) -> void Set a new rectangular spatial filter. @@ -28098,7 +28763,7 @@ function ogr_l_setspatialfilterrect(arg1, arg2, arg3, arg4, arg5) end """ - OGR_L_SetSpatialFilterEx(OGRLayerH, + OGR_L_SetSpatialFilterEx(OGRLayerH hLayer, int iGeomField, OGRGeometryH hGeom) -> void @@ -28123,7 +28788,7 @@ function ogr_l_setspatialfilterex(arg1, iGeomField, hGeom) end """ - OGR_L_SetSpatialFilterRectEx(OGRLayerH, + OGR_L_SetSpatialFilterRectEx(OGRLayerH hLayer, int iGeomField, double dfMinX, double dfMinY, @@ -28157,8 +28822,8 @@ function ogr_l_setspatialfilterrectex(arg1, iGeomField, dfMinX, dfMinY, dfMaxX, end """ - OGR_L_SetAttributeFilter(OGRLayerH, - const char *) -> OGRErr + OGR_L_SetAttributeFilter(OGRLayerH hLayer, + const char * pszQuery) -> OGRErr Set a new attribute query. @@ -28213,8 +28878,8 @@ function ogr_l_getarrowstream(hLayer, out_stream, papszOptions) end """ - OGR_L_SetNextByIndex(OGRLayerH, - GIntBig) -> OGRErr + OGR_L_SetNextByIndex(OGRLayerH hLayer, + GIntBig nIndex) -> OGRErr Move read cursor to the nIndex'th feature in the current resultset. @@ -28232,8 +28897,8 @@ function ogr_l_setnextbyindex(arg1, arg2) end """ - OGR_L_GetFeature(OGRLayerH, - GIntBig) -> OGRFeatureH + OGR_L_GetFeature(OGRLayerH hLayer, + GIntBig nFeatureId) -> OGRFeatureH Fetch a feature by its identifier. @@ -28251,10 +28916,10 @@ function ogr_l_getfeature(arg1, arg2) end """ - OGR_L_SetFeature(OGRLayerH, - OGRFeatureH) -> OGRErr + OGR_L_SetFeature(OGRLayerH hLayer, + OGRFeatureH hFeat) -> OGRErr -Rewrite an existing feature. +Rewrite/replace an existing feature. ### Parameters * **hLayer**: handle to the layer to write the feature. @@ -28270,8 +28935,8 @@ function ogr_l_setfeature(arg1, arg2) end """ - OGR_L_CreateFeature(OGRLayerH, - OGRFeatureH) -> OGRErr + OGR_L_CreateFeature(OGRLayerH hLayer, + OGRFeatureH hFeat) -> OGRErr Create and write a new feature within a layer. @@ -28295,8 +28960,8 @@ function ogr_l_createfeature(arg1, arg2) end """ - OGR_L_DeleteFeature(OGRLayerH, - GIntBig) -> OGRErr + OGR_L_DeleteFeature(OGRLayerH hLayer, + GIntBig nFID) -> OGRErr Delete feature from layer. @@ -28314,10 +28979,10 @@ function ogr_l_deletefeature(arg1, arg2) end """ - OGR_L_UpsertFeature(OGRLayerH, - OGRFeatureH) -> OGRErr + OGR_L_UpsertFeature(OGRLayerH hLayer, + OGRFeatureH hFeat) -> OGRErr -Rewrite an existing feature or create a new feature within a layer. +Rewrite/replace an existing feature or create a new feature within a layer. ### Parameters * **hLayer**: handle to the layer to write the feature to. @@ -28339,7 +29004,55 @@ function ogr_l_upsertfeature(arg1, arg2) end """ - OGR_L_GetLayerDefn(OGRLayerH) -> OGRFeatureDefnH + OGR_L_UpdateFeature(OGRLayerH hLayer, + OGRFeatureH hFeat, + int nUpdatedFieldsCount, + const int * panUpdatedFieldsIdx, + int nUpdatedGeomFieldsCount, + const int * panUpdatedGeomFieldsIdx, + bool bUpdateStyleString) -> OGRErr + +Update (part of) an existing feature. + +### Parameters +* **hLayer**: handle to the layer to write the feature. +* **hFeat**: the feature to update. +* **nUpdatedFieldsCount**: number of attribute fields to update. May be 0 +* **panUpdatedFieldsIdx**: array of nUpdatedFieldsCount values, each between 0 and GetLayerDefn()->GetFieldCount() - 1, indicating which fields of hFeat must be updated in the layer. +* **nUpdatedGeomFieldsCount**: number of geometry fields to update. May be 0 +* **panUpdatedGeomFieldsIdx**: array of nUpdatedGeomFieldsCount values, each between 0 and GetLayerDefn()->GetGeomFieldCount() - 1, indicating which geometry fields of hFeat must be updated in the layer. +* **bUpdateStyleString**: whether the feature style string in the layer should be updated with the one of hFeat. + +### Returns +OGRERR_NONE if the operation works, otherwise an appropriate error code (e.g OGRERR_NON_EXISTING_FEATURE if the feature does not exist). +""" +function ogr_l_updatefeature( + arg1, + arg2, + nUpdatedFieldsCount, + panUpdatedFieldsIdx, + nUpdatedGeomFieldsCount, + panUpdatedGeomFieldsIdx, + bUpdateStyleString, +) + aftercare( + ccall( + (:OGR_L_UpdateFeature, libgdal), + OGRErr, + (OGRLayerH, OGRFeatureH, Cint, Ptr{Cint}, Cint, Ptr{Cint}, Bool), + arg1, + arg2, + nUpdatedFieldsCount, + panUpdatedFieldsIdx, + nUpdatedGeomFieldsCount, + panUpdatedGeomFieldsIdx, + bUpdateStyleString, + ), + ) +end + +""" + OGR_L_GetLayerDefn(OGRLayerH hLayer) -> OGRFeatureDefnH Fetch the schema information for this layer. @@ -28354,7 +29067,7 @@ function ogr_l_getlayerdefn(arg1) end """ - OGR_L_GetSpatialRef(OGRLayerH) -> OGRSpatialReferenceH + OGR_L_GetSpatialRef(OGRLayerH hLayer) -> OGRSpatialReferenceH Fetch the spatial reference system for this layer. @@ -28371,8 +29084,64 @@ function ogr_l_getspatialref(arg1) end """ - OGR_L_FindFieldIndex(OGRLayerH, - const char *, + OGR_L_GetSupportedSRSList(OGRLayerH hLayer, + int iGeomField, + int * pnCount) -> OGRSpatialReferenceH * + +Get the list of SRS supported. + +### Parameters +* **hLayer**: Layer. +* **iGeomField**: Geometry field index. +* **pnCount**: Number of values in returned array. Must not be null. + +### Returns +list of supported SRS, to be freeds with OSRFreeSRSArray(), or nullptr +""" +function ogr_l_getsupportedsrslist(hLayer, iGeomField, pnCount) + aftercare( + ccall( + (:OGR_L_GetSupportedSRSList, libgdal), + Ptr{OGRSpatialReferenceH}, + (OGRLayerH, Cint, Ptr{Cint}), + hLayer, + iGeomField, + pnCount, + ), + ) +end + +""" + OGR_L_SetActiveSRS(OGRLayerH hLayer, + int iGeomField, + OGRSpatialReferenceH hSRS) -> OGRErr + +Change the active SRS. + +### Parameters +* **hLayer**: Layer. +* **iGeomField**: Geometry field index. +* **hSRS**: SRS to use + +### Returns +OGRERR_NONE in case of success, OGRERR_FAILURE if the passed SRS is not in GetSupportedSRSList(). +""" +function ogr_l_setactivesrs(hLayer, iGeomField, hSRS) + aftercare( + ccall( + (:OGR_L_SetActiveSRS, libgdal), + OGRErr, + (OGRLayerH, Cint, OGRSpatialReferenceH), + hLayer, + iGeomField, + hSRS, + ), + ) +end + +""" + OGR_L_FindFieldIndex(OGRLayerH hLayer, + const char * pszFieldName, int bExactMatch) -> int Find the index of field in a layer. @@ -28394,8 +29163,8 @@ function ogr_l_findfieldindex(arg1, arg2, bExactMatch) end """ - OGR_L_GetFeatureCount(OGRLayerH, - int) -> GIntBig + OGR_L_GetFeatureCount(OGRLayerH hLayer, + int bForce) -> GIntBig Fetch the feature count in this layer. @@ -28413,9 +29182,9 @@ function ogr_l_getfeaturecount(arg1, arg2) end """ - OGR_L_GetExtent(OGRLayerH, - OGREnvelope *, - int) -> OGRErr + OGR_L_GetExtent(OGRLayerH hLayer, + OGREnvelope * psExtent, + int bForce) -> OGRErr Fetch the extent of this layer. @@ -28441,7 +29210,7 @@ function ogr_l_getextent(arg1, arg2, arg3) end """ - OGR_L_GetExtentEx(OGRLayerH, + OGR_L_GetExtentEx(OGRLayerH hLayer, int iGeomField, OGREnvelope * psExtent, int bForce) -> OGRErr @@ -28472,8 +29241,8 @@ function ogr_l_getextentex(arg1, iGeomField, psExtent, bForce) end """ - OGR_L_TestCapability(OGRLayerH, - const char *) -> int + OGR_L_TestCapability(OGRLayerH hLayer, + const char * pszCap) -> int Test if this layer supported the named capability. @@ -28491,9 +29260,9 @@ function ogr_l_testcapability(arg1, arg2) end """ - OGR_L_CreateField(OGRLayerH, - OGRFieldDefnH, - int) -> OGRErr + OGR_L_CreateField(OGRLayerH hLayer, + OGRFieldDefnH hField, + int bApproxOK) -> OGRErr Create a new field on a layer. @@ -28547,7 +29316,7 @@ function ogr_l_creategeomfield(hLayer, hFieldDefn, bForce) end """ - OGR_L_DeleteField(OGRLayerH, + OGR_L_DeleteField(OGRLayerH hLayer, int iField) -> OGRErr Delete an existing field on a layer. @@ -28564,7 +29333,7 @@ function ogr_l_deletefield(arg1, iField) end """ - OGR_L_ReorderFields(OGRLayerH, + OGR_L_ReorderFields(OGRLayerH hLayer, int * panMap) -> OGRErr Reorder all the fields of a layer. @@ -28589,7 +29358,7 @@ function ogr_l_reorderfields(arg1, panMap) end """ - OGR_L_ReorderField(OGRLayerH, + OGR_L_ReorderField(OGRLayerH hLayer, int iOldFieldPos, int iNewFieldPos) -> OGRErr @@ -28617,7 +29386,7 @@ function ogr_l_reorderfield(arg1, iOldFieldPos, iNewFieldPos) end """ - OGR_L_AlterFieldDefn(OGRLayerH, + OGR_L_AlterFieldDefn(OGRLayerH hLayer, int iField, OGRFieldDefnH hNewFieldDefn, int nFlags) -> OGRErr @@ -28648,7 +29417,7 @@ function ogr_l_alterfielddefn(arg1, iField, hNewFieldDefn, nFlags) end """ - OGR_L_AlterGeomFieldDefn(OGRLayerH, + OGR_L_AlterGeomFieldDefn(OGRLayerH hLayer, int iField, OGRGeomFieldDefnH hNewGeomFieldDefn, int nFlags) -> OGRErr @@ -28679,7 +29448,7 @@ function ogr_l_altergeomfielddefn(arg1, iField, hNewGeomFieldDefn, nFlags) end """ - OGR_L_StartTransaction(OGRLayerH) -> OGRErr + OGR_L_StartTransaction(OGRLayerH hLayer) -> OGRErr For datasources which support transactions, StartTransaction creates a transaction. @@ -28694,7 +29463,7 @@ function ogr_l_starttransaction(arg1) end """ - OGR_L_CommitTransaction(OGRLayerH) -> OGRErr + OGR_L_CommitTransaction(OGRLayerH hLayer) -> OGRErr For datasources which support transactions, CommitTransaction commits a transaction. @@ -28709,7 +29478,7 @@ function ogr_l_committransaction(arg1) end """ - OGR_L_RollbackTransaction(OGRLayerH) -> OGRErr + OGR_L_RollbackTransaction(OGRLayerH hLayer) -> OGRErr For datasources which support transactions, RollbackTransaction will roll back a datasource to its state before the start of the current transaction. @@ -28793,7 +29562,7 @@ function ogr_l_getfidcolumn(arg1) end """ - OGR_L_GetGeometryColumn(OGRLayerH) -> const char * + OGR_L_GetGeometryColumn(OGRLayerH hLayer) -> const char * This method returns the name of the underlying database column being used as the geometry column, or "" if not supported. @@ -28854,8 +29623,8 @@ function ogr_l_setstyletable(arg1, arg2) end """ - OGR_L_SetIgnoredFields(OGRLayerH, - const char **) -> OGRErr + OGR_L_SetIgnoredFields(OGRLayerH hLayer, + const char ** papszFields) -> OGRErr Set which fields can be omitted when retrieving features from the layer. @@ -29138,7 +29907,7 @@ function ogr_l_erase(arg1, arg2, arg3, arg4, arg5, arg6) end """ - OGR_DS_Destroy(OGRDataSourceH) -> void + OGR_DS_Destroy(OGRDataSourceH hDS) -> void Closes opened datasource and releases allocated resources. @@ -29150,7 +29919,7 @@ function ogr_ds_destroy(arg1) end """ - OGR_DS_GetName(OGRDataSourceH) -> const char * + OGR_DS_GetName(OGRDataSourceH hDS) -> const char * Returns the name of the data source. @@ -29165,7 +29934,7 @@ function ogr_ds_getname(arg1) end """ - OGR_DS_GetLayerCount(OGRDataSourceH) -> int + OGR_DS_GetLayerCount(OGRDataSourceH hDS) -> int Get the number of layers in this data source. @@ -29180,8 +29949,8 @@ function ogr_ds_getlayercount(arg1) end """ - OGR_DS_GetLayer(OGRDataSourceH, - int) -> OGRLayerH + OGR_DS_GetLayer(OGRDataSourceH hDS, + int iLayer) -> OGRLayerH Fetch a layer by index. @@ -29199,8 +29968,8 @@ function ogr_ds_getlayer(arg1, arg2) end """ - OGR_DS_GetLayerByName(OGRDataSourceH, - const char *) -> OGRLayerH + OGR_DS_GetLayerByName(OGRDataSourceH hDS, + const char * pszLayerName) -> OGRLayerH Fetch a layer by name. @@ -29224,8 +29993,8 @@ function ogr_ds_getlayerbyname(arg1, arg2) end """ - OGR_DS_DeleteLayer(OGRDataSourceH, - int) -> OGRErr + OGR_DS_DeleteLayer(OGRDataSourceH hDS, + int iLayer) -> OGRErr Delete the indicated layer from the datasource. @@ -29243,7 +30012,7 @@ function ogr_ds_deletelayer(arg1, arg2) end """ - OGR_DS_GetDriver(OGRDataSourceH) -> OGRSFDriverH + OGR_DS_GetDriver(OGRDataSourceH hDS) -> OGRSFDriverH Returns the driver that the dataset was opened with. @@ -29258,11 +30027,11 @@ function ogr_ds_getdriver(arg1) end """ - OGR_DS_CreateLayer(OGRDataSourceH, - const char *, - OGRSpatialReferenceH, - OGRwkbGeometryType, - char **) -> OGRLayerH + OGR_DS_CreateLayer(OGRDataSourceH hDS, + const char * pszName, + OGRSpatialReferenceH hSpatialRef, + OGRwkbGeometryType eType, + char ** papszOptions) -> OGRLayerH This function attempts to create a new layer on the data source with the indicated name, coordinate system, geometry type. @@ -29298,10 +30067,10 @@ function ogr_ds_createlayer(arg1, arg2, arg3, arg4, arg5) end """ - OGR_DS_CopyLayer(OGRDataSourceH, - OGRLayerH, - const char *, - char **) -> OGRLayerH + OGR_DS_CopyLayer(OGRDataSourceH hDS, + OGRLayerH hSrcLayer, + const char * pszNewName, + char ** papszOptions) -> OGRLayerH Duplicate an existing layer. @@ -29329,8 +30098,8 @@ function ogr_ds_copylayer(arg1, arg2, arg3, arg4) end """ - OGR_DS_TestCapability(OGRDataSourceH, - const char *) -> int + OGR_DS_TestCapability(OGRDataSourceH hDS, + const char * pszCapability) -> int Test if capability is available. @@ -29354,10 +30123,10 @@ function ogr_ds_testcapability(arg1, arg2) end """ - OGR_DS_ExecuteSQL(OGRDataSourceH, - const char *, - OGRGeometryH, - const char *) -> OGRLayerH + OGR_DS_ExecuteSQL(OGRDataSourceH hDS, + const char * pszStatement, + OGRGeometryH hSpatialFilter, + const char * pszDialect) -> OGRLayerH Execute an SQL statement against the data store. @@ -29385,8 +30154,8 @@ function ogr_ds_executesql(arg1, arg2, arg3, arg4) end """ - OGR_DS_ReleaseResultSet(OGRDataSourceH, - OGRLayerH) -> void + OGR_DS_ReleaseResultSet(OGRDataSourceH hDS, + OGRLayerH hLayer) -> void Release results of OGR_DS_ExecuteSQL(). @@ -35317,8 +36086,6 @@ const CPLE_AWSError = 17 const VALIDATE_POINTER_ERR = CE_Failure -const __MSVCRT_VERSION__ = 0x0700 - const GINTBIG_MIN = CPL_STATIC_CAST(GIntBig, 0x80000000) << 32 const GINTBIG_MAX = CPL_STATIC_CAST(GIntBig, 0x7fffffff) << 32 | Cuint(0xffffffff) @@ -35355,9 +36122,9 @@ const VSI_STAT_CACHE_ONLY = 0x10 const GDAL_VERSION_MAJOR = 3 -const GDAL_VERSION_MINOR = 6 +const GDAL_VERSION_MINOR = 7 -const GDAL_VERSION_REV = 1 +const GDAL_VERSION_REV = 2 const GDAL_VERSION_BUILD = 0 @@ -35365,9 +36132,9 @@ const GDAL_VERSION_NUM = GDAL_COMPUTE_VERSION(GDAL_VERSION_MAJOR, GDAL_VERSION_MINOR, GDAL_VERSION_REV) + GDAL_VERSION_BUILD -const GDAL_RELEASE_DATE = 20221214 +const GDAL_RELEASE_DATE = 20230905 -const GDAL_RELEASE_NAME = "3.6.1" +const GDAL_RELEASE_NAME = "3.7.2" const RASTERIO_EXTRA_ARG_CURRENT_VERSION = 1 @@ -35413,8 +36180,14 @@ const GDAL_DMD_CREATIONFIELDDATATYPES = "DMD_CREATIONFIELDDATATYPES" const GDAL_DMD_CREATIONFIELDDATASUBTYPES = "DMD_CREATIONFIELDDATASUBTYPES" +const GDAL_DMD_CREATION_FIELD_DEFN_FLAGS = "DMD_CREATION_FIELD_DEFN_FLAGS" + const GDAL_DMD_SUBDATASETS = "DMD_SUBDATASETS" +const GDAL_DMD_NUMERIC_FIELD_WIDTH_INCLUDES_DECIMAL_SEPARATOR = "DMD_NUMERIC_FIELD_WIDTH_INCLUDES_DECIMAL_SEPARATOR" + +const GDAL_DMD_NUMERIC_FIELD_WIDTH_INCLUDES_SIGN = "DMD_NUMERIC_FIELD_WIDTH_INCLUDES_SIGN" + const GDAL_DCAP_OPEN = "DCAP_OPEN" const GDAL_DCAP_CREATE = "DCAP_CREATE" @@ -35449,6 +36222,8 @@ const GDAL_DCAP_REORDER_FIELDS = "DCAP_REORDER_FIELDS" const GDAL_DMD_ALTER_FIELD_DEFN_FLAGS = "GDAL_DMD_ALTER_FIELD_DEFN_FLAGS" +const GDAL_DMD_ILLEGAL_FIELD_NAMES = "GDAL_DMD_ILLEGAL_FIELD_NAMES" + const GDAL_DCAP_NOTNULL_FIELDS = "DCAP_NOTNULL_FIELDS" const GDAL_DCAP_UNIQUE_FIELDS = "DCAP_UNIQUE_FIELDS" @@ -35469,6 +36244,10 @@ const GDAL_DMD_GEOMETRY_FLAGS = "GDAL_DMD_GEOMETRY_FLAGS" const GDAL_DCAP_FEATURE_STYLES = "DCAP_FEATURE_STYLES" +const GDAL_DCAP_FEATURE_STYLES_READ = "DCAP_FEATURE_STYLES_READ" + +const GDAL_DCAP_FEATURE_STYLES_WRITE = "DCAP_FEATURE_STYLES_WRITE" + const GDAL_DCAP_COORDINATE_EPOCH = "DCAP_COORDINATE_EPOCH" const GDAL_DCAP_MULTIPLE_VECTOR_LAYERS = "DCAP_MULTIPLE_VECTOR_LAYERS" @@ -35485,6 +36264,8 @@ const GDAL_DCAP_UPDATE_RELATIONSHIP = "DCAP_UPDATE_RELATIONSHIP" const GDAL_DMD_RELATIONSHIP_FLAGS = "GDAL_DMD_RELATIONSHIP_FLAGS" +const GDAL_DMD_RELATIONSHIP_RELATED_TABLE_TYPES = "GDAL_DMD_RELATIONSHIP_RELATED_TABLE_TYPES" + const GDAL_DCAP_RENAME_LAYERS = "DCAP_RENAME_LAYERS" const GDAL_DMD_CREATION_FIELD_DOMAIN_TYPES = "DMD_CREATION_FIELD_DOMAIN_TYPES" @@ -35617,6 +36398,12 @@ const CTLS_HTTPFETCHCALLBACK = 20 const CTLS_MAX = 32 +const GCMVF_PARTIAL_INTERSECTION = 0 + +const GCMVF_NO_INTERSECTION = 1 + +const GCMVF_CHUNK_FULLY_WITHIN_CUTLINE = 2 + const VRT_NODATA_UNSET = -1234.56 const OGR_GGT_COUNT_NOT_NEEDED = 0x01 @@ -35663,15 +36450,23 @@ const ALTER_UNIQUE_FLAG = 0x20 const ALTER_DOMAIN_FLAG = 0x40 +const ALTER_ALTERNATIVE_NAME_FLAG = 0x80 + +const ALTER_COMMENT_FLAG = 0x0100 + const ALTER_ALL_FLAG = ( ( ( - ((ALTER_NAME_FLAG | ALTER_TYPE_FLAG) | ALTER_WIDTH_PRECISION_FLAG) | - ALTER_NULLABLE_FLAG - ) | ALTER_DEFAULT_FLAG - ) | ALTER_UNIQUE_FLAG - ) | ALTER_DOMAIN_FLAG + ( + ( + ((ALTER_NAME_FLAG | ALTER_TYPE_FLAG) | ALTER_WIDTH_PRECISION_FLAG) | + ALTER_NULLABLE_FLAG + ) | ALTER_DEFAULT_FLAG + ) | ALTER_UNIQUE_FLAG + ) | ALTER_DOMAIN_FLAG + ) | ALTER_ALTERNATIVE_NAME_FLAG + ) | ALTER_COMMENT_FLAG const ALTER_GEOM_FIELD_DEFN_NAME_FLAG = 0x1000 @@ -35737,6 +36532,8 @@ const OLCDeleteFeature = "DeleteFeature" const OLCUpsertFeature = "UpsertFeature" +const OLCUpdateFeature = "UpdateFeature" + const OLCFastSetNextByIndex = "FastSetNextByIndex" const OLCStringsAsUTF8 = "StringsAsUTF8" @@ -35787,8 +36584,6 @@ const ODrCDeleteDataSource = "DeleteDataSource" const OLMD_FID64 = "OLMD_FID64" -const SRS_WKT_WGS84_LAT_LONG = "GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]]" - const SRS_PT_ALBERS_CONIC_EQUAL_AREA = "Albers_Conic_Equal_Area" const SRS_PT_AZIMUTHAL_EQUIDISTANT = "Azimuthal_Equidistant" diff --git a/test/gdal_jll_utils.jl b/test/gdal_jll_utils.jl index fb3f73a..c3a24e1 100644 --- a/test/gdal_jll_utils.jl +++ b/test/gdal_jll_utils.jl @@ -1,9 +1,4 @@ # This is testing GDAL/OGR utility executables. # In `gdal_utils.jl` we test the utility library functions. -@test success(GDAL.gdalinfo_path() do gdinfo - run(pipeline(`$gdinfo $utmsmall`, devnull)) -end) - -# preferred thread-safe wrapper syntax on Julia 1.6+ @test success(run(pipeline(`$(GDAL.gdalinfo_path()) $utmsmall`, devnull)))