Skip to content

Commit 0717835

Browse files
committedNov 27, 2017
Remove bound sync from crssync. Not longer needed
1 parent cecb89d commit 0717835

File tree

1 file changed

+0
-59
lines changed

1 file changed

+0
-59
lines changed
 

‎src/core/qgscoordinatereferencesystem.cpp

Lines changed: 0 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1853,13 +1853,6 @@ int QgsCoordinateReferenceSystem::syncDatabase()
18531853
return -1;
18541854
}
18551855

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-
18631856
// fix up database, if not done already //
18641857
if ( sqlite3_exec( database.get(), "alter table tbl_srs add noupdate boolean", nullptr, nullptr, nullptr ) == SQLITE_OK )
18651858
( 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()
21032096
}
21042097
#endif
21052098

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-
21582099
pj_ctx_free( pContext );
21592100

21602101
if ( sqlite3_exec( database.get(), "COMMIT", nullptr, nullptr, nullptr ) != SQLITE_OK )

0 commit comments

Comments
 (0)
Please sign in to comment.