Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from OSGeo:master #52

Merged
merged 51 commits into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
bcc3756
/vsicurl?: accept header.<key>=<value> to specify HTTP request headers
rouault Dec 17, 2024
e4fe405
GeoJSON: add a FOREIGN_MEMBERS=AUTO/ALL/NONE/STAC open option
rouault Dec 18, 2024
967ebd5
Doc: faq.rst: add a paragraph about 3D models
rouault Dec 22, 2024
f9be019
Add GTiff test files
rouault Dec 16, 2024
1c7ea6a
Add LIBERTIFF driver: native thread-safe read-only GeoTIFF reader
rouault Dec 16, 2024
b611ad3
Factor common code between GTiff and libertiff drivers
rouault Dec 21, 2024
13f91a8
CI: update ASAN to Ubuntu 24.04
rouault Dec 22, 2024
db9a52a
LIBERTIFF: add NUM_THREADS open option to allow for multithreaded dec…
rouault Dec 24, 2024
654769f
'gdal' CLI: add a warning about experimental status in help message
rouault Dec 24, 2024
41023db
Add VSIGlob() to find files using wildcards '*', '?', '['
rouault Dec 30, 2024
54000cf
Add CPLString::push_back()
rouault Dec 30, 2024
7572cee
Add 'gdal raster buildvrt'
rouault Dec 30, 2024
dcea244
COG: fix TILING_SCHEME creation option type declaration to 'string-se…
rouault Jan 1, 2025
50ea83e
Add CPLGetKnownConfigOptions()
rouault Jan 1, 2025
d0a945c
GTiff creation option spec: add min/max to a number of integer options
rouault Jan 1, 2025
9335401
COG creation option spec: add min/max to a number of integer options
rouault Jan 1, 2025
f239c6f
gdal CLI: add Bash completion
rouault Jan 1, 2025
1c49426
gcore: use GDALCopyWords64() instead of GDALCopyWords() for microscop…
rouault Jan 3, 2025
67f7823
VRTProcessedDataset: reduce block size when amount of RAM for temp bu…
rouault Jan 3, 2025
d4779d4
GDALMDArray::AsClassicDataset(): allow to set band IMAGERY metadata d…
rouault Jan 3, 2025
931e43a
Add GDALTranspose2D() for fast 2D matrix transposition
rouault Jan 3, 2025
8d2962f
multidim: use GDALTranspose2D()
rouault Jan 3, 2025
c692d8f
VRTProcessedDataset: use GDALTranspose2D()
rouault Jan 3, 2025
dc7345a
Fix -Wnull-dereference warnings in -O2 -DDEBUG mode
rouault Jan 4, 2025
d5de2e5
GDALTranspose2D(): add SSSE3 optimizations
rouault Jan 5, 2025
e751efd
GDALTranspose2D(): improve readability
rouault Jan 5, 2025
e487adf
GDALInterleave2Byte() and GDALInterleave4Byte(): provide SSE2 impleme…
rouault Jan 5, 2025
f9a6430
GDALInterleave3Byte_SSSE3(): provide implementation for ICC and MSVC
rouault Jan 5, 2025
2c7d458
GDALDeinterleave(): use Byte --> Byte optimization also for Int8 --> …
rouault Jan 5, 2025
3f217b6
Implement VRTProcessedDataset::IRasterIO()
rouault Jan 5, 2025
8043ece
VRTProcessedDataset::IRasterIO(): implement progress report
rouault Jan 5, 2025
82ef347
Merge pull request #11507 from rouault/libertiff
rouault Jan 6, 2025
11f58e0
Merge pull request #11508 from rouault/fix_11503
rouault Jan 6, 2025
e3d2342
Merge pull request #11515 from rouault/geojson_FOREIGN_MEMBERS
rouault Jan 6, 2025
41951ab
Merge pull request #11539 from rouault/fix_11538
rouault Jan 6, 2025
0b5e975
Merge pull request #11542 from rouault/fix_11522
rouault Jan 6, 2025
73b7b7f
Merge pull request #11558 from rouault/gdal_raster_buildvrt
rouault Jan 6, 2025
65c35b5
Merge pull request #11563 from rouault/gdal_completion
rouault Jan 6, 2025
53b44e5
Merge pull request #11569 from rouault/VRTProcessedDataset_ram_consum…
rouault Jan 6, 2025
ffdf582
Merge pull request #11571 from rouault/AsClassicDataset_BAND_IMAGERY_…
rouault Jan 6, 2025
615fe1e
Merge pull request #11572 from rouault/GDALTranspose2D
rouault Jan 6, 2025
44ff97a
vrtprocesseddataset.cpp: factor code common to 2 recent pull requests
rouault Jan 6, 2025
890c469
fuzzers: add a fuzzer for LIBERTIFF driver
rouault Jan 6, 2025
5ebd9bf
docker: copy bash completion files [ci skip]
rouault Jan 6, 2025
d32bf33
scripts/install_bash_completions.cmake.in: add gdal CLI [ci skip]
rouault Jan 6, 2025
b00a212
Use a single namespace for libertiff within LIBERTIFF and SNAP_TIFF d…
rouault Jan 7, 2025
b5c3b1e
Move GDALTranspose2D templates into rasterio.cpp
rouault Jan 7, 2025
c2c413f
Fix completion of 'gdal raster pipeline read <TAB>'
rouault Jan 7, 2025
beaa9c5
Docker: make sure Bash completion is enabled
rouault Jan 7, 2025
17d995e
Make cppcheck master happy
rouault Jan 7, 2025
75925d1
Merge pull request #11588 from rouault/libertiff_fuzzer
rouault Jan 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/asan/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ set -ex

. ../scripts/setdevenv.sh

export LD_LIBRARY_PATH=/usr/lib/llvm-14/lib/clang/14.0.0/lib/linux:${LD_LIBRARY_PATH}
export PATH=/usr/lib/llvm-14/bin:${PATH}
export LD_LIBRARY_PATH=/usr/lib/llvm-18/lib/clang/18.0.0/lib/linux:${LD_LIBRARY_PATH}
export PATH=/usr/lib/llvm-18/bin:${PATH}
export SKIP_MEM_INTENSIVE_TEST=YES
export SKIP_VIRTUALMEM=YES
export LD_PRELOAD=$(clang -print-file-name=libclang_rt.asan-x86_64.so)
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/linux_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,13 @@ jobs:
test_script: test.sh
os: ubuntu-22.04

- name: Ubuntu 22.04, clang ASAN
- name: Ubuntu 24.04, clang ASAN
id: asan
travis_branch: sanitize
container: ubuntu_22.04
container: ubuntu_24.04
build_script: build.sh
test_script: test.sh
os: ubuntu-22.04
os: ubuntu-24.04

- name: Ubuntu 20.04, gcc
id: ubuntu_20.04
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Supported Formats: (ro:read-only, rw:read-write, +:update, v:virtual-I/O s:subda
SNAP_TIFF -raster- (rov): Sentinel Application Processing GeoTIFF
GTiff -raster- (rw+vs): GeoTIFF (*.tif, *.tiff)
COG -raster- (wv): Cloud optimized GeoTIFF generator (*.tif, *.tiff)
LIBERTIFF -raster- (rov): GeoTIFF (using LIBERTIFF library) (*.tif, *.tiff)
NITF -raster- (rw+vs): National Imagery Transmission Format (*.ntf)
RPFTOC -raster- (rovs): Raster Product Format TOC format (*.toc)
ECRGTOC -raster- (rovs): ECRG TOC format (*.xml)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Supported Formats: (ro:read-only, rw:read-write, +:update, v:virtual-I/O s:subda
SNAP_TIFF -raster- (rov): Sentinel Application Processing GeoTIFF
GTiff -raster- (rw+vs): GeoTIFF (*.tif, *.tiff)
COG -raster- (wv): Cloud optimized GeoTIFF generator (*.tif, *.tiff)
LIBERTIFF -raster- (rov): GeoTIFF (using LIBERTIFF library) (*.tif, *.tiff)
NITF -raster- (rw+vs): National Imagery Transmission Format (*.ntf)
RPFTOC -raster- (rovs): Raster Product Format TOC format (*.toc)
ECRGTOC -raster- (rovs): ECRG TOC format (*.xml)
Expand Down
13 changes: 7 additions & 6 deletions alg/gdal_interpolateatpoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,18 @@
using DoublePointsCache =
lru11::Cache<uint64_t, std::shared_ptr<std::vector<double>>>;

class GDALDoublePointsCache
class CPL_DLL GDALDoublePointsCache
{
public:
std::unique_ptr<DoublePointsCache> cache{};
};

bool GDALInterpolateAtPoint(GDALRasterBand *pBand,
GDALRIOResampleAlg eResampleAlg,
std::unique_ptr<DoublePointsCache> &cache,
const double dfXIn, const double dfYIn,
double *pdfOutputReal, double *pdfOutputImag);
bool CPL_DLL GDALInterpolateAtPoint(GDALRasterBand *pBand,
GDALRIOResampleAlg eResampleAlg,
std::unique_ptr<DoublePointsCache> &cache,
const double dfXIn, const double dfYIn,
double *pdfOutputReal,
double *pdfOutputImag);

/*! @endcond */

Expand Down
1 change: 1 addition & 0 deletions apps/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ add_library(
gdalalg_main.cpp
gdalalg_pipeline.cpp
gdalalg_raster.cpp
gdalalg_raster_buildvrt.cpp
gdalalg_raster_info.cpp
gdalalg_raster_convert.cpp
gdalalg_raster_edit.cpp
Expand Down
88 changes: 85 additions & 3 deletions apps/gdal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,96 @@

#include <cassert>

// #define DEBUG_COMPLETION

/************************************************************************/
/* EmitCompletion() */
/************************************************************************/

/** Return on stdout a space-separated list of choices for bash completion */
static void EmitCompletion(std::unique_ptr<GDALAlgorithm> rootAlg,
const std::vector<std::string> &argsIn)
{
#ifdef DEBUG_COMPLETION
for (size_t i = 0; i < argsIn.size(); ++i)
fprintf(stderr, "arg[%d]='%s'\n", static_cast<int>(i),
argsIn[i].c_str());
#endif

std::vector<std::string> args = argsIn;

std::string ret;
const auto addSpace = [&ret]()
{
if (!ret.empty())
ret += " ";
};

if (!args.empty() &&
(args.back() == "--config" ||
STARTS_WITH(args.back().c_str(), "--config=") ||
(args.size() >= 2 && args[args.size() - 2] == "--config")))
{
if (args.back() == "--config=" || args.back().back() != '=')
{
CPLStringList aosConfigOptions(CPLGetKnownConfigOptions());
for (const char *pszOpt : cpl::Iterate(aosConfigOptions))
{
addSpace();
ret += pszOpt;
ret += '=';
}
printf("%s", ret.c_str());
}
return;
}

// Get inner-most algorithm
bool showAllOptions = true;
auto curAlg = std::move(rootAlg);
while (!args.empty() && !args.front().empty() && args.front()[0] != '-')
{
auto subAlg = curAlg->InstantiateSubAlgorithm(args.front());
if (!subAlg)
break;
showAllOptions = false;
args.erase(args.begin());
curAlg = std::move(subAlg);
}

for (const auto &choice : curAlg->GetAutoComplete(args, showAllOptions))
{
addSpace();
ret += CPLString(choice).replaceAll(" ", "\\ ");
}

#ifdef DEBUG_COMPLETION
fprintf(stderr, "ret = '%s'\n", ret.c_str());
#endif
if (!ret.empty())
printf("%s", ret.c_str());
}

/************************************************************************/
/* main() */
/************************************************************************/

MAIN_START(argc, argv)
{
auto alg = GDALGlobalAlgorithmRegistry::GetSingleton().Instantiate(
GDALGlobalAlgorithmRegistry::ROOT_ALG_NAME);
assert(alg);

if (argc >= 3 && strcmp(argv[1], "completion") == 0)
{
GDALAllRegister();

// Process lines like "gdal completion gdal raster"
EmitCompletion(std::move(alg),
std::vector<std::string>(argv + 3, argv + argc));
return 0;
}

EarlySetConfigOptions(argc, argv);

/* -------------------------------------------------------------------- */
Expand All @@ -31,14 +115,12 @@ MAIN_START(argc, argv)
/* -------------------------------------------------------------------- */

GDALAllRegister();

argc = GDALGeneralCmdLineProcessor(
argc, &argv, GDAL_OF_RASTER | GDAL_OF_VECTOR | GDAL_OF_MULTIDIM_RASTER);
if (argc < 1)
return (-argc);

auto alg = GDALGlobalAlgorithmRegistry::GetSingleton().Instantiate(
GDALGlobalAlgorithmRegistry::ROOT_ALG_NAME);
assert(alg);
alg->SetCallPath(std::vector<std::string>{argv[0]});
std::vector<std::string> args;
for (int i = 1; i < argc; ++i)
Expand Down
Loading
Loading