@@ -1853,13 +1853,6 @@ int QgsCoordinateReferenceSystem::syncDatabase()
1853
1853
return -1 ;
1854
1854
}
1855
1855
1856
- QString boundsColumns ( " ALTER TABLE tbl_srs ADD west_bound_lon REAL;"
1857
- " ALTER TABLE tbl_srs ADD north_bound_lat REAL;"
1858
- " ALTER TABLE tbl_srs ADD east_bound_lon REAL;"
1859
- " ALTER TABLE tbl_srs ADD south_bound_lat REAL;" );
1860
-
1861
- sqlite3_exec ( database.get (), boundsColumns.toUtf8 (), nullptr , nullptr , nullptr );
1862
-
1863
1856
// fix up database, if not done already //
1864
1857
if ( sqlite3_exec ( database.get (), " alter table tbl_srs add noupdate boolean" , nullptr , nullptr , nullptr ) == SQLITE_OK )
1865
1858
( void )sqlite3_exec ( database.get (), " update tbl_srs set noupdate=(auth_name='EPSG' and auth_id in (5513,5514,5221,2065,102067,4156,4818))" , nullptr , nullptr , nullptr );
@@ -2103,58 +2096,6 @@ int QgsCoordinateReferenceSystem::syncDatabase()
2103
2096
}
2104
2097
#endif
2105
2098
2106
- QFile csv ( QgsApplication::pkgDataPath () + " /resources/epsg_areas.csv" );
2107
- if ( !csv.open ( QIODevice::ReadOnly ) )
2108
- {
2109
- return false ;
2110
- }
2111
-
2112
- QTextStream lines ( &csv );
2113
- ( void )lines.readLine (); // header line
2114
-
2115
- for ( ;; )
2116
- {
2117
- QString line = lines.readLine ();
2118
- if ( line.isNull () )
2119
- break ;
2120
-
2121
- if ( line.startsWith ( ' #' ) )
2122
- {
2123
- continue ;
2124
- }
2125
- const QStringList data = line.split ( ' ,' );
2126
- if ( data[0 ] == QStringLiteral ( " None" ) )
2127
- continue ;
2128
-
2129
- double west_bound_lon = data[1 ].toDouble ();
2130
- double north_bound_lat = data[2 ].toDouble ();
2131
- double east_bound_lon = data[3 ].toDouble ();
2132
- double south_bound_lat = data[4 ].toDouble ();
2133
- sql = QStringLiteral ( " UPDATE tbl_srs "
2134
- " SET west_bound_lon=%1, "
2135
- " north_bound_lat=%2, "
2136
- " east_bound_lon=%3, "
2137
- " south_bound_lat=%4 "
2138
- " WHERE auth_name='EPSG' AND auth_id=%5" )
2139
- .arg ( west_bound_lon )
2140
- .arg ( north_bound_lat )
2141
- .arg ( east_bound_lon )
2142
- .arg ( south_bound_lat )
2143
- .arg ( data[0 ] );
2144
-
2145
- if ( sqlite3_exec ( database.get (), sql.toUtf8 (), nullptr , nullptr , &errMsg ) != SQLITE_OK )
2146
- {
2147
- QgsDebugMsg ( QStringLiteral ( " Could not execute: %s [%s/%s]\n " ).arg (
2148
- sql,
2149
- sqlite3_errmsg ( database.get () ),
2150
- errMsg ? errMsg : " (unknown error)" ) );
2151
- if ( errMsg )
2152
- sqlite3_free ( errMsg );
2153
- errors++;
2154
-
2155
- }
2156
- }
2157
-
2158
2099
pj_ctx_free ( pContext );
2159
2100
2160
2101
if ( sqlite3_exec ( database.get (), " COMMIT" , nullptr , nullptr , nullptr ) != SQLITE_OK )
0 commit comments