diff --git a/gen/Manifest.toml b/gen/Manifest.toml index 2b19a06..c7cfaca 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.8.0" +julia_version = "1.8.2" manifest_format = "2.0" project_hash = "6469c52ab64d3d01941621e7123e0a34856c2340" @@ -8,12 +8,24 @@ project_hash = "6469c52ab64d3d01941621e7123e0a34856c2340" uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" version = "1.1.1" +[[deps.Arrow_jll]] +deps = ["Artifacts", "Bzip2_jll", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Lz4_jll", "Pkg", "Thrift_jll", "Zlib_jll", "boost_jll", "snappy_jll"] +git-tree-sha1 = "d64cb60c0e6a138fbe5ea65bcbeea47813a9a700" +uuid = "8ce61222-c28f-5041-a97a-c2198fb817bf" +version = "10.0.0+1" + [[deps.Artifacts]] uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" [[deps.Base64]] uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" +[[deps.Bzip2_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "19a35467a82e236ff51bc17a3a44b69ef35185a2" +uuid = "6e34b625-4abd-537c-b88f-471c36dfa7a0" +version = "1.0.8+0" + [[deps.CEnum]] git-tree-sha1 = "eb4cb44a499229b3b8426dcfb5dd85333951ff90" uuid = "fa961155-64e5-5f13-b03f-caf6b980ea82" @@ -27,9 +39,9 @@ version = "3.3.6" [[deps.Clang]] deps = ["CEnum", "Clang_jll", "Downloads", "Pkg", "TOML"] -git-tree-sha1 = "0b40886a23b65c23e6c2a4169e14f2743327a2b2" +git-tree-sha1 = "9e605c9149e4a0182118f00c8d69ef76d59998ee" uuid = "40e3b903-d033-50b4-a0cc-940c62c95e31" -version = "0.16.1" +version = "0.16.6" [[deps.Clang_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Zlib_jll", "libLLVM_jll"] @@ -45,9 +57,9 @@ version = "0.8.6" [[deps.Compat]] deps = ["Dates", "LinearAlgebra", "UUIDs"] -git-tree-sha1 = "5856d3031cdb1f3b2b6340dfdc66b6d9a149a374" +git-tree-sha1 = "3ca828fe1b75fa84b021a7860bd039eaea84d2f2" uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" -version = "4.2.0" +version = "4.3.0" [[deps.CompilerSupportLibraries_jll]] deps = ["Artifacts", "Libdl"] @@ -90,10 +102,10 @@ version = "1.1.0" uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" [[deps.GDAL_jll]] -deps = ["Artifacts", "Expat_jll", "GEOS_jll", "JLLWrappers", "LibCURL_jll", "Libdl", "Libtiff_jll", "OpenJpeg_jll", "PROJ_jll", "Pkg", "SQLite_jll", "Zlib_jll", "Zstd_jll", "libgeotiff_jll"] -git-tree-sha1 = "f8a6c0af02b64fa24c6444cdb10530bf93704b12" +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 = "fbead7c60556297f540ecfa6e06d1bb64919a56f" uuid = "a7073274-a066-55f0-b90d-d619367d196c" -version = "300.500.100+0" +version = "301.600.0+0" [[deps.GEOS_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] @@ -101,6 +113,17 @@ git-tree-sha1 = "f4c0cafb093b62d5a5d8447a9b2306555385c0d9" uuid = "d604d12d-fa86-5845-992e-78dc15976526" version = "3.11.0+0" +[[deps.Glob]] +git-tree-sha1 = "4df9f7e06108728ebf00a0a11edee4b29a482bb2" +uuid = "c27321d9-0574-5035-807b-f59d2c89b15c" +version = "1.3.0" + +[[deps.HDF5_jll]] +deps = ["Artifacts", "JLLWrappers", "LibCURL_jll", "Libdl", "OpenSSL_jll", "Pkg", "Zlib_jll"] +git-tree-sha1 = "4cc2bb72df6ff40b055295fdef6d92955f9dede8" +uuid = "0234f1f7-429e-5d53-9886-15a909be8d59" +version = "1.12.2+2" + [[deps.InteractiveUtils]] deps = ["Markdown"] uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" @@ -124,10 +147,16 @@ uuid = "aacddb02-875f-59d6-b918-886e6ef4fbf8" version = "2.1.2+0" [[deps.JuliaFormatter]] -deps = ["CSTParser", "CommonMark", "DataStructures", "Pkg", "Tokenize"] -git-tree-sha1 = "bc360182bf55b82cf15efb1cbc1b3607d05e1648" +deps = ["CSTParser", "CommonMark", "DataStructures", "Glob", "Pkg", "Tokenize"] +git-tree-sha1 = "a91af8a988efedba0e80deec6b8ce70a0054e94f" uuid = "98e50ef6-434e-11e9-1051-2b60c6c9e899" -version = "1.0.9" +version = "1.0.15" + +[[deps.Kerberos_krb5_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "60274b4ab38e8d1248216fe6b6ace75ae09b0502" +uuid = "b39eb1a6-c29a-53d7-8c32-632cd16f18da" +version = "1.19.3+0" [[deps.LERC_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] @@ -135,6 +164,12 @@ git-tree-sha1 = "bf36f528eec6634efc60d7ec062008f171071434" uuid = "88015f11-f218-50d7-93a8-a6af411a945d" version = "3.0.0+1" +[[deps.LZO_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "e5b909bcf985c5e2605737d2ce278ed791b89be6" +uuid = "dd4b983a-f0e5-5f8d-a1b7-129d4a5fb1ac" +version = "2.10.1+0" + [[deps.LibCURL]] deps = ["LibCURL_jll", "MozillaCACerts_jll"] uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" @@ -149,6 +184,12 @@ version = "7.84.0+0" 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" +uuid = "08be9ffa-1c94-5ee5-a977-46a84ec9b350" +version = "14.3.0+1" + [[deps.LibSSH2_jll]] deps = ["Artifacts", "Libdl", "MbedTLS_jll"] uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" @@ -182,11 +223,17 @@ version = "2.12.0+0" [[deps.Logging]] uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" +[[deps.Lz4_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "5d494bc6e85c4c9b626ee0cab05daa4085486ab1" +uuid = "5ced341a-0733-55b8-9ab6-a4889d929147" +version = "1.9.3+0" + [[deps.MacroTools]] deps = ["Markdown", "Random"] -git-tree-sha1 = "3d3e902b31198a27340d0bf00d6ac452866021cf" +git-tree-sha1 = "42324d08725e200c23d4dfb549e0d5d89dede2d2" uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" -version = "0.5.9" +version = "0.5.10" [[deps.Markdown]] deps = ["Base64"] @@ -204,6 +251,12 @@ uuid = "a63ad114-7e13-5084-954f-fe012c677804" uuid = "14a3606d-f60d-562e-9121-12d972cd8159" version = "2022.2.1" +[[deps.NetCDF_jll]] +deps = ["Artifacts", "HDF5_jll", "JLLWrappers", "LibCURL_jll", "Libdl", "Pkg", "XML2_jll", "Zlib_jll"] +git-tree-sha1 = "072f8371f74c3b9e1b26679de7fbf059d45ea221" +uuid = "7243133f-43d8-5620-bbf4-c2c921802cf3" +version = "400.902.5+1" + [[deps.NetworkOptions]] uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" version = "1.2.0" @@ -219,6 +272,12 @@ git-tree-sha1 = "76374b6e7f632c130e78100b166e5a48464256f8" uuid = "643b3616-a352-519d-856d-80112ee9badc" version = "2.4.0+0" +[[deps.OpenSSL_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "f6e9dba33f9f2c44e08a020b0caf6903be540004" +uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95" +version = "1.1.19+0" + [[deps.OrderedCollections]] git-tree-sha1 = "85f8e6578bf1f9ee0d11e7bb1b1456435479d47c" uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" @@ -231,10 +290,10 @@ uuid = "58948b4f-47e0-5654-a9ad-f609743f8632" version = "900.100.0+0" [[deps.Parsers]] -deps = ["Dates"] -git-tree-sha1 = "3d5bf43e3e8b412656404ed9466f1dcbf7c50269" +deps = ["Dates", "SnoopPrecompile"] +git-tree-sha1 = "cceb0257b662528ecdf0b4b4302eb00e767b38e7" uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" -version = "2.4.0" +version = "2.5.0" [[deps.Pkg]] deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] @@ -265,13 +324,18 @@ version = "0.7.0" [[deps.SQLite_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Zlib_jll"] -git-tree-sha1 = "e7c1d14d4c93e2d0f85970f818052de200eba5d2" +git-tree-sha1 = "9d920c4ee8cd5684e23bf84f43ead45c0af796e7" uuid = "76ed43ae-9a5d-5a62-8c75-30186b810ce8" -version = "3.39.2+0" +version = "3.39.4+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" @@ -283,7 +347,13 @@ version = "1.0.0" [[deps.Tar]] deps = ["ArgTools", "SHA"] uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" -version = "1.10.0" +version = "1.10.1" + +[[deps.Thrift_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "boost_jll"] +git-tree-sha1 = "fd7da49fae680c18aa59f421f0ba468e658a2d7a" +uuid = "e0b8ae26-5307-5830-91fd-398402328850" +version = "0.16.0+0" [[deps.Tokenize]] git-tree-sha1 = "2b3af135d85d7e70b863540160208fa612e736b9" @@ -319,6 +389,12 @@ git-tree-sha1 = "e45044cd873ded54b6a5bac0eb5c971392cf1927" uuid = "3161d3a3-bdf6-5164-811a-617609db77b4" version = "1.5.2+0" +[[deps.boost_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Zlib_jll"] +git-tree-sha1 = "7a89efe0137720ca82f99e8daa526d23120d0d37" +uuid = "28df3c45-c428-5900-9ff8-a3135698ca75" +version = "1.76.0+1" + [[deps.libLLVM_jll]] deps = ["Artifacts", "Libdl"] uuid = "8f36deef-c2a5-5394-99ed-8e07531fb29a" @@ -350,3 +426,9 @@ version = "1.48.0+0" deps = ["Artifacts", "Libdl"] uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" version = "17.4.0+0" + +[[deps.snappy_jll]] +deps = ["Artifacts", "JLLWrappers", "LZO_jll", "Libdl", "Pkg", "Zlib_jll"] +git-tree-sha1 = "985c1da710b0e43f7c52f037441021dfd0e3be14" +uuid = "fe1e1685-f7be-5f59-ac9f-4ca204017dfd" +version = "1.1.9+1" diff --git a/src/libgdal.jl b/src/libgdal.jl index ceb03bd..40a6385 100644 --- a/src/libgdal.jl +++ b/src/libgdal.jl @@ -93,15 +93,6 @@ function cplsetthreadlocalconfigoption(pszKey, pszValue) ) end -""" - cplfreeconfig() - -Doxygen\\_Suppress -""" -function cplfreeconfig() - aftercare(ccall((:CPLFreeConfig, libgdal), Cvoid, ())) -end - """ CPLGetConfigOptions(void) -> char ** @@ -3404,7 +3395,7 @@ Open file. * **pszFilename**: the file to open. UTF-8 encoded. * **pszAccess**: access requested (i.e. "r", "r+", "w") * **bSetError**: flag determining whether or not this open call should set VSIErrors on failure. -* **papszOptions**: NULL or NULL-terminated list of strings. The content is highly file system dependent. Currently only MIME headers such as Content-Type and Content-Encoding are supported for the /vsis3/, /vsigs/, /vsiaz/, /vsiadls/ file systems. +* **papszOptions**: NULL or NULL-terminated list of strings. The content is highly file system dependent. MIME headers such as Content-Type and Content-Encoding are supported for the /vsis3/, /vsigs/, /vsiaz/, /vsiadls/ file systems. Starting with GDAL 3.6, the DISABLE_READDIR_ON_OPEN=YES/NO option is supported for /vsicurl/ and other network-based file systems. By default, directory file listing is done, unless YES is specified. ### Returns NULL on failure, or the file handle. @@ -3837,6 +3828,71 @@ function vsisupportssparsefiles(pszPath) aftercare(ccall((:VSISupportsSparseFiles, libgdal), Cint, (Cstring,), pszPath)) end +""" + VSIIsLocal(const char * pszPath) -> bool + +Returns if the file/filesystem is "local". + +### Parameters +* **pszPath**: the path of the filesystem object to be tested. UTF-8 encoded. + +### Returns +TRUE or FALSE +""" +function vsiislocal(pszPath) + aftercare(ccall((:VSIIsLocal, libgdal), Bool, (Cstring,), pszPath)) +end + +""" + VSISupportsSequentialWrite(const char * pszPath, + bool bAllowLocalTempFile) -> bool + +Returns if the filesystem supports sequential write. + +### Parameters +* **pszPath**: the path of the filesystem object to be tested. UTF-8 encoded. +* **bAllowLocalTempFile**: whether the file system is allowed to use a local temporary file before uploading to the target location. + +### Returns +TRUE or FALSE +""" +function vsisupportssequentialwrite(pszPath, bAllowLocalTempFile) + aftercare( + ccall( + (:VSISupportsSequentialWrite, libgdal), + Bool, + (Cstring, Bool), + pszPath, + bAllowLocalTempFile, + ), + ) +end + +""" + VSISupportsRandomWrite(const char * pszPath, + bool bAllowLocalTempFile) -> bool + +Returns if the filesystem supports random write. + +### Parameters +* **pszPath**: the path of the filesystem object to be tested. UTF-8 encoded. +* **bAllowLocalTempFile**: whether the file system is allowed to use a local temporary file before uploading to the target location. + +### Returns +TRUE or FALSE +""" +function vsisupportsrandomwrite(pszPath, bAllowLocalTempFile) + aftercare( + ccall( + (:VSISupportsRandomWrite, libgdal), + Bool, + (Cstring, Bool), + pszPath, + bAllowLocalTempFile, + ), + ) +end + """ VSIHasOptimizedReadMultiRange(const char * pszPath) -> int @@ -4060,17 +4116,72 @@ function vsisetfilemetadata(pszFilename, papszMetadata, pszDomain, papszOptions) end """ - VSISetCredential(const char * pszPathPrefix, - const char * pszKey, - const char * pszValue) -> void + VSISetPathSpecificOption(const char * pszPathPrefix, + const char * pszKey, + const char * pszValue) -> void -Set a credential (or more generally an option related to a virtual file system) for a given path prefix. +Set a path specific option for a given path prefix. ### Parameters * **pszPathPrefix**: a path prefix of a virtual file system handler. Typically of the form "/vsiXXX/bucket". Must NOT be NULL. * **pszKey**: Option name. Must NOT be NULL. * **pszValue**: Option value. May be NULL to erase it. """ +function vsisetpathspecificoption(pszPathPrefix, pszKey, pszValue) + aftercare( + ccall( + (:VSISetPathSpecificOption, libgdal), + Cvoid, + (Cstring, Cstring, Cstring), + pszPathPrefix, + pszKey, + pszValue, + ), + ) +end + +""" + VSIClearPathSpecificOptions(const char * pszPathPrefix) -> void + +Clear path specific options set with VSISetPathSpecificOption() + +### Parameters +* **pszPathPrefix**: If set to NULL, all path specific options are cleared. If set to not-NULL, only those set with VSISetPathSpecificOption(pszPathPrefix, ...) will be cleared. +""" +function vsiclearpathspecificoptions(pszPathPrefix) + aftercare( + ccall((:VSIClearPathSpecificOptions, libgdal), Cvoid, (Cstring,), pszPathPrefix), + ) +end + +""" + VSIGetPathSpecificOption(const char * pszPath, + const char * pszKey, + const char * pszDefault) -> const char * + +Get the value a path specific option. +""" +function vsigetpathspecificoption(pszPath, pszKey, pszDefault) + aftercare( + ccall( + (:VSIGetPathSpecificOption, libgdal), + Cstring, + (Cstring, Cstring, Cstring), + pszPath, + pszKey, + pszDefault, + ), + false, + ) +end + +""" + VSISetCredential(const char * pszPathPrefix, + const char * pszKey, + const char * pszValue) -> void + +Set a credential (or more generally an option related to a virtual file system) for a given path prefix. +""" function vsisetcredential(pszPathPrefix, pszKey, pszValue) aftercare( ccall( @@ -4087,10 +4198,7 @@ end """ VSIClearCredentials(const char * pszPathPrefix) -> void -Clear credentials set with VSISetCredential() - -### Parameters -* **pszPathPrefix**: If set to NULL, all credentials are cleared. If set to not-NULL, only those set with VSISetCredential(pszPathPrefix, ...) will be cleared. +Clear path specific options set with VSISetPathSpecificOption() """ function vsiclearcredentials(pszPathPrefix) aftercare(ccall((:VSIClearCredentials, libgdal), Cvoid, (Cstring,), pszPathPrefix)) @@ -4101,7 +4209,7 @@ end const char * pszKey, const char * pszDefault) -> const char * -Get a credential option for a given path. +Get the value of a credential (or more generally an option related to a virtual file system) for a given path. """ function vsigetcredential(pszPath, pszKey, pszDefault) aftercare( @@ -4933,7 +5041,7 @@ end Create memory "file" from a buffer. ### Parameters -* **pszFilename**: the filename to be created. +* **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. @@ -5340,31 +5448,6 @@ struct GDALRPCInfoV2 dfERR_RAND::Cdouble end -""" - GDALExtractRPCInfoV2(CSLConstList papszMD, - GDALRPCInfoV2 * psRPC) -> int - -Extract RPC info from metadata, and apply to an RPCInfo structure. - -### Parameters -* **papszMD**: Dictionary of metadata representing RPC -* **psRPC**: (output) Pointer to structure to hold the RPC values. - -### Returns -TRUE in case of success. FALSE in case of failure. -""" -function gdalextractrpcinfov2(arg1, arg2) - aftercare( - ccall( - (:GDALExtractRPCInfoV2, libgdal), - Cint, - (CSLConstList, Ptr{GDALRPCInfoV2}), - arg1, - arg2, - ), - ) -end - """ GDALDataType @@ -6022,6 +6105,13 @@ const GDALRasterAttributeTableH = Ptr{Cvoid} "Opaque type used for the C bindings of the C++ GDALAsyncReader class" const GDALAsyncReaderH = Ptr{Cvoid} +""" +Opaque type used for the C bindings of the C++ GDALRelationship class + +\\since GDAL 3.6 +""" +const GDALRelationshipH = Ptr{Cvoid} + "Type to express pixel, line or band spacing. Signed 64 bit integer" const GSpacing = GIntBig @@ -7548,9 +7638,9 @@ end GDALBuildOverviews(GDALDatasetH hDataset, const char * pszResampling, int nOverviews, - int * panOverviewList, + const int * panOverviewList, int nListBands, - int * panBandList, + const int * panBandList, GDALProgressFunc pfnProgress, void * pProgressData) -> CPLErr @@ -7583,6 +7673,48 @@ function gdalbuildoverviews(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) ) end +""" + GDALBuildOverviewsEx(GDALDatasetH hDataset, + const char * pszResampling, + int nOverviews, + const int * panOverviewList, + int nListBands, + const int * panBandList, + GDALProgressFunc pfnProgress, + void * pProgressData, + CSLConstList papszOptions) -> CPLErr + +Build raster overview(s) +""" +function gdalbuildoverviewsex(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, papszOptions) + aftercare( + ccall( + (:GDALBuildOverviewsEx, libgdal), + CPLErr, + ( + GDALDatasetH, + Cstring, + Cint, + Ptr{Cint}, + Cint, + Ptr{Cint}, + GDALProgressFunc, + Ptr{Cvoid}, + CSLConstList, + ), + arg1, + arg2, + arg3, + arg4, + arg5, + arg6, + arg7, + arg8, + papszOptions, + ), + ) +end + """ GDALGetOpenDatasets(GDALDatasetH ** ppahDSList, int * pnCount) -> void @@ -7768,6 +7900,62 @@ function gdalregenerateoverviews( ) end +""" + GDALRegenerateOverviewsEx(GDALRasterBandH hSrcBand, + int nOverviewCount, + GDALRasterBandH * pahOvrBands, + const char * pszResampling, + GDALProgressFunc pfnProgress, + void * pProgressData, + CSLConstList papszOptions) -> CPLErr + +Generate downsampled overviews. + +### Parameters +* **hSrcBand**: the source (base level) band. +* **nOverviewCount**: the number of downsampled bands being generated. +* **pahOvrBands**: the list of downsampled bands to be generated. +* **pszResampling**: Resampling algorithm (e.g. "AVERAGE"). +* **pfnProgress**: progress report function. +* **pProgressData**: progress function callback data. +* **papszOptions**: NULL terminated list of options as key=value pairs, or NULL + +### Returns +CE_None on success or CE_Failure on failure. +""" +function gdalregenerateoverviewsex( + hSrcBand, + nOverviewCount, + pahOverviewBands, + pszResampling, + pfnProgress, + pProgressData, + papszOptions, +) + aftercare( + ccall( + (:GDALRegenerateOverviewsEx, libgdal), + CPLErr, + ( + GDALRasterBandH, + Cint, + Ptr{GDALRasterBandH}, + Cstring, + GDALProgressFunc, + Ptr{Cvoid}, + CSLConstList, + ), + hSrcBand, + nOverviewCount, + pahOverviewBands, + pszResampling, + pfnProgress, + pProgressData, + papszOptions, + ), + ) +end + """ GDALDatasetGetLayerCount(GDALDatasetH hDS) -> int @@ -8509,6 +8697,140 @@ function gdaldatasetupdatefielddomain(hDS, hFieldDomain, ppszFailureReason) ) end +""" + GDALDatasetGetRelationshipNames(GDALDatasetH hDS, + CSLConstList papszOptions) -> char ** + +Returns a list of the names of all relationships stored in the dataset. + +### Parameters +* **hDS**: Dataset handle. +* **papszOptions**: Driver specific options determining how relationships should be retrieved. Pass nullptr for default behavior. + +### Returns +list of relationship names, to be freed with CSLDestroy() +""" +function gdaldatasetgetrelationshipnames(arg1, arg2) + aftercare( + ccall( + (:GDALDatasetGetRelationshipNames, libgdal), + Ptr{Cstring}, + (GDALDatasetH, CSLConstList), + arg1, + arg2, + ), + ) +end + +""" + GDALDatasetGetRelationship(GDALDatasetH hDS, + const char * pszName) -> GDALRelationshipH + +Get a relationship from its name. + +### Parameters +* **hDS**: Dataset handle. +* **pszName**: Name of relationship. + +### Returns +the relationship (ownership remains to the dataset), or nullptr if not found. +""" +function gdaldatasetgetrelationship(hDS, pszName) + aftercare( + ccall( + (:GDALDatasetGetRelationship, libgdal), + GDALRelationshipH, + (GDALDatasetH, Cstring), + hDS, + pszName, + ), + ) +end + +""" + GDALDatasetAddRelationship(GDALDatasetH hDS, + GDALRelationshipH hRelationship, + char ** ppszFailureReason) -> bool + +Add a relationship to the dataset. + +### Parameters +* **hDS**: Dataset handle. +* **hRelationship**: The relationship definition. Contrary to the C++ version, the passed object is copied. +* **ppszFailureReason**: Output parameter. Will contain an error message if an error occurs (*ppszFailureReason to be freed with CPLFree). May be NULL. + +### Returns +true in case of success. +""" +function gdaldatasetaddrelationship(hDS, hRelationship, ppszFailureReason) + aftercare( + ccall( + (:GDALDatasetAddRelationship, libgdal), + Bool, + (GDALDatasetH, GDALRelationshipH, Ptr{Cstring}), + hDS, + hRelationship, + ppszFailureReason, + ), + ) +end + +""" + GDALDatasetDeleteRelationship(GDALDatasetH hDS, + const char * pszName, + char ** ppszFailureReason) -> bool + +Removes a relationship from the dataset. + +### Parameters +* **hDS**: Dataset handle. +* **pszName**: The relationship name. +* **ppszFailureReason**: Output parameter. Will contain an error message if an error occurs (*ppszFailureReason to be freed with CPLFree). May be NULL. + +### Returns +true in case of success. +""" +function gdaldatasetdeleterelationship(hDS, pszName, ppszFailureReason) + aftercare( + ccall( + (:GDALDatasetDeleteRelationship, libgdal), + Bool, + (GDALDatasetH, Cstring, Ptr{Cstring}), + hDS, + pszName, + ppszFailureReason, + ), + ) +end + +""" + GDALDatasetUpdateRelationship(GDALDatasetH hDS, + GDALRelationshipH hRelationship, + char ** ppszFailureReason) -> bool + +Updates an existing relationship by replacing its definition. + +### Parameters +* **hDS**: Dataset handle. +* **hRelationship**: The relationship definition. Contrary to the C++ version, the passed object is copied. +* **ppszFailureReason**: Output parameter. Will contain an error message if an error occurs (*ppszFailureReason to be freed with CPLFree). May be NULL. + +### Returns +true in case of success. +""" +function gdaldatasetupdaterelationship(hDS, hRelationship, ppszFailureReason) + aftercare( + ccall( + (:GDALDatasetUpdateRelationship, libgdal), + Bool, + (GDALDatasetH, GDALRelationshipH, Ptr{Cstring}), + hDS, + hRelationship, + ppszFailureReason, + ), + ) +end + """ Type of functions to pass to [`GDALAddDerivedBandPixelFunc`](@ref). @@ -9379,7 +9701,7 @@ end """ GDALComputeRasterMinMax(GDALRasterBandH hBand, int bApproxOK, - double adfMinMax) -> void + double adfMinMax) -> CPLErr Compute the min/max values for a band. """ @@ -9387,7 +9709,7 @@ function gdalcomputerasterminmax(hBand, bApproxOK, adfMinMax) aftercare( ccall( (:GDALComputeRasterMinMax, libgdal), - Cvoid, + CPLErr, (GDALRasterBandH, Cint, Ptr{Cdouble}), hBand, bApproxOK, @@ -10308,6 +10630,37 @@ function gdalcopybits( ) end +""" + GDALDeinterleave(const void * pSourceBuffer, + GDALDataType eSourceDT, + int nComponents, + void ** ppDestBuffer, + GDALDataType eDestDT, + size_t nIters) -> void +""" +function gdaldeinterleave( + pSourceBuffer, + eSourceDT, + nComponents, + ppDestBuffer, + eDestDT, + nIters, +) + aftercare( + ccall( + (:GDALDeinterleave, libgdal), + Cvoid, + (Ptr{Cvoid}, GDALDataType, Cint, Ptr{Ptr{Cvoid}}, GDALDataType, Csize_t), + pSourceBuffer, + eSourceDT, + nComponents, + ppDestBuffer, + eDestDT, + nIters, + ), + ) +end + """ GDALLoadWorldFile(const char * pszFilename, double * padfGeoTransform) -> int @@ -10603,23 +10956,6 @@ struct GDALRPCInfoV1 dfMAX_LAT::Cdouble end -""" - gdalextractrpcinfov1(arg1, arg2) - -Doxygen\\_Suppress -""" -function gdalextractrpcinfov1(arg1, arg2) - aftercare( - ccall( - (:GDALExtractRPCInfoV1, libgdal), - Cint, - (CSLConstList, Ptr{GDALRPCInfoV1}), - arg1, - arg2, - ), - ) -end - """ GDALColorEntry @@ -11473,6 +11809,529 @@ function gdalratremovestatistics(arg1) ) end +""" + GDALRelationshipCardinality + +Cardinality of relationship. + +\\since GDAL 3.6 + +| Enumerator | Note | +| :--------------------- | :------------ | +| GRC\\_ONE\\_TO\\_ONE | One-to-one | +| GRC\\_ONE\\_TO\\_MANY | One-to-many | +| GRC\\_MANY\\_TO\\_ONE | Many-to-one | +| GRC\\_MANY\\_TO\\_MANY | Many-to-many | +""" +@cenum GDALRelationshipCardinality::UInt32 begin + GRC_ONE_TO_ONE = 0 + GRC_ONE_TO_MANY = 1 + GRC_MANY_TO_ONE = 2 + GRC_MANY_TO_MANY = 3 +end + +""" + GDALRelationshipType + +Type of relationship. + +\\since GDAL 3.6 + +| Enumerator | Note | +| :---------------- | :------------------------ | +| GRT\\_COMPOSITE | Composite relationship | +| GRT\\_ASSOCIATION | Association relationship | +| GRT\\_AGGREGATION | Aggregation relationship | +""" +@cenum GDALRelationshipType::UInt32 begin + GRT_COMPOSITE = 0 + GRT_ASSOCIATION = 1 + GRT_AGGREGATION = 2 +end + +""" + GDALRelationshipCreate(const char * pszName, + const char * pszLeftTableName, + const char * pszRightTableName, + GDALRelationshipCardinality eCardinality) -> GDALRelationshipH + +Creates a new relationship. + +### Parameters +* **pszName**: relationship name +* **pszLeftTableName**: left table name +* **pszRightTableName**: right table name +* **eCardinality**: cardinality of relationship + +### Returns +a new handle that should be freed with GDALDestroyRelationship(), or NULL in case of error. +""" +function gdalrelationshipcreate(arg1, arg2, arg3, arg4) + aftercare( + ccall( + (:GDALRelationshipCreate, libgdal), + GDALRelationshipH, + (Cstring, Cstring, Cstring, GDALRelationshipCardinality), + arg1, + arg2, + arg3, + arg4, + ), + ) +end + +""" + GDALDestroyRelationship(GDALRelationshipH hRelationship) -> void + +Destroys a relationship. +""" +function gdaldestroyrelationship(arg1) + aftercare(ccall((:GDALDestroyRelationship, libgdal), Cvoid, (GDALRelationshipH,), arg1)) +end + +""" + GDALRelationshipGetName(GDALRelationshipH hRelationship) -> const char * + +Get the name of the relationship. + +### Returns +name. +""" +function gdalrelationshipgetname(arg1) + aftercare( + ccall((:GDALRelationshipGetName, libgdal), Cstring, (GDALRelationshipH,), arg1), + false, + ) +end + +""" + GDALRelationshipGetCardinality(GDALRelationshipH hRelationship) -> GDALRelationshipCardinality + +Get the cardinality of the relationship. + +### Returns +cardinality. +""" +function gdalrelationshipgetcardinality(arg1) + aftercare( + ccall( + (:GDALRelationshipGetCardinality, libgdal), + GDALRelationshipCardinality, + (GDALRelationshipH,), + arg1, + ), + ) +end + +""" + GDALRelationshipGetLeftTableName(GDALRelationshipH hRelationship) -> const char * + +Get the name of the left (or base/origin) table in the relationship. + +### Returns +left table name. +""" +function gdalrelationshipgetlefttablename(arg1) + aftercare( + ccall( + (:GDALRelationshipGetLeftTableName, libgdal), + Cstring, + (GDALRelationshipH,), + arg1, + ), + false, + ) +end + +""" + GDALRelationshipGetRightTableName(GDALRelationshipH hRelationship) -> const char * + +Get the name of the right (or related/destination) table in the relationship. + +### Returns +right table name. +""" +function gdalrelationshipgetrighttablename(arg1) + aftercare( + ccall( + (:GDALRelationshipGetRightTableName, libgdal), + Cstring, + (GDALRelationshipH,), + arg1, + ), + false, + ) +end + +""" + GDALRelationshipGetMappingTableName(GDALRelationshipH hRelationship) -> const char * + +Get the name of the mapping table for many-to-many relationships. + +### Returns +mapping table name. +""" +function gdalrelationshipgetmappingtablename(arg1) + aftercare( + ccall( + (:GDALRelationshipGetMappingTableName, libgdal), + Cstring, + (GDALRelationshipH,), + arg1, + ), + false, + ) +end + +""" + GDALRelationshipSetMappingTableName(GDALRelationshipH hRelationship, + const char * pszName) -> void + +Sets the name of the mapping table for many-to-many relationships. + +### Parameters +* **hRelationship**: handle to the relationship to apply the new mapping name to. +* **pszName**: the mapping table name to set. +""" +function gdalrelationshipsetmappingtablename(arg1, arg2) + aftercare( + ccall( + (:GDALRelationshipSetMappingTableName, libgdal), + Cvoid, + (GDALRelationshipH, Cstring), + arg1, + arg2, + ), + ) +end + +""" + GDALRelationshipGetLeftTableFields(GDALRelationshipH hRelationship) -> char ** + +Get the names of the participating fields from the left table in the relationship. + +### Returns +the field names, to be freed with CSLDestroy() +""" +function gdalrelationshipgetlefttablefields(arg1) + aftercare( + ccall( + (:GDALRelationshipGetLeftTableFields, libgdal), + Ptr{Cstring}, + (GDALRelationshipH,), + arg1, + ), + ) +end + +""" + GDALRelationshipGetRightTableFields(GDALRelationshipH hRelationship) -> char ** + +Get the names of the participating fields from the right table in the relationship. + +### Returns +the field names, to be freed with CSLDestroy() +""" +function gdalrelationshipgetrighttablefields(arg1) + aftercare( + ccall( + (:GDALRelationshipGetRightTableFields, libgdal), + Ptr{Cstring}, + (GDALRelationshipH,), + arg1, + ), + ) +end + +""" + GDALRelationshipSetLeftTableFields(GDALRelationshipH hRelationship, + CSLConstList papszFields) -> void + +Sets the names of the participating fields from the left table in the relationship. + +### Parameters +* **hRelationship**: handle to the relationship to apply the left table fields to. +* **papszFields**: the names of the fields. +""" +function gdalrelationshipsetlefttablefields(arg1, arg2) + aftercare( + ccall( + (:GDALRelationshipSetLeftTableFields, libgdal), + Cvoid, + (GDALRelationshipH, CSLConstList), + arg1, + arg2, + ), + ) +end + +""" + GDALRelationshipSetRightTableFields(GDALRelationshipH hRelationship, + CSLConstList papszFields) -> void + +Sets the names of the participating fields from the right table in the relationship. + +### Parameters +* **hRelationship**: handle to the relationship to apply the right table fields to. +* **papszFields**: the names of the fields. +""" +function gdalrelationshipsetrighttablefields(arg1, arg2) + aftercare( + ccall( + (:GDALRelationshipSetRightTableFields, libgdal), + Cvoid, + (GDALRelationshipH, CSLConstList), + arg1, + arg2, + ), + ) +end + +""" + GDALRelationshipGetLeftMappingTableFields(GDALRelationshipH hRelationship) -> char ** + +Get the names of the mapping table fields which correspond to the participating fields from the left table in the relationship. + +### Returns +the field names, to be freed with CSLDestroy() +""" +function gdalrelationshipgetleftmappingtablefields(arg1) + aftercare( + ccall( + (:GDALRelationshipGetLeftMappingTableFields, libgdal), + Ptr{Cstring}, + (GDALRelationshipH,), + arg1, + ), + ) +end + +""" + GDALRelationshipGetRightMappingTableFields(GDALRelationshipH hRelationship) -> char ** + +Get the names of the mapping table fields which correspond to the participating fields from the right table in the relationship. + +### Returns +the field names, to be freed with CSLDestroy() +""" +function gdalrelationshipgetrightmappingtablefields(arg1) + aftercare( + ccall( + (:GDALRelationshipGetRightMappingTableFields, libgdal), + Ptr{Cstring}, + (GDALRelationshipH,), + arg1, + ), + ) +end + +""" + GDALRelationshipSetLeftMappingTableFields(GDALRelationshipH hRelationship, + CSLConstList papszFields) -> void + +Sets the names of the mapping table fields which correspond to the participating fields from the left table in the relationship. + +### Parameters +* **hRelationship**: handle to the relationship to apply the left table fields to. +* **papszFields**: the names of the fields. +""" +function gdalrelationshipsetleftmappingtablefields(arg1, arg2) + aftercare( + ccall( + (:GDALRelationshipSetLeftMappingTableFields, libgdal), + Cvoid, + (GDALRelationshipH, CSLConstList), + arg1, + arg2, + ), + ) +end + +""" + GDALRelationshipSetRightMappingTableFields(GDALRelationshipH hRelationship, + CSLConstList papszFields) -> void + +Sets the names of the mapping table fields which correspond to the participating fields from the right table in the relationship. + +### Parameters +* **hRelationship**: handle to the relationship to apply the right table fields to. +* **papszFields**: the names of the fields. +""" +function gdalrelationshipsetrightmappingtablefields(arg1, arg2) + aftercare( + ccall( + (:GDALRelationshipSetRightMappingTableFields, libgdal), + Cvoid, + (GDALRelationshipH, CSLConstList), + arg1, + arg2, + ), + ) +end + +""" + GDALRelationshipGetType(GDALRelationshipH hRelationship) -> GDALRelationshipType + +Get the type of the relationship. + +### Returns +relationship type. +""" +function gdalrelationshipgettype(arg1) + aftercare( + ccall( + (:GDALRelationshipGetType, libgdal), + GDALRelationshipType, + (GDALRelationshipH,), + arg1, + ), + ) +end + +""" + GDALRelationshipSetType(GDALRelationshipH hRelationship, + GDALRelationshipType eType) -> void + +Sets the type of the relationship. +""" +function gdalrelationshipsettype(arg1, arg2) + aftercare( + ccall( + (:GDALRelationshipSetType, libgdal), + Cvoid, + (GDALRelationshipH, GDALRelationshipType), + arg1, + arg2, + ), + ) +end + +""" + GDALRelationshipGetForwardPathLabel(GDALRelationshipH hRelationship) -> const char * + +Get the label of the forward path for the relationship. + +### Returns +forward path label +""" +function gdalrelationshipgetforwardpathlabel(arg1) + aftercare( + ccall( + (:GDALRelationshipGetForwardPathLabel, libgdal), + Cstring, + (GDALRelationshipH,), + arg1, + ), + false, + ) +end + +""" + GDALRelationshipSetForwardPathLabel(GDALRelationshipH hRelationship, + const char * pszLabel) -> void + +Sets the label of the forward path for the relationship. + +### Parameters +* **hRelationship**: handle to the relationship to apply the new label to. +* **pszLabel**: the label to set. +""" +function gdalrelationshipsetforwardpathlabel(arg1, arg2) + aftercare( + ccall( + (:GDALRelationshipSetForwardPathLabel, libgdal), + Cvoid, + (GDALRelationshipH, Cstring), + arg1, + arg2, + ), + ) +end + +""" + GDALRelationshipGetBackwardPathLabel(GDALRelationshipH hRelationship) -> const char * + +Get the label of the backward path for the relationship. + +### Returns +backward path label +""" +function gdalrelationshipgetbackwardpathlabel(arg1) + aftercare( + ccall( + (:GDALRelationshipGetBackwardPathLabel, libgdal), + Cstring, + (GDALRelationshipH,), + arg1, + ), + false, + ) +end + +""" + GDALRelationshipSetBackwardPathLabel(GDALRelationshipH hRelationship, + const char * pszLabel) -> void + +Sets the label of the backward path for the relationship. + +### Parameters +* **hRelationship**: handle to the relationship to apply the new label to. +* **pszLabel**: the label to set. +""" +function gdalrelationshipsetbackwardpathlabel(arg1, arg2) + aftercare( + ccall( + (:GDALRelationshipSetBackwardPathLabel, libgdal), + Cvoid, + (GDALRelationshipH, Cstring), + arg1, + arg2, + ), + ) +end + +""" + GDALRelationshipGetRelatedTableType(GDALRelationshipH hRelationship) -> const char * + +Get the type string of the related table. + +### Returns +related table type +""" +function gdalrelationshipgetrelatedtabletype(arg1) + aftercare( + ccall( + (:GDALRelationshipGetRelatedTableType, libgdal), + Cstring, + (GDALRelationshipH,), + arg1, + ), + false, + ) +end + +""" + GDALRelationshipSetRelatedTableType(GDALRelationshipH hRelationship, + const char * pszType) -> void + +Sets the type string of the related table. + +### Parameters +* **hRelationship**: handle to the relationship to apply the new type to. +* **pszType**: the type to set. +""" +function gdalrelationshipsetrelatedtabletype(arg1, arg2) + aftercare( + ccall( + (:GDALRelationshipSetRelatedTableType, libgdal), + Cvoid, + (GDALRelationshipH, Cstring), + arg1, + arg2, + ), + ) +end + """ GDALSetCacheMax(int nNewSizeInBytes) -> void @@ -12026,7 +12885,7 @@ Dump the structure of a JPEG2000 file as a XML tree. ### Parameters * **pszFilename**: filename. -* **papszOptions**: NULL terminated list of options, or NULL. Allowed options are BINARY_CONTENT=YES, TEXT_CONTENT=YES, CODESTREAM=YES, ALL=YES. +* **papszOptions**: NULL terminated list of options, or NULL. Allowed options are BINARY_CONTENT=YES, TEXT_CONTENT=YES, CODESTREAM=YES, ALL=YES, JP2_BOXES=YES, CODESTREAM_MARKERS=list_of_marker_names_comma_separated, STOP_AT_SOD=YES, ALLOW_GET_FILE_SIZE=NO. ### Returns XML tree (to be freed with CPLDestroyXMLNode()) or NULL in case of error @@ -14628,37 +15487,6 @@ function rpcinfov2tomd(psRPCInfo) ) end -""" - GDALCreateRPCTransformerV2(const GDALRPCInfoV2 * psRPCInfo, - int bReversed, - double dfPixErrThreshold, - char ** papszOptions) -> void * - -Create an RPC based transformer. - -### Parameters -* **psRPCInfo**: Definition of the RPC parameters. -* **bReversed**: If true "forward" transformation will be lat/long to pixel/line instead of the normal pixel/line to lat/long. -* **dfPixErrThreshold**: the error (measured in pixels) allowed in the iterative solution of pixel/line to lat/long computations (the other way is always exact given the equations). Starting with GDAL 2.1, this may also be set through the RPC_PIXEL_ERROR_THRESHOLD transformer option. If a negative or null value is provided, then this defaults to 0.1 pixel. -* **papszOptions**: Other transformer options (i.e. RPC_HEIGHT=z). - -### Returns -transformer callback data (deallocate with GDALDestroyTransformer()). -""" -function gdalcreaterpctransformerv2(psRPC, bReversed, dfPixErrThreshold, papszOptions) - aftercare( - ccall( - (:GDALCreateRPCTransformerV2, libgdal), - Ptr{Cvoid}, - (Ptr{GDALRPCInfoV2}, Cint, Cdouble, Ptr{Cstring}), - psRPC, - bReversed, - dfPixErrThreshold, - papszOptions, - ), - ) -end - """ GDALComputeMedianCutPCT(GDALRasterBandH hRed, GDALRasterBandH hGreen, @@ -14793,7 +15621,7 @@ Compute checksum for image region. * **nYSize**: line size of window to read. ### Returns -Checksum value. +Checksum value, or -1 in case of error (starting with GDAL 3.6) """ function gdalchecksumimage(hBand, nXOff, nYOff, nXSize, nYSize) aftercare( @@ -14854,7 +15682,7 @@ Fill selected raster regions by interpolation from the edges. ### Parameters * **hTargetBand**: the raster band to be modified in place. -* **hMaskBand**: a mask band indicating pixels to be interpolated (zero valued). +* **hMaskBand**: a mask band indicating pixels to be interpolated (zero valued). If hMaskBand is set to NULL, this method will internally use the mask band returned by GDALGetMaskBand(hTargetBand). * **dfMaxSearchDist**: the maximum number of pixels to search in all directions to find values to interpolate from. * **bDeprecatedOption**: unused argument, should be zero. * **nSmoothingIterations**: the number of 3x3 smoothing filter passes to run (0 or more). @@ -15731,26 +16559,6 @@ function rpcinfov1tomd(psRPCInfo) ) end -""" - GDALCreateRPCTransformerV1(GDALRPCInfoV1 * psRPCInfo, - int bReversed, - double dfPixErrThreshold, - char ** papszOptions) -> void * -""" -function gdalcreaterpctransformerv1(psRPC, bReversed, dfPixErrThreshold, papszOptions) - aftercare( - ccall( - (:GDALCreateRPCTransformerV1, libgdal), - Ptr{Cvoid}, - (Ptr{GDALRPCInfoV1}, Cint, Cdouble, Ptr{Cstring}), - psRPC, - bReversed, - dfPixErrThreshold, - papszOptions, - ), - ) -end - """ GDALDestroyRPCTransformer(void * pTransformAlg) -> void @@ -16079,7 +16887,7 @@ Suggest output file size. * **pnPixels**: int in which the suggest pixel width of output is returned. * **pnLines**: int in which the suggest pixel height of output is returned. * **padfExtent**: Four entry array to return extents as (xmin, ymin, xmax, ymax). -* **nOptions**: Options, currently always zero. +* **nOptions**: Options. Zero or GDAL_SWO_ROUND_UP_SIZE to ask *pnPixels and *pnLines to be rounded up instead of being rounded to the closes integer. ### Returns CE_None if successful or CE_Failure otherwise. @@ -16929,20 +17737,22 @@ end Inverse distance to a power method control options -| Field | Note | -| :---------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| dfPower | Weighting power. | -| dfSmoothing | Smoothing parameter. | -| dfAnisotropyRatio | Reserved for future use. | -| dfAnisotropyAngle | | -| dfRadius1 | The first radius (X axis if rotation angle is 0) of search ellipse. | -| dfRadius2 | The second radius (Y axis if rotation angle is 0) of search ellipse. | -| dfAngle | Angle of ellipse rotation in degrees. Ellipse rotated counter clockwise. | -| nMaxPoints | Maximum number of data points to use. Do not search for more points than this number. If less amount of points found the grid node considered empty and will be filled with NODATA marker. | -| nMinPoints | Minimum number of data points to use. If less amount of points found the grid node considered empty and will be filled with NODATA marker. | -| dfNoDataValue | No data marker to fill empty points. | +| Field | Note | +| :---------------- | :------------------------------------------------------------------------------------------------------------------------------------------- | +| nSizeOfStructure | Added in GDAL 3.6 to detect potential ABI issues. Should be set to sizeof([`GDALGridInverseDistanceToAPowerOptions`](@ref)) | +| dfPower | Weighting power. | +| dfSmoothing | Smoothing parameter. | +| dfAnisotropyRatio | Reserved for future use. | +| dfAnisotropyAngle | | +| dfRadius1 | The first radius (X axis if rotation angle is 0) of search ellipse. | +| dfRadius2 | The second radius (Y axis if rotation angle is 0) of search ellipse. | +| dfAngle | Angle of ellipse rotation in degrees. Ellipse rotated counter clockwise. | +| nMaxPoints | Maximum number of data points to use. Do not search for more points than this number. | +| nMinPoints | Minimum number of data points to use. If less amount of points found the grid node considered empty and will be filled with NODATA marker. | +| dfNoDataValue | No data marker to fill empty points. | """ struct GDALGridInverseDistanceToAPowerOptions + nSizeOfStructure::Csize_t dfPower::Cdouble dfSmoothing::Cdouble dfAnisotropyRatio::Cdouble @@ -16960,22 +17770,28 @@ end Inverse distance to a power, with nearest neighbour search, control options -| Field | Note | -| :------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| dfPower | Weighting power. | -| dfRadius | The radius of search circle. | -| dfSmoothing | Smoothing parameter. | -| nMaxPoints | Maximum number of data points to use. Do not search for more points than this number. If less amount of points found the grid node considered empty and will be filled with NODATA marker. | -| nMinPoints | Minimum number of data points to use. If less amount of points found the grid node considered empty and will be filled with NODATA marker. | -| dfNoDataValue | No data marker to fill empty points. | +| Field | Note | +| :-------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| nSizeOfStructure | Added in GDAL 3.6 to detect potential ABI issues. Should be set to sizeof([`GDALGridInverseDistanceToAPowerNearestNeighborOptions`](@ref)) | +| dfPower | Weighting power. | +| dfRadius | The radius of search circle. | +| dfSmoothing | Smoothing parameter. | +| nMaxPoints | Maximum number of data points to use. Do not search for more points than this number. | +| nMinPoints | Minimum number of data points to use. If less amount of points found the grid node considered empty and will be filled with NODATA marker. | +| dfNoDataValue | No data marker to fill empty points. | +| nMaxPointsPerQuadrant | Maximum number of data points to use for each of the 4 quadrants. Do not search for more points than this number. | +| nMinPointsPerQuadrant | Minimum number of data points to use for each of the 4 quadrants. If less amount of points found the grid node considered empty and will be filled with NODATA marker. | """ struct GDALGridInverseDistanceToAPowerNearestNeighborOptions + nSizeOfStructure::Csize_t dfPower::Cdouble dfRadius::Cdouble dfSmoothing::Cdouble nMaxPoints::GUInt32 nMinPoints::GUInt32 dfNoDataValue::Cdouble + nMaxPointsPerQuadrant::GUInt32 + nMinPointsPerQuadrant::GUInt32 end """ @@ -16983,20 +17799,28 @@ end Moving average method control options -| Field | Note | -| :------------ | :----------------------------------------------------------------------------------------------------------------------------------------------- | -| dfRadius1 | The first radius (X axis if rotation angle is 0) of search ellipse. | -| dfRadius2 | The second radius (Y axis if rotation angle is 0) of search ellipse. | -| dfAngle | Angle of ellipse rotation in degrees. Ellipse rotated counter clockwise. | -| nMinPoints | Minimum number of data points to average. If less amount of points found the grid node considered empty and will be filled with NODATA marker. | -| dfNoDataValue | No data marker to fill empty points. | +| Field | Note | +| :-------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| nSizeOfStructure | Added in GDAL 3.6 to detect potential ABI issues. Should be set to sizeof([`GDALGridMovingAverageOptions`](@ref)) | +| dfRadius1 | The first radius (X axis if rotation angle is 0) of search ellipse. | +| dfRadius2 | The second radius (Y axis if rotation angle is 0) of search ellipse. | +| dfAngle | Angle of ellipse rotation in degrees. Ellipse rotated counter clockwise. | +| nMaxPoints | Maximum number of data points to use. Do not search for more points than this number. | +| nMinPoints | Minimum number of data points to average. If less amount of points found the grid node considered empty and will be filled with NODATA marker. | +| dfNoDataValue | No data marker to fill empty points. | +| nMaxPointsPerQuadrant | Maximum number of data points to use for each of the 4 quadrants. Do not search for more points than this number. | +| nMinPointsPerQuadrant | Minimum number of data points to use for each of the 4 quadrants. If less amount of points found the grid node considered empty and will be filled with NODATA marker. | """ struct GDALGridMovingAverageOptions + nSizeOfStructure::Csize_t dfRadius1::Cdouble dfRadius2::Cdouble dfAngle::Cdouble + nMaxPoints::GUInt32 nMinPoints::GUInt32 dfNoDataValue::Cdouble + nMaxPointsPerQuadrant::GUInt32 + nMinPointsPerQuadrant::GUInt32 end """ @@ -17004,14 +17828,16 @@ end Nearest neighbor method control options -| Field | Note | -| :------------ | :------------------------------------------------------------------------- | -| dfRadius1 | The first radius (X axis if rotation angle is 0) of search ellipse. | -| dfRadius2 | The second radius (Y axis if rotation angle is 0) of search ellipse. | -| dfAngle | Angle of ellipse rotation in degrees. Ellipse rotated counter clockwise. | -| dfNoDataValue | No data marker to fill empty points. | +| Field | Note | +| :--------------- | :------------------------------------------------------------------------------------------------------------------- | +| nSizeOfStructure | Added in GDAL 3.6 to detect potential ABI issues. Should be set to sizeof([`GDALGridNearestNeighborOptions`](@ref)) | +| dfRadius1 | The first radius (X axis if rotation angle is 0) of search ellipse. | +| dfRadius2 | The second radius (Y axis if rotation angle is 0) of search ellipse. | +| dfAngle | Angle of ellipse rotation in degrees. Ellipse rotated counter clockwise. | +| dfNoDataValue | No data marker to fill empty points. | """ struct GDALGridNearestNeighborOptions + nSizeOfStructure::Csize_t dfRadius1::Cdouble dfRadius2::Cdouble dfAngle::Cdouble @@ -17023,20 +17849,26 @@ end Data metrics method control options -| Field | Note | -| :------------ | :----------------------------------------------------------------------------------------------------------------------------------------------- | -| dfRadius1 | The first radius (X axis if rotation angle is 0) of search ellipse. | -| dfRadius2 | The second radius (Y axis if rotation angle is 0) of search ellipse. | -| dfAngle | Angle of ellipse rotation in degrees. Ellipse rotated counter clockwise. | -| nMinPoints | Minimum number of data points to average. If less amount of points found the grid node considered empty and will be filled with NODATA marker. | -| dfNoDataValue | No data marker to fill empty points. | +| Field | Note | +| :-------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| nSizeOfStructure | Added in GDAL 3.6 to detect potential ABI issues. Should be set to sizeof([`GDALGridDataMetricsOptions`](@ref)) | +| dfRadius1 | The first radius (X axis if rotation angle is 0) of search ellipse. | +| dfRadius2 | The second radius (Y axis if rotation angle is 0) of search ellipse. | +| dfAngle | Angle of ellipse rotation in degrees. Ellipse rotated counter clockwise. | +| nMinPoints | Minimum number of data points to average. If less amount of points found the grid node considered empty and will be filled with NODATA marker. | +| dfNoDataValue | No data marker to fill empty points. | +| nMaxPointsPerQuadrant | Maximum number of data points to use for each of the 4 quadrants. Do not search for more points than this number. | +| nMinPointsPerQuadrant | Minimum number of data points to use for each of the 4 quadrants. If less amount of points found the grid node considered empty and will be filled with NODATA marker. | """ struct GDALGridDataMetricsOptions + nSizeOfStructure::Csize_t dfRadius1::Cdouble dfRadius2::Cdouble dfAngle::Cdouble nMinPoints::GUInt32 dfNoDataValue::Cdouble + nMaxPointsPerQuadrant::GUInt32 + nMinPointsPerQuadrant::GUInt32 end """ @@ -17044,12 +17876,14 @@ end Linear method control options -| Field | Note | -| :------------ | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| dfRadius | In case the point to be interpolated does not fit into a triangle of the Delaunay triangulation, use that maximum distance to search a nearest neighbour, or use nodata otherwise. If set to -1, the search distance is infinite. If set to 0, nodata value will be always used. | -| dfNoDataValue | No data marker to fill empty points. | +| Field | Note | +| :--------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| nSizeOfStructure | Added in GDAL 3.6 to detect potential ABI issues. Should be set to sizeof([`GDALGridLinearOptions`](@ref)) | +| dfRadius | In case the point to be interpolated does not fit into a triangle of the Delaunay triangulation, use that maximum distance to search a nearest neighbour, or use nodata otherwise. If set to -1, the search distance is infinite. If set to 0, nodata value will be always used. | +| dfNoDataValue | No data marker to fill empty points. | """ struct GDALGridLinearOptions + nSizeOfStructure::Csize_t dfRadius::Cdouble dfNoDataValue::Cdouble end @@ -20446,7 +21280,7 @@ Allocates a GDALMultiDimInfo 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 gdalmdiminfo utility. -* **psOptionsForBinary**: (output) may be NULL (and should generally be NULL), otherwise (gdalmultidiminfo_bin.cpp use case) must be allocated with GDALMultiDimInfoOptionsForBinaryNew() prior to this function. Will be filled with potentially present filename, open options, subdataset number... +* **psOptionsForBinary**: should be nullptr, unless called from gdalmultidiminfo_bin.cpp ### Returns pointer to the allocated GDALMultiDimInfoOptions struct. Must be freed with GDALMultiDimInfoOptionsFree(). @@ -20520,7 +21354,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**: (output) may be NULL (and should generally be NULL), otherwise (gdalmultidimtranslate_bin.cpp use case) must be allocated with GDALTranslateOptionsForBinaryNew() prior to this function. Will be filled with potentially present filename, open options,... +* **psOptionsForBinary**: should be nullptr, unless called from gdalmultidimtranslate_bin.cpp ### Returns pointer to the allocated GDALMultiDimTranslateOptions struct. Must be freed with GDALMultiDimTranslateOptionsFree(). @@ -22177,6 +23011,34 @@ function ogr_g_convexhull(arg1) aftercare(ccall((:OGR_G_ConvexHull, libgdal), OGRGeometryH, (OGRGeometryH,), arg1)) end +""" + OGR_G_ConcaveHull(OGRGeometryH hTarget, + double dfRatio, + bool bAllowHoles) -> OGRGeometryH + +Compute "concave hull" of a geometry. + +### Parameters +* **hTarget**: The Geometry to calculate the concave hull of. +* **dfRatio**: Ratio of the area of the convex hull and the concave hull. +* **bAllowHoles**: Whether holes are allowed. + +### Returns +a handle to a newly allocated geometry now owned by the caller, or NULL on failure. +""" +function ogr_g_concavehull(arg1, dfRatio, bAllowHoles) + aftercare( + ccall( + (:OGR_G_ConcaveHull, libgdal), + OGRGeometryH, + (OGRGeometryH, Cdouble, Bool), + arg1, + dfRatio, + bAllowHoles, + ), + ) +end + """ OGR_G_Buffer(OGRGeometryH hTarget, double dfDist, @@ -25380,13 +26242,13 @@ function Base.getproperty(x::Ptr{OGRField}, f::Symbol) f === :Integer64 && return Ptr{GIntBig}(x + 0) f === :Real && return Ptr{Cdouble}(x + 0) f === :String && return Ptr{Cstring}(x + 0) - f === :IntegerList && return Ptr{__JL_Ctag_160}(x + 0) - f === :Integer64List && return Ptr{__JL_Ctag_161}(x + 0) - f === :RealList && return Ptr{__JL_Ctag_162}(x + 0) - f === :StringList && return Ptr{__JL_Ctag_163}(x + 0) - f === :Binary && return Ptr{__JL_Ctag_164}(x + 0) - f === :Set && return Ptr{__JL_Ctag_165}(x + 0) - f === :Date && return Ptr{__JL_Ctag_166}(x + 0) + f === :IntegerList && return Ptr{__JL_Ctag_163}(x + 0) + f === :Integer64List && return Ptr{__JL_Ctag_164}(x + 0) + f === :RealList && return Ptr{__JL_Ctag_165}(x + 0) + f === :StringList && return Ptr{__JL_Ctag_166}(x + 0) + f === :Binary && return Ptr{__JL_Ctag_167}(x + 0) + f === :Set && return Ptr{__JL_Ctag_168}(x + 0) + f === :Date && return Ptr{__JL_Ctag_169}(x + 0) return getfield(x, f) end @@ -27190,6 +28052,65 @@ function ogr_l_getgeomtype(arg1) aftercare(ccall((:OGR_L_GetGeomType, libgdal), OGRwkbGeometryType, (OGRLayerH,), arg1)) end +""" + OGRGeometryTypeCounter + +Result item of [`OGR_L_GetGeometryTypes`](@ref) + +| Field | Note | +| :-------- | :-------------------------------------- | +| eGeomType | Geometry type | +| nCount | Number of geometries of type eGeomType | +""" +struct OGRGeometryTypeCounter + eGeomType::OGRwkbGeometryType + nCount::Int64 +end + +""" + OGR_L_GetGeometryTypes(OGRLayerH hLayer, + int iGeomField, + int nFlags, + int * pnEntryCount, + GDALProgressFunc pfnProgress, + void * pProgressData) -> OGRGeometryTypeCounter * + +Get actual geometry types found in features. + +### Parameters +* **hLayer**: Layer. +* **iGeomField**: Geometry field index. +* **nFlags**: Hint flags. 0, or combination of OGR_GGT_COUNT_NOT_NEEDED, OGR_GGT_STOP_IF_MIXED, OGR_GGT_GEOMCOLLECTIONZ_TINZ +* **pnEntryCount**: Pointer to the number of entries in the returned array. Must not be NULL. +* **pfnProgress**: Cancellation callback. May be NULL. +* **pProgressData**: User data for the cancellation callback. May be NULL. + +### Returns +an array of *pnEntryCount that must be freed with CPLFree(), or NULL in case of error +""" +function ogr_l_getgeometrytypes( + hLayer, + iGeomField, + nFlags, + pnEntryCount, + pfnProgress, + pProgressData, +) + aftercare( + ccall( + (:OGR_L_GetGeometryTypes, libgdal), + Ptr{OGRGeometryTypeCounter}, + (OGRLayerH, Cint, Cint, Ptr{Cint}, GDALProgressFunc, Ptr{Cvoid}), + hLayer, + iGeomField, + nFlags, + pnEntryCount, + pfnProgress, + pProgressData, + ), + ) +end + """ OGR_L_GetSpatialFilter(OGRLayerH) -> OGRGeometryH @@ -27342,6 +28263,37 @@ function ogr_l_setattributefilter(arg1, arg2) ) end +"Data type for a Arrow C stream Include ogr\\\\_recordbatch.h to get the definition" +const ArrowArrayStream = Cvoid + +""" + OGR_L_GetArrowStream(OGRLayerH hLayer, + struct ArrowArrayStream * out_stream, + char ** papszOptions) -> bool + +Get a Arrow C stream. + +### Parameters +* **hLayer**: Layer +* **out_stream**: Output stream. Must not be NULL. The content of the structure does not need to be initialized. +* **papszOptions**: NULL terminated list of key=value options. + +### Returns +true in case of success. +""" +function ogr_l_getarrowstream(hLayer, out_stream, papszOptions) + aftercare( + ccall( + (:OGR_L_GetArrowStream, libgdal), + Bool, + (OGRLayerH, Ptr{ArrowArrayStream}, Ptr{Cstring}), + hLayer, + out_stream, + papszOptions, + ), + ) +end + """ OGR_L_SetNextByIndex(OGRLayerH, GIntBig) -> OGRErr @@ -27443,6 +28395,31 @@ function ogr_l_deletefeature(arg1, arg2) ) end +""" + OGR_L_UpsertFeature(OGRLayerH, + OGRFeatureH) -> OGRErr + +Rewrite an existing feature or create a new feature within a layer. + +### Parameters +* **hLayer**: handle to the layer to write the feature to. +* **hFeat**: the handle of the feature to write to disk. + +### Returns +OGRERR_NONE on success. +""" +function ogr_l_upsertfeature(arg1, arg2) + aftercare( + ccall( + (:OGR_L_UpsertFeature, libgdal), + OGRErr, + (OGRLayerH, OGRFeatureH), + arg1, + arg2, + ), + ) +end + """ OGR_L_GetLayerDefn(OGRLayerH) -> OGRFeatureDefnH @@ -27752,6 +28729,37 @@ function ogr_l_alterfielddefn(arg1, iField, hNewFieldDefn, nFlags) ) end +""" + OGR_L_AlterGeomFieldDefn(OGRLayerH, + int iField, + OGRGeomFieldDefnH hNewGeomFieldDefn, + int nFlags) -> OGRErr + +Alter the definition of an existing geometry field on a layer. + +### Parameters +* **hLayer**: handle to the layer. +* **iGeomField**: index of the field whose definition must be altered. +* **hNewGeomFieldDefn**: new field definition +* **nFlags**: combination of ALTER_GEOM_FIELD_DEFN_NAME_FLAG, ALTER_GEOM_FIELD_DEFN_TYPE_FLAG, ALTER_GEOM_FIELD_DEFN_NULLABLE_FLAG, ALTER_GEOM_FIELD_DEFN_SRS_FLAG, ALTER_GEOM_FIELD_DEFN_SRS_COORD_EPOCH_FLAG to indicate which of the name and/or type and/or nullability and/or SRS and/or coordinate epoch from the new field definition must be taken into account. Or ALTER_GEOM_FIELD_DEFN_ALL_FLAG to update all members. + +### Returns +OGRERR_NONE on success. +""" +function ogr_l_altergeomfielddefn(arg1, iField, hNewGeomFieldDefn, nFlags) + aftercare( + ccall( + (:OGR_L_AlterGeomFieldDefn, libgdal), + OGRErr, + (OGRLayerH, Cint, OGRGeomFieldDefnH, Cint), + arg1, + iField, + hNewGeomFieldDefn, + nFlags, + ), + ) +end + """ OGR_L_StartTransaction(OGRLayerH) -> OGRErr @@ -30973,6 +31981,15 @@ function osrmorphfromesri(arg1) aftercare(ccall((:OSRMorphFromESRI, libgdal), OGRErr, (OGRSpatialReferenceH,), arg1)) end +""" + OSRStripVertical(OGRSpatialReferenceH hSRS) -> OGRErr + +Convert a compound cs into a horizontal CS. +""" +function osrstripvertical(arg1) + aftercare(ccall((:OSRStripVertical, libgdal), OGRErr, (OGRSpatialReferenceH,), arg1)) +end + """ OSRConvertToOtherProjection(OGRSpatialReferenceH hSRS, const char * pszTargetProjection, @@ -34173,141 +35190,141 @@ function octtransformbounds( ) end -struct __JL_Ctag_160 +struct __JL_Ctag_163 nCount::Cint paList::Ptr{Cint} end -function Base.getproperty(x::Ptr{__JL_Ctag_160}, f::Symbol) +function Base.getproperty(x::Ptr{__JL_Ctag_163}, f::Symbol) f === :nCount && return Ptr{Cint}(x + 0) f === :paList && return Ptr{Ptr{Cint}}(x + 8) return getfield(x, f) end -function Base.getproperty(x::__JL_Ctag_160, f::Symbol) - r = Ref{__JL_Ctag_160}(x) - ptr = Base.unsafe_convert(Ptr{__JL_Ctag_160}, r) +function Base.getproperty(x::__JL_Ctag_163, f::Symbol) + r = Ref{__JL_Ctag_163}(x) + ptr = Base.unsafe_convert(Ptr{__JL_Ctag_163}, r) fptr = getproperty(ptr, f) GC.@preserve r unsafe_load(fptr) end -function Base.setproperty!(x::Ptr{__JL_Ctag_160}, f::Symbol, v) +function Base.setproperty!(x::Ptr{__JL_Ctag_163}, f::Symbol, v) unsafe_store!(getproperty(x, f), v) end -struct __JL_Ctag_161 +struct __JL_Ctag_164 nCount::Cint paList::Ptr{GIntBig} end -function Base.getproperty(x::Ptr{__JL_Ctag_161}, f::Symbol) +function Base.getproperty(x::Ptr{__JL_Ctag_164}, f::Symbol) f === :nCount && return Ptr{Cint}(x + 0) f === :paList && return Ptr{Ptr{GIntBig}}(x + 8) return getfield(x, f) end -function Base.getproperty(x::__JL_Ctag_161, f::Symbol) - r = Ref{__JL_Ctag_161}(x) - ptr = Base.unsafe_convert(Ptr{__JL_Ctag_161}, r) +function Base.getproperty(x::__JL_Ctag_164, f::Symbol) + r = Ref{__JL_Ctag_164}(x) + ptr = Base.unsafe_convert(Ptr{__JL_Ctag_164}, r) fptr = getproperty(ptr, f) GC.@preserve r unsafe_load(fptr) end -function Base.setproperty!(x::Ptr{__JL_Ctag_161}, f::Symbol, v) +function Base.setproperty!(x::Ptr{__JL_Ctag_164}, f::Symbol, v) unsafe_store!(getproperty(x, f), v) end -struct __JL_Ctag_162 +struct __JL_Ctag_165 nCount::Cint paList::Ptr{Cdouble} end -function Base.getproperty(x::Ptr{__JL_Ctag_162}, f::Symbol) +function Base.getproperty(x::Ptr{__JL_Ctag_165}, f::Symbol) f === :nCount && return Ptr{Cint}(x + 0) f === :paList && return Ptr{Ptr{Cdouble}}(x + 8) return getfield(x, f) end -function Base.getproperty(x::__JL_Ctag_162, f::Symbol) - r = Ref{__JL_Ctag_162}(x) - ptr = Base.unsafe_convert(Ptr{__JL_Ctag_162}, r) +function Base.getproperty(x::__JL_Ctag_165, f::Symbol) + r = Ref{__JL_Ctag_165}(x) + ptr = Base.unsafe_convert(Ptr{__JL_Ctag_165}, r) fptr = getproperty(ptr, f) GC.@preserve r unsafe_load(fptr) end -function Base.setproperty!(x::Ptr{__JL_Ctag_162}, f::Symbol, v) +function Base.setproperty!(x::Ptr{__JL_Ctag_165}, f::Symbol, v) unsafe_store!(getproperty(x, f), v) end -struct __JL_Ctag_163 +struct __JL_Ctag_166 nCount::Cint paList::Ptr{Cstring} end -function Base.getproperty(x::Ptr{__JL_Ctag_163}, f::Symbol) +function Base.getproperty(x::Ptr{__JL_Ctag_166}, f::Symbol) f === :nCount && return Ptr{Cint}(x + 0) f === :paList && return Ptr{Ptr{Cstring}}(x + 8) return getfield(x, f) end -function Base.getproperty(x::__JL_Ctag_163, f::Symbol) - r = Ref{__JL_Ctag_163}(x) - ptr = Base.unsafe_convert(Ptr{__JL_Ctag_163}, r) +function Base.getproperty(x::__JL_Ctag_166, f::Symbol) + r = Ref{__JL_Ctag_166}(x) + ptr = Base.unsafe_convert(Ptr{__JL_Ctag_166}, r) fptr = getproperty(ptr, f) GC.@preserve r unsafe_load(fptr) end -function Base.setproperty!(x::Ptr{__JL_Ctag_163}, f::Symbol, v) +function Base.setproperty!(x::Ptr{__JL_Ctag_166}, f::Symbol, v) unsafe_store!(getproperty(x, f), v) end -struct __JL_Ctag_164 +struct __JL_Ctag_167 nCount::Cint paData::Ptr{GByte} end -function Base.getproperty(x::Ptr{__JL_Ctag_164}, f::Symbol) +function Base.getproperty(x::Ptr{__JL_Ctag_167}, f::Symbol) f === :nCount && return Ptr{Cint}(x + 0) f === :paData && return Ptr{Ptr{GByte}}(x + 8) return getfield(x, f) end -function Base.getproperty(x::__JL_Ctag_164, f::Symbol) - r = Ref{__JL_Ctag_164}(x) - ptr = Base.unsafe_convert(Ptr{__JL_Ctag_164}, r) +function Base.getproperty(x::__JL_Ctag_167, f::Symbol) + r = Ref{__JL_Ctag_167}(x) + ptr = Base.unsafe_convert(Ptr{__JL_Ctag_167}, r) fptr = getproperty(ptr, f) GC.@preserve r unsafe_load(fptr) end -function Base.setproperty!(x::Ptr{__JL_Ctag_164}, f::Symbol, v) +function Base.setproperty!(x::Ptr{__JL_Ctag_167}, f::Symbol, v) unsafe_store!(getproperty(x, f), v) end -struct __JL_Ctag_165 +struct __JL_Ctag_168 nMarker1::Cint nMarker2::Cint nMarker3::Cint end -function Base.getproperty(x::Ptr{__JL_Ctag_165}, f::Symbol) +function Base.getproperty(x::Ptr{__JL_Ctag_168}, f::Symbol) f === :nMarker1 && return Ptr{Cint}(x + 0) f === :nMarker2 && return Ptr{Cint}(x + 4) f === :nMarker3 && return Ptr{Cint}(x + 8) return getfield(x, f) end -function Base.getproperty(x::__JL_Ctag_165, f::Symbol) - r = Ref{__JL_Ctag_165}(x) - ptr = Base.unsafe_convert(Ptr{__JL_Ctag_165}, r) +function Base.getproperty(x::__JL_Ctag_168, f::Symbol) + r = Ref{__JL_Ctag_168}(x) + ptr = Base.unsafe_convert(Ptr{__JL_Ctag_168}, r) fptr = getproperty(ptr, f) GC.@preserve r unsafe_load(fptr) end -function Base.setproperty!(x::Ptr{__JL_Ctag_165}, f::Symbol, v) +function Base.setproperty!(x::Ptr{__JL_Ctag_168}, f::Symbol, v) unsafe_store!(getproperty(x, f), v) end -struct __JL_Ctag_166 +struct __JL_Ctag_169 Year::GInt16 Month::GByte Day::GByte @@ -34318,7 +35335,7 @@ struct __JL_Ctag_166 Second::Cfloat end -function Base.getproperty(x::Ptr{__JL_Ctag_166}, f::Symbol) +function Base.getproperty(x::Ptr{__JL_Ctag_169}, f::Symbol) f === :Year && return Ptr{GInt16}(x + 0) f === :Month && return Ptr{GByte}(x + 2) f === :Day && return Ptr{GByte}(x + 3) @@ -34330,65 +35347,35 @@ function Base.getproperty(x::Ptr{__JL_Ctag_166}, f::Symbol) return getfield(x, f) end -function Base.getproperty(x::__JL_Ctag_166, f::Symbol) - r = Ref{__JL_Ctag_166}(x) - ptr = Base.unsafe_convert(Ptr{__JL_Ctag_166}, r) +function Base.getproperty(x::__JL_Ctag_169, f::Symbol) + r = Ref{__JL_Ctag_169}(x) + ptr = Base.unsafe_convert(Ptr{__JL_Ctag_169}, r) fptr = getproperty(ptr, f) GC.@preserve r unsafe_load(fptr) end -function Base.setproperty!(x::Ptr{__JL_Ctag_166}, f::Symbol, v) +function Base.setproperty!(x::Ptr{__JL_Ctag_169}, f::Symbol, v) unsafe_store!(getproperty(x, f), v) end -const CPL_MULTIPROC_PTHREAD = 1 - const GDAL_PREFIX = "/workspace/destdir" -const HAVE_CXX11 = 1 - -const HAVE_GCC_ATOMIC_BUILTINS = 1 +const SIZEOF_INT = 4 -const HAVE_GCC_BSWAP = 1 +const SIZEOF_UNSIGNED_LONG = 4 -const HAVE_GCC_WARNING_ZERO_AS_NULL_POINTER_CONSTANT = 1 +const SIZEOF_VOIDP = 8 -const HAVE_GETCWD = 1 +const SIZEOF_SIZE_T = 8 -const HAVE_PTHREAD_MUTEX_ADAPTIVE_NP = 1 +const USE_GCC_VISIBILITY_FLAG = 1 -const HAVE_PTHREAD_MUTEX_RECURSIVE = 1 +const HAVE_GCC_ATOMIC_BUILTINS = 1 -const HAVE_PTHREAD_SPINLOCK = 1 +const HAVE_GCC_BSWAP = 1 const HAVE_STD_IS_NAN = 1 -const HAVE_UINT128_T = 1 - -const HAVE_VSNPRINTF = 1 - -const LT_OBJDIR = ".libs/" - -const PACKAGE_BUGREPORT = "" - -const PACKAGE_NAME = "" - -const PACKAGE_STRING = "" - -const PACKAGE_TARNAME = "" - -const PACKAGE_URL = "" - -const PACKAGE_VERSION = "" - -const SIZEOF_INT = 4 - -const SIZEOF_UNSIGNED_LONG = 4 - -const SIZEOF_VOIDP = 8 - -const STDC_HEADERS = 1 - const CPLE_None = 0 const CPLE_AppDefined = 1 @@ -34465,9 +35452,9 @@ const VSI_STAT_CACHE_ONLY = 0x10 const GDAL_VERSION_MAJOR = 3 -const GDAL_VERSION_MINOR = 5 +const GDAL_VERSION_MINOR = 6 -const GDAL_VERSION_REV = 1 +const GDAL_VERSION_REV = 0 const GDAL_VERSION_BUILD = 0 @@ -34475,9 +35462,9 @@ const GDAL_VERSION_NUM = GDAL_COMPUTE_VERSION(GDAL_VERSION_MAJOR, GDAL_VERSION_MINOR, GDAL_VERSION_REV) + GDAL_VERSION_BUILD -const GDAL_RELEASE_DATE = 20220630 +const GDAL_RELEASE_DATE = 20221106 -const GDAL_RELEASE_NAME = "3.5.1" +const GDAL_RELEASE_NAME = "3.6.0" const RASTERIO_EXTRA_ARG_CURRENT_VERSION = 1 @@ -34511,6 +35498,8 @@ const GDAL_DMD_MULTIDIM_DIMENSION_CREATIONOPTIONLIST = "DMD_MULTIDIM_DIMENSION_C const GDAL_DMD_MULTIDIM_ARRAY_CREATIONOPTIONLIST = "DMD_MULTIDIM_ARRAY_CREATIONOPTIONLIST" +const GDAL_DMD_MULTIDIM_ARRAY_OPENOPTIONLIST = "DMD_MULTIDIM_ARRAY_OPENOPTIONLIST" + const GDAL_DMD_MULTIDIM_ATTRIBUTE_CREATIONOPTIONLIST = "DMD_MULTIDIM_ATTRIBUTE_CREATIONOPTIONLIST" const GDAL_DMD_OPENOPTIONLIST = "DMD_OPENOPTIONLIST" @@ -34545,6 +35534,18 @@ const GDAL_DCAP_VECTOR = "DCAP_VECTOR" const GDAL_DCAP_GNM = "DCAP_GNM" +const GDAL_DCAP_CREATE_LAYER = "DCAP_CREATE_LAYER" + +const GDAL_DCAP_DELETE_LAYER = "DCAP_DELETE_LAYER" + +const GDAL_DCAP_CREATE_FIELD = "DCAP_CREATE_FIELD" + +const GDAL_DCAP_DELETE_FIELD = "DCAP_DELETE_FIELD" + +const GDAL_DCAP_REORDER_FIELDS = "DCAP_REORDER_FIELDS" + +const GDAL_DMD_ALTER_FIELD_DEFN_FLAGS = "GDAL_DMD_ALTER_FIELD_DEFN_FLAGS" + const GDAL_DCAP_NOTNULL_FIELDS = "DCAP_NOTNULL_FIELDS" const GDAL_DCAP_UNIQUE_FIELDS = "DCAP_UNIQUE_FIELDS" @@ -34555,6 +35556,14 @@ const GDAL_DCAP_NOTNULL_GEOMFIELDS = "DCAP_NOTNULL_GEOMFIELDS" const GDAL_DCAP_NONSPATIAL = "DCAP_NONSPATIAL" +const GDAL_DCAP_CURVE_GEOMETRIES = "DCAP_CURVE_GEOMETRIES" + +const GDAL_DCAP_MEASURED_GEOMETRIES = "DCAP_MEASURED_GEOMETRIES" + +const GDAL_DCAP_Z_GEOMETRIES = "DCAP_Z_GEOMETRIES" + +const GDAL_DMD_GEOMETRY_FLAGS = "GDAL_DMD_GEOMETRY_FLAGS" + const GDAL_DCAP_FEATURE_STYLES = "DCAP_FEATURE_STYLES" const GDAL_DCAP_COORDINATE_EPOCH = "DCAP_COORDINATE_EPOCH" @@ -34563,10 +35572,24 @@ const GDAL_DCAP_MULTIPLE_VECTOR_LAYERS = "DCAP_MULTIPLE_VECTOR_LAYERS" const GDAL_DCAP_FIELD_DOMAINS = "DCAP_FIELD_DOMAINS" +const GDAL_DCAP_RELATIONSHIPS = "DCAP_RELATIONSHIPS" + +const GDAL_DCAP_CREATE_RELATIONSHIP = "DCAP_CREATE_RELATIONSHIP" + +const GDAL_DCAP_DELETE_RELATIONSHIP = "DCAP_DELETE_RELATIONSHIP" + +const GDAL_DCAP_UPDATE_RELATIONSHIP = "DCAP_UPDATE_RELATIONSHIP" + +const GDAL_DMD_RELATIONSHIP_FLAGS = "GDAL_DMD_RELATIONSHIP_FLAGS" + const GDAL_DCAP_RENAME_LAYERS = "DCAP_RENAME_LAYERS" const GDAL_DMD_CREATION_FIELD_DOMAIN_TYPES = "DMD_CREATION_FIELD_DOMAIN_TYPES" +const GDAL_DMD_ALTER_GEOM_FIELD_DEFN_FLAGS = "DMD_ALTER_GEOM_FIELD_DEFN_FLAGS" + +const GDAL_DMD_SUPPORTED_SQL_DIALECTS = "DMD_SUPPORTED_SQL_DIALECTS" + const GDAL_DIM_TYPE_HORIZONTAL_X = "HORIZONTAL_X" const GDAL_DIM_TYPE_HORIZONTAL_Y = "HORIZONTAL_Y" @@ -34577,6 +35600,12 @@ const GDAL_DIM_TYPE_TEMPORAL = "TEMPORAL" const GDAL_DIM_TYPE_PARAMETRIC = "PARAMETRIC" +const GDsCAddRelationship = "AddRelationship" + +const GDsCDeleteRelationship = "DeleteRelationship" + +const GDsCUpdateRelationship = "UpdateRelationship" + const GDAL_OF_READONLY = 0x00 const GDAL_OF_UPDATE = 0x01 @@ -34629,6 +35658,8 @@ const GDALRPCInfo = GDALRPCInfoV2 const GDAL_GTI2_SIGNATURE = "GTI2" +const GDAL_SWO_ROUND_UP_SIZE = 0x01 + const CPLMutex = Cvoid const CPLCond = Cvoid @@ -34685,6 +35716,12 @@ const CTLS_MAX = 32 const VRT_NODATA_UNSET = -1234.56 +const OGR_GGT_COUNT_NOT_NEEDED = 0x01 + +const OGR_GGT_STOP_IF_MIXED = 0x02 + +const OGR_GGT_GEOMCOLLECTIONZ_TINZ = 0x04 + const OGRERR_NONE = 0 const OGRERR_NOT_ENOUGH_DATA = 1 @@ -34733,6 +35770,24 @@ const ALTER_ALL_FLAG = ) | ALTER_UNIQUE_FLAG ) | ALTER_DOMAIN_FLAG +const ALTER_GEOM_FIELD_DEFN_NAME_FLAG = 0x1000 + +const ALTER_GEOM_FIELD_DEFN_TYPE_FLAG = 0x2000 + +const ALTER_GEOM_FIELD_DEFN_NULLABLE_FLAG = 0x4000 + +const ALTER_GEOM_FIELD_DEFN_SRS_FLAG = 0x8000 + +const ALTER_GEOM_FIELD_DEFN_SRS_COORD_EPOCH_FLAG = 0x00010000 + +const ALTER_GEOM_FIELD_DEFN_ALL_FLAG = + ( + ( + (ALTER_GEOM_FIELD_DEFN_NAME_FLAG | ALTER_GEOM_FIELD_DEFN_TYPE_FLAG) | + ALTER_GEOM_FIELD_DEFN_NULLABLE_FLAG + ) | ALTER_GEOM_FIELD_DEFN_SRS_FLAG + ) | ALTER_GEOM_FIELD_DEFN_SRS_COORD_EPOCH_FLAG + const OGR_F_VAL_NULL = 0x00000001 const OGR_F_VAL_GEOM_TYPE = 0x00000002 @@ -34771,10 +35826,14 @@ const OLCReorderFields = "ReorderFields" const OLCAlterFieldDefn = "AlterFieldDefn" +const OLCAlterGeomFieldDefn = "AlterGeomFieldDefn" + const OLCTransactions = "Transactions" const OLCDeleteFeature = "DeleteFeature" +const OLCUpsertFeature = "UpsertFeature" + const OLCFastSetNextByIndex = "FastSetNextByIndex" const OLCStringsAsUTF8 = "StringsAsUTF8" @@ -34787,8 +35846,12 @@ const OLCCurveGeometries = "CurveGeometries" const OLCMeasuredGeometries = "MeasuredGeometries" +const OLCZGeometries = "ZGeometries" + const OLCRename = "Rename" +const OLCFastGetArrowStream = "FastGetArrowStream" + const ODsCCreateLayer = "CreateLayer" const ODsCDeleteLayer = "DeleteLayer" @@ -34803,6 +35866,8 @@ const ODsCEmulatedTransactions = "EmulatedTransactions" const ODsCMeasuredGeometries = "MeasuredGeometries" +const ODsCZGeometries = "ZGeometries" + const ODsCRandomLayerRead = "RandomLayerRead" const ODsCRandomLayerWrite = "RandomLayerWrite " diff --git a/test/gdal_utils.jl b/test/gdal_utils.jl index aa07efc..888d61f 100644 --- a/test/gdal_utils.jl +++ b/test/gdal_utils.jl @@ -111,7 +111,7 @@ GDAL.gdalnearblackoptionsfree(options) band = GDAL.gdalgetrasterband(ds_nearblack, 1) read_data = zero(tinydata) GDAL.gdalrasterio(band, GDAL.GF_Read, 0, 0, 5, 5, read_data, 5, 5, GDAL.GDT_Byte, 0, 0) -@test sum(read_data[1:3,2:5]) == 0 +@test sum(read_data[1:3, 2:5]) == 0 @test sum(read_data) == 2221 GDAL.gdalclose(ds_nearblack)