diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2021-04-08 19:29:54 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-08 19:29:54 +0200 |
| commit | fc6ff7a481d2bfe5765726f8c638581965896fb7 (patch) | |
| tree | 4cf8d1e2753720a56dc9e125decce8dea8bb63e0 /src/iso19111/factory.cpp | |
| parent | 78e3768a71421508e9e7929e2e56920152ced9e3 (diff) | |
| parent | 950ce787b26b3b3afd0ff76151fdf72d1381b7a1 (diff) | |
| download | PROJ-fc6ff7a481d2bfe5765726f8c638581965896fb7.tar.gz PROJ-fc6ff7a481d2bfe5765726f8c638581965896fb7.zip | |
Merge pull request #2647 from rouault/integer_or_text
Database: decrease db size
Diffstat (limited to 'src/iso19111/factory.cpp')
| -rw-r--r-- | src/iso19111/factory.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/iso19111/factory.cpp b/src/iso19111/factory.cpp index 674c8366..fa2a0ef3 100644 --- a/src/iso19111/factory.cpp +++ b/src/iso19111/factory.cpp @@ -101,7 +101,7 @@ namespace io { constexpr int DATABASE_LAYOUT_VERSION_MAJOR = 1; // If the code depends on the new additions, then DATABASE_LAYOUT_VERSION_MINOR // must be incremented. -constexpr int DATABASE_LAYOUT_VERSION_MINOR = 0; +constexpr int DATABASE_LAYOUT_VERSION_MINOR = 1; constexpr size_t N_MAX_PARAMS = 7; @@ -735,7 +735,7 @@ void DatabaseContext::Private::checkDatabaseLayout( // cppcheck-suppress knownConditionTrueFalse DATABASE_LAYOUT_VERSION_MAJOR == 1 && // cppcheck-suppress knownConditionTrueFalse - DATABASE_LAYOUT_VERSION_MINOR == 0, + DATABASE_LAYOUT_VERSION_MINOR == 1, "remove that assertion and below lines next time we upgrade " "database structure"); res = run("SELECT 1 FROM metadata WHERE key = 'EPSG.VERSION' AND " @@ -766,6 +766,15 @@ void DatabaseContext::Private::checkDatabaseLayout( " is expected. " "It comes from another PROJ installation."); } + // Database layout v1.0 of PROJ 8.0 is forward compatible with v1.1 + static_assert( + // cppcheck-suppress knownConditionTrueFalse + DATABASE_LAYOUT_VERSION_MAJOR == 1 && + // cppcheck-suppress knownConditionTrueFalse + DATABASE_LAYOUT_VERSION_MINOR == 1, + "re-enable the check below if database layout v1.0 and v1.1 is no " + "longer compatible"); +#if 0 if (minor < DATABASE_LAYOUT_VERSION_MINOR) { throw FactoryException( path + @@ -774,6 +783,7 @@ void DatabaseContext::Private::checkDatabaseLayout( " is expected. " "It comes from another PROJ installation."); } +#endif if (dbNamePrefix.empty()) { nLayoutVersionMajor_ = major; nLayoutVersionMinor_ = minor; |
